Visitar URL original
Use ruff check (#35) · sdpython/sphinx-runpython@15e3afa · GitHub
Skip to content

Commit 15e3afa

Browse files
authored
Use ruff check (#35)
* Use ruff check * lint * remove rstcheck
1 parent ea456ae commit 15e3afa

7 files changed

Lines changed: 6 additions & 63 deletions

File tree

‎.github/workflows/rstcheck.yml‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎_unittests/ut_docassert/datadoc/exdocassert.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ def onefunction(a, b: int = 4):
77
:return: ``a + b``
88
:raises TypeError: if a and b have different types.
99
"""
10-
if type(a) != type(b):
10+
if type(a) != type(b): # noqa: E721
1111
raise TypeError(f"Different type {a} != {b}")
1212
return a + b

‎_unittests/ut_docassert/datadoc/exdocassert2.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ def onefunction(a, b):
88
:return: ``a + b``
99
:raises TypeError: guess
1010
"""
11-
if type(a) != type(b):
11+
if type(a) != type(b): # noqa: E721
1212
raise TypeError(f"Different type {a} != {b}")
1313
return a + b

‎_unittests/ut_docassert/datadoc/exsig.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def onemethod(self, a, b):
1818
:return: ``a + b``
1919
:raises TypeError: guess
2020
"""
21-
if type(a) != type(b):
21+
if type(a) != type(b): # noqa: E721
2222
raise TypeError(f"Different type {a} != {b}")
2323
return a + b
2424

@@ -32,6 +32,6 @@ def static_method(a, b):
3232
:return: ``a + b``
3333
:raises TypeError: guess
3434
"""
35-
if type(a) != type(b):
35+
if type(a) != type(b): # noqa: E721
3636
raise TypeError(f"Different type {a} != {b}")
3737
return a + b

‎azure-pipelines.yml‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ jobs:
2424
- script: pip install -r requirements-dev.txt
2525
displayName: 'Install Requirements dev'
2626
- script: |
27-
ruff .
27+
ruff check .
2828
displayName: 'Ruff'
2929
- script: |
3030
black --diff .
3131
displayName: 'Black'
32-
- script: |
33-
rstcheck -r ./_doc ./sphinx_runpython
34-
displayName: 'rstcheck'
3532
- script: |
3633
python -m pip wheel . --wheel-dir dist -v -v -v
3734
displayName: 'build wheel'
@@ -74,7 +71,7 @@ jobs:
7471
- script: pip install -r requirements-dev.txt
7572
displayName: 'Install Requirements dev'
7673
- script: |
77-
ruff .
74+
ruff check .
7875
displayName: 'Ruff'
7976
- script: |
8077
black --diff .

‎pyproject.toml‎

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
1-
[tool.rstcheck]
2-
report_level = "INFO"
3-
ignore_directives = [
4-
"autoclass",
5-
"autofunction",
6-
"blocref",
7-
"blocreflist",
8-
"collapse",
9-
"exref",
10-
"exreflist",
11-
"faqref",
12-
"faqreflist",
13-
"gdot",
14-
"image-sg",
15-
"mathdef",
16-
"mathdeflist",
17-
"quote",
18-
"runpython",
19-
]
20-
ignore_roles = ["epkg"]
21-
ignore_messages = [
22-
".*Hyperlink target .l-blocdefs. is not referenced.*",
23-
".*Hyperlink target .l-sphinx-epkg. is not referenced.*",
24-
]
25-
261
[tool.ruff]
272

283
# Exclude a variety of commonly ignored directories.

‎requirements-dev.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ ruff
1515
sphinx
1616
sphinx-gallery
1717
sphinx-issues
18-
rstcheck[sphinx,toml]
1918
tomli
2019
tqdm
2120
wheel

0 commit comments

Comments
 (0)