chore: add ruff rules

This commit is contained in:
Dowon
2023-10-30 22:01:59 +09:00
parent 2a578cf216
commit b3948a6efa
4 changed files with 6 additions and 4 deletions

View File

@@ -8,12 +8,12 @@ repos:
- id: mixed-line-ending - id: mixed-line-ending
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.292" rev: "v0.1.3"
hooks: hooks:
- id: ruff - id: ruff
args: [--fix, --exit-non-zero-on-fix] args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black-pre-commit-mirror - repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1 rev: 23.10.1
hooks: hooks:
- id: black - id: black

View File

@@ -1 +1 @@
__version__ = "23.10.2.dev0" __version__ = "23.11.0.dev0"

View File

@@ -92,7 +92,7 @@ def library_version():
for lib in libraries: for lib in libraries:
try: try:
d[lib] = version(lib) d[lib] = version(lib)
except Exception: except Exception: # noqa: PERF203
d[lib] = "Unknown" d[lib] = "Unknown"
return d return d

View File

@@ -26,8 +26,10 @@ select = [
"I001", "I001",
"ISC", "ISC",
"N", "N",
"PERF",
"PIE", "PIE",
"PT", "PT",
"PTH",
"RET", "RET",
"RUF", "RUF",
"SIM", "SIM",