Skip to content

Commit

Permalink
Enable more lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed Dec 3, 2023
1 parent e246b62 commit 67245fa
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .tools/copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_commit: 7d6f4ceea
_commit: 8ebfc313a
_src_path: gh:oprypin/py-project-template
copyright_date: '2020'
mkdocs: true
Expand Down
2 changes: 1 addition & 1 deletion mkdocs_gen_files/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _get_file(self, name: str, new: bool = False) -> str:
dest_dir=self.config.site_dir,
use_directory_urls=self.config.use_directory_urls,
)
new_f.generated_by = "mkdocs-gen-files" # type: ignore
new_f.generated_by = "mkdocs-gen-files" # type: ignore[attr-defined]
normname = pathlib.PurePath(name).as_posix()

if new or normname not in self._files:
Expand Down
20 changes: 12 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,20 @@ detached = false
[tool.ruff]
line-length = 100
select = [
"I",
"F", "W", "E", "UP", "YTT", "C4", "DTZ", "FA", "ISC", "PIE", "T20", "RSE", "TCH",
"B002", "B003", "B005", "B007", "B009", "B012", "B013", "B014", "B015", "B018", "B020", "B021", "B023", "B026", "B033", "B034", "B905",
"F", "W", "E", "I", "UP", "YTT", "C4", "DTZ", "T10", "FA", "ISC", "PIE", "T20", "RSE", "TCH",
"N803", "N804", "N805", "N806", "N807", "N815", "N816", "N999",
"B002", "B003", "B005", "B007", "B008", "B009", "B010", "B011", "B012", "B013", "B014", "B015", "B016", "B017", "B018", "B020", "B021", "B022", "B023", "B025", "B026", "B029", "B030", "B031", "B032", "B033", "B034", "B905",
"COM818",
"PERF101",
"PGH002", "PGH004", "PGH005",
"G001", "G010", "G202",
"RET502",
"SIM101", "SIM103", "SIM105", "SIM107", "SIM118", "SIM201", "SIM202", "SIM208", "SIM210", "SIM211", "SIM212", "SIM220", "SIM221", "SIM222", "SIM223", "SIM300", "SIM401", "SIM910",
"PGH002", "PGH003", "PGH004", "PGH005",
"PLC", "PLE",
"PLR0124", "PLR0133", "PLR0206", "PLR0402", "PLR1701", "PLR1722", "PLW0120", "PLW0127", "PLW0129", "PLW0131", "PLW0406", "PLW0602", "PLW0603", "PLW0711", "PLW1508", "PLW3301",
"TRY302", "TRY401",
"FLY002",
"PLC", "PLE", "PLR0124", "PLR0133", "PLR0206", "PLR0402", "PLR1701", "PLR1722", "PLW0120", "PLW0127", "PLW0129", "PLW0131", "PLW0406", "PLW0602", "PLW0603", "PLW0711",
"RUF001", "RUF005", "RUF007", "RUF010", "RUF013", "RUF100", "RUF200",
"SIM101", "SIM107", "SIM201", "SIM202", "SIM208", "SIM210", "SIM211", "SIM300", "SIM401", "SIM910",
"PERF101", "PERF102", "PERF402",
"RUF001", "RUF005", "RUF007", "RUF008", "RUF009", "RUF010", "RUF011", "RUF013", "RUF015", "RUF016", "RUF100", "RUF200",
]
ignore = ["E501", "E731"]
[tool.ruff.flake8-comprehensions]
Expand Down
17 changes: 10 additions & 7 deletions requirements/requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# - mkdocstrings
# - mkdocstrings-python
# - pymdown-extensions
# - mkdocs>=1.4.1
#

babel==2.13.1
Expand Down Expand Up @@ -49,7 +50,7 @@ mergedeep==1.3.4
# via mkdocs
mkdocs==1.5.3
# via
# -r -
# hatch.envs.docs
# mkdocs-autorefs
# mkdocs-gen-files
# mkdocs-literate-nav
Expand All @@ -58,17 +59,19 @@ mkdocs==1.5.3
mkdocs-autorefs==0.5.0
# via mkdocstrings
mkdocs-gen-files==0.5.0
# via -r -
# via hatch.envs.docs
mkdocs-literate-nav==0.6.1
# via -r -
# via hatch.envs.docs
mkdocs-material==9.4.7
# via -r -
# via hatch.envs.docs
mkdocs-material-extensions==1.3
# via mkdocs-material
mkdocstrings==0.23.0
# via mkdocstrings-python
# via
# hatch.envs.docs
# mkdocstrings-python
mkdocstrings-python==1.7.3
# via -r -
# via hatch.envs.docs
packaging==23.2
# via mkdocs
paginate==0.5.6
Expand All @@ -81,7 +84,7 @@ pygments==2.16.1
# via mkdocs-material
pymdown-extensions==10.3.1
# via
# -r -
# hatch.envs.docs
# mkdocs-material
# mkdocstrings
python-dateutil==2.8.2
Expand Down

0 comments on commit 67245fa

Please sign in to comment.