-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt Ruff and use stricter MyPy settings
- Loading branch information
Showing
10 changed files
with
141 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
target-version = "py39" # Pin Ruff to Python 3.9 | ||
output-format = "full" | ||
line-length = 95 | ||
|
||
[lint] | ||
preview = true | ||
select = [ | ||
# "ANN", # flake8-annotations | ||
"C4", # flake8-comprehensions | ||
"COM", # flake8-commas | ||
"B", # flake8-bugbear | ||
"DTZ", # flake8-datetimez | ||
"E", # pycodestyle | ||
"EM", # flake8-errmsg | ||
"EXE", # flake8-executable | ||
"F", # pyflakes | ||
"FA", # flake8-future-annotations | ||
"FLY", # flynt | ||
"FURB", # refurb | ||
"G", # flake8-logging-format | ||
"I", # isort | ||
"ICN", # flake8-import-conventions | ||
"INT", # flake8-gettext | ||
"LOG", # flake8-logging | ||
"PERF", # perflint | ||
"PGH", # pygrep-hooks | ||
"PIE", # flake8-pie | ||
"PT", # flake8-pytest-style | ||
"SIM", # flake8-simplify | ||
"SLOT", # flake8-slots | ||
"TCH", # flake8-type-checking | ||
"UP", # pyupgrade | ||
"W", # pycodestyle | ||
"YTT", # flake8-2020 | ||
] | ||
ignore = [ | ||
"E116", | ||
"E241", | ||
"E251", | ||
] | ||
|
||
[lint.per-file-ignores] | ||
"tests/*" = [ | ||
"ANN", # tests don't need annotations | ||
] | ||
|
||
[lint.isort] | ||
forced-separate = [ | ||
"tests", | ||
] | ||
required-imports = [ | ||
"from __future__ import annotations", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
from __future__ import annotations | ||
|
||
from pathlib import Path | ||
|
||
import pytest | ||
|
||
import sphinx | ||
|
||
pytest_plugins = 'sphinx.testing.fixtures' | ||
|
||
|
||
@pytest.fixture(scope='session') | ||
def rootdir(): | ||
if sphinx.version_info[:2] < (7, 2): | ||
from sphinx.testing.path import path | ||
|
||
return path(__file__).parent.abspath() / 'roots' | ||
|
||
def rootdir() -> Path: | ||
return Path(__file__).resolve().parent / 'roots' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters