Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion helpers/cog_cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def yaml(self) -> str:


class CC:
def __init__(self, filename: str):
def __init__(self, filename: str) -> None:
with Path(filename).open(encoding="utf-8") as f:
data = json.load(f)

Expand Down
2 changes: 1 addition & 1 deletion helpers/cog_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def render_cookie(**context: str) -> Generator[Path, None, None]:


class Matcher:
def __init__(self, txt: str):
def __init__(self, txt: str) -> None:
self.ast = ast.parse(txt)
self.lines = txt.splitlines()

Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def nox_session(session: nox.Session, backend: str, vcs: bool, docs: Docs) -> No


@nox.session(default=False)
def compare_copier(session):
def compare_copier(session: nox.Session) -> None:
session.install("cookiecutter", "copier", "copier-templates-extensions")

tmp_dir = session.create_tmp()
Expand All @@ -383,7 +383,7 @@ def compare_copier(session):


@nox.session(default=False)
def compare_cruft(session):
def compare_cruft(session: nox.Session) -> None:
session.install("cookiecutter", "cruft")

tmp_dir = session.create_tmp()
Expand Down
54 changes: 15 additions & 39 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,48 +164,20 @@ show-fixes = true
extend-exclude = ["\\{\\{cookiecutter.project_name\\}\\}"]

[tool.ruff.lint]
extend-select = [
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"EM", # flake8-errmsg
"EXE", # flake8-executable
"FA", # flake8-future-annotations
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"NPY", # NumPy specific rules
"PD", # pandas-vet
"PERF", # perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"T10", # flake8-debugger
"T20", # flake8-print
"TC", # flake8-type-checking
"TID251", # flake8-tidy-imports.banned-api
"TRY", # tryceratops
"UP", # pyupgrade
"YTT", # flake8-2020
]
select = ["ALL"]
ignore = [
"A002", # Okay for arguments to shadow builtins
"A004", # Okay for imports to shadow builtins (like print)
"COM812", # Trailing commas teach the formatter
"D", # Docstrings
"E501", # Line too long
"FBT", # Boolean args fine
"N", # Naming
"PLR", # Design related pylint codes
"RUF012", # Would require a lot of ClassVar's
"S101", # Assert is used by mypy and pytest
"S310", # Okay to open URL
"TID252", # Relative imports are fine
]

[tool.ruff.lint.flake8-tidy-imports.banned-api]
Expand All @@ -214,6 +186,10 @@ ignore = [

[tool.ruff.lint.per-file-ignores]
"src/sp_repo_review/_compat/**.py" = ["TID251"]
"src/sp_repo_review/checks/*.py" = ["ERA001"]
"tests/**" = ["ANN", "INP001", "S607"]
"helpers/**" = ["INP001", "FIX004"]
"helpers/extensions.py" = ["ANN"]

[tool.repo-review.ignore]
RTD103 = "Using Ruby instead of Python for docs"
Expand Down
Loading