-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
77 lines (70 loc) · 2.92 KB
/
pyproject.toml
File metadata and controls
77 lines (70 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
[project]
name = "Python-Project-Template"
version = "0.0.1"
description = "Modern Python Project"
readme = "README.md"
authors = [{ name = "Junya Morioka", email = "mjun@mjunya.com" }]
requires-python = ">=3.12"
dependencies = []
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/my_package"]
[dependency-groups]
dev = ["pre-commit>=4.2.0", "pytest>=8.4.0", "ruff>=0.11.12"]
[tool.ruff]
line-length = 100
target-version = "py312"
exclude = [".git", ".ruff_cache", ".venv", ".vscode"]
[tool.ruff.lint]
preview = true
select = [
"ANN", # type annotation
"B", # flake8-bugbear
"D", # pydocstyle
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"PTH", # use `pathlib.Path` instead of `os.path`
"RUF", # ruff specific rules
"SIM", # flake8-simplify
"UP", # pyupgrade
"W", # pycodestyle warnings
]
ignore = [
"ANN401", # Checks that function arguments are annotated with a more specific type than Any.
"B007", # Unused loop variable
"B008", # Function call in default argument
"B905", # `zip()` without `strict=True`
"COM812", # Missing trailing comma
"COM819", # Trailing comma prohibited
"D1", # Missing docstring in public module, class, function, or method
"D203", # One blank line required before class docstring (ignored because D211 is prioritized in pydocstyle convention 'google')
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D400", # First line of docstring should end with a period
"D415", # First line of docstring should end with punctuation (period, question mark, or exclamation point)
"E114", # Indentation is not a multiple of four (comment)
"G004", # Logging statement uses f-string
"ISC001", # Implicit string concatenation on a single line
"ISC002", # Implicit string concatenation on multiple lines
"PTH123", # `open()` should be replaced by `Path.open()`
"Q000", # Single quotes found when double quotes are preferred
"Q001", # Single quotes found when double quotes are preferred for multi-line strings
"Q002", # Single quotes found when double quotes are preferred for docstrings
"RUF002", # Checks for ambiguous Unicode characters in docstrings.
"RUF003", # Checks for ambiguous Unicode characters in comments.
"SIM105", # try-except-pass blocks that can be replaced with the contextlib.suppress context manager.
"SIM108", # Use ternary operator instead of `if`-`else`-block
"SIM116", # Use a dictionary instead of consecutive `if` statements
]
unfixable = [
"F401", # unused import
"F841", # unused variable
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.lint.pydocstyle]
convention = "google"