-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
151 lines (137 loc) · 5.02 KB
/
pyproject.toml
File metadata and controls
151 lines (137 loc) · 5.02 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[project]
name = "logtools"
description = "Log processing tool."
readme = "README.md"
version = "0.4"
authors = [
{name = "BigBirdCode"},
]
requires-python = ">=3.12"
dependencies = [
"wxPython",
"strictyaml",
"platformdirs",
]
[dependency-groups]
dev = [
"mypy",
"ruff",
"pytest",
"setuptools",
]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project.gui-scripts]
logtools = "logtools.main:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.ruff]
line-length = 98
target-version = "py312"
[tool.ruff.format]
quote-style = "double"
[tool.ruff.lint]
# Ruff lint selection is based on Ruff version 0.6.9
select = [
"F", # Pyflakes
"E", # pycodestyle errors
"W", # pycodestyles warnings
"C90", # mccabe
"I", # isort - also enforced by format
"N", # pep8-naming
"D", # pydocstyle
"UP", # pyupgrade
"YTT", # flake8-2020 - sys.version checks
"ASYNC", # flake8-async
"BLE", # flake8-blind-except - PyCharm does not know this :-(
"B", # flake8-bugbear
"A", # flake8-builtin
"C4", # flake8-comprehension
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"DJ", # flake8-django
"EM", # flake8-errmsg
"EXE", # flake8-executable
"FA", # flake8-future-annotations
"ICN", # flake8-import-convention
"LOG", # flake8-logging
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SLOT", # flake8-slots
"TID", # flake8-tidy-imports
"INT", # flake8-gettext
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PL", # Pylint
"TRY", # tryceratops
"FLY", # flynt
"NPY", # NumPy-specific rules
"AIR", # Airflow
"FURB", # refurb
"RUF", # Ruff specific
]
# Ignored checkers: [
# "ANN", # flake8-annotations - suggest annotations to self and cls, disallow Any...
# "S", # flake-8-bandit - suggest validation everywhere for subprocess.call and requests
# "FBT", # flake8-boolean-trap - suggest not to use boolean in function params
# "COM", # flake8-commas - suggest comma even in one liners...
# "CPY", # flake8-copyright - no need
# "ISC", # flake8-implicit-str-concat - would be good, but conflict with formatter and ISC003 bad anyway
# "SIM", # flake8-simplify - good suggestions, but these should not be a quality gate. Execute yourself!
# "TCH", # flake8-type-checking - I don't use type checking blocks (yet?)
# "TD", # flake8-todos - we have todos...
# "FIX", # flake8-fixme - we have todos...
# "FAST", # FastAPI - preview rule and no need
# "PERF", # Perflint - complaint in looping and append and try-except in loops
# "DOC", # pydoclint - preview rule and no need
# ]
ignore = [
"D104", # Missing docstring in public package
"D107", # Missing docstring in __init__
"D200", # One-line docstring should fit on one line
"D203", # 1 blank line required before class docstring - conflict with formatter
"D205", # 1 blank line required between summary line and description - maybe later
"D212", # Multi-line docstring summary should start at the first line - I don't like that
"D400", # First line should end with a period - maybe later
"D401", # First line of docstring should be in imperative mood - maybe later
"D404", # First word of the docstring should not be "This" - maybe later
"D415", # First line should end with a period, question mark, or exclamation point - maybe later
"E501", # Line too long
"G004", # Logging statement uses f-string
"N818", # Exception name should be named with an Error suffix
"PIE790", # Unnecessary `pass` statement
"PLR0913", # Too many arguments in function definition
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison
"PLR5501", # Use `elif` instead of `else` then `if`, to reduce indentation
"PLW2901", # for loop variable overwritten
"PTH123", # `open()` should be replaced by `Path.open()` - good suggestion, but sometimes open() needed
"RET504", # Unnecessary assignment to variable before `return` statement - varable better for debugging
"TRY400", # Use `logging.exception` instead of `logging.error` - I use error and add trace in debug level...
]
[tool.ruff.lint.isort]
case-sensitive = true
lines-after-imports = 2
force-to-top = ["preform_lib.pf_conf"]
[tool.ruff.lint.flake8-implicit-str-concat]
allow-multiline = false
[tool.mypy]
strict = true
[[tool.mypy.overrides]]
module = [
"strictyaml",
"wx.*",
]
ignore_missing_imports = true