Skip to content

Commit

Permalink
Apply Repo-Review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos committed Dec 28, 2023
1 parent f6a0fcb commit 22bf1d6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion codespell_lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ._codespell import _script_main, main
from ._version import __version__ # type: ignore
from ._version import __version__ # type: ignore[import-not-found]

__all__ = ["_script_main", "main", "__version__"]
4 changes: 3 additions & 1 deletion codespell_lib/_codespell.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
from typing import Any, Dict, List, Match, Optional, Pattern, Sequence, Set, Tuple

# autogenerated by setuptools_scm
from ._version import __version__ as VERSION # type: ignore # noqa: N812
from ._version import ( # type: ignore[import-not-found]
__version__ as VERSION, # noqa: N812
)

word_regex_def = r"[\w\-'’]+"
# While we want to treat characters like ( or " as okay for a starting break,
Expand Down
23 changes: 15 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,24 @@ codespell_lib = [

[tool.mypy]
pretty = true
show_error_codes = true
hide_error_codes = false
strict = true
warn_unused_ignores = false
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]

[tool.pytest.ini_options]
addopts = "--cov=codespell_lib -rs --cov-report= --tb=short --junit-xml=junit-results.xml"
minversion = "6"
testpaths = ["codespell_lib/tests"]
log_cli_level = "INFO"
xfail_strict = true
addopts = ["--cov=codespell_lib", "-rs", "--strict-config", "--strict-markers", "--cov-report=", "--tb=short", "--junit-xml=junit-results.xml"]
filterwarnings = ["error"]

[tool.ruff]
extend-ignore = [
line-length = 88

[tool.ruff.lint]
ignore = [
"ANN101",
"B904",
"PLW2901",
Expand All @@ -120,7 +129,6 @@ extend-ignore = [
"ISC001",
"ISC002",
]
line-length = 88
select = [
"A",
"ANN",
Expand All @@ -141,17 +149,16 @@ select = [
"W",
"YTT",
]
target-version = "py37"

[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
max-complexity = 45

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"codespell_lib/_codespell.py" = ["A003"]
"codespell_lib/tests/test_*" = ["S101"]
"codespell_lib/tests/test_basic.py" = ["ANN401", "N802"]

[tool.ruff.pylint]
[tool.ruff.lint.pylint]
allow-magic-value-types = ["bytes", "int", "str",]
max-args = 12
max-branches = 49
Expand Down

0 comments on commit 22bf1d6

Please sign in to comment.