@@ -32,7 +32,7 @@ classifiers = [
32
32
" Framework :: Pytest" ,
33
33
]
34
34
dependencies = [
35
- " firebird-base> =1.8.0 " ,
35
+ " firebird-base~ =1.8" ,
36
36
" firebird-driver~=1.10" ,
37
37
" pytest>=7.4" ,
38
38
" psutil~=5.9" ,
@@ -64,6 +64,11 @@ packages = ["src/firebird"]
64
64
dependencies = [
65
65
]
66
66
67
+ [tool .hatch .envs .hatch-test ]
68
+ extra-args = [" -vv" , " --server" , " local" ]
69
+ dependencies = [
70
+ ]
71
+
67
72
[tool .hatch .envs .test ]
68
73
dependencies = [
69
74
" coverage[toml]>=6.5" ,
@@ -101,63 +106,13 @@ docset = [
101
106
" cd docs; VERSION=`hatch version` ; tar --exclude='.DS_Store' -cvzf ../dist/firebird-qa-$VERSION-docset.tgz firebird-qa.docset" ,
102
107
]
103
108
104
- [tool .hatch .envs .lint ]
105
- detached = true
106
- dependencies = [
107
- " black>=23.1.0" ,
108
- " mypy>=1.0.0" ,
109
- " ruff>=0.0.243" ,
110
- ]
111
- [tool .hatch .envs .lint .scripts ]
112
- typing = " mypy --install-types --non-interactive {args:src/firebird/qa tests}"
113
- style = [
114
- " ruff {args:.}" ,
115
- " black --check --diff {args:.}" ,
116
- ]
117
- fmt = [
118
- " black {args:.}" ,
119
- " ruff --fix {args:.}" ,
120
- " style" ,
121
- ]
122
- all = [
123
- " style" ,
124
- " typing" ,
125
- ]
126
-
127
- [tool .black ]
128
- target-version = [" py38" ]
129
- line-length = 120
130
- skip-string-normalization = true
131
-
132
109
[tool .ruff ]
133
- target-version = " py38 "
110
+ target-version = " py311 "
134
111
line-length = 120
135
- select = [
136
- " A" ,
137
- " ARG" ,
138
- " B" ,
139
- " C" ,
140
- " DTZ" ,
141
- " E" ,
142
- " EM" ,
143
- " F" ,
144
- " FBT" ,
145
- " I" ,
146
- " ICN" ,
147
- " ISC" ,
148
- " N" ,
149
- " PLC" ,
150
- " PLE" ,
151
- " PLR" ,
152
- " PLW" ,
153
- " Q" ,
154
- " RUF" ,
155
- " S" ,
156
- " T" ,
157
- " TID" ,
158
- " UP" ,
159
- " W" ,
160
- " YTT" ,
112
+
113
+ [tool .ruff .lint ]
114
+ select = [" A" , " ARG" , " B" , " C" , " DTZ" , " E" , " EM" , " F" , " FBT" , " I" , " ICN" , " ISC" , " N" ,
115
+ " PLC" , " PLE" , " PLR" , " PLW" , " Q" , " RUF" , " S" , " T" , " TID" , " UP" , " W" , " YTT" ,
161
116
]
162
117
ignore = [
163
118
# Allow non-abstract empty methods in abstract base classes
@@ -168,33 +123,44 @@ ignore = [
168
123
" S105" , " S106" , " S107" ,
169
124
# Ignore complexity
170
125
" C901" , " PLR0911" , " PLR0912" , " PLR0913" , " PLR0915" ,
126
+ #
127
+ " E741" ,
128
+ # Allow relative imports
129
+ " TID252" ,
130
+ # Allow literals in exceptions
131
+ " EM101" , " EM102" ,
132
+ # Single quotes instead double
133
+ " Q000"
171
134
]
172
135
unfixable = [
173
136
# Don't touch unused imports
174
137
" F401" ,
138
+ # Don't change single quotes to double
139
+ " Q000"
175
140
]
141
+ exclude = [" *_pb2.py" , " *.pyi" , " tests/*" , " docs/*" , " personal/*" ]
176
142
177
- [tool .ruff .isort ]
178
- known-first-party = [" firebird.qa " ]
143
+ [tool .ruff .lint . isort ]
144
+ known-first-party = [" firebird.base " ]
179
145
180
- [tool .ruff .flake8-tidy-imports ]
146
+ [tool .ruff .lint . flake8-tidy-imports ]
181
147
ban-relative-imports = " all"
182
148
183
- [tool .ruff .per-file-ignores ]
149
+ [tool .ruff .lint . extend- per-file-ignores ]
184
150
# Tests can use magic values, assertions, and relative imports
185
151
"tests/**/*" = [" PLR2004" , " S101" , " TID252" ]
186
152
187
153
[tool .coverage .run ]
188
- source_pkgs = [" firebird.qa" , " tests " ]
154
+ source_pkgs = [" firebird.qa" ]
189
155
branch = true
190
156
parallel = true
191
157
omit = [
192
158
" src/firebird/qa/__about__.py" ,
193
159
]
194
160
195
161
[tool .coverage .paths ]
196
- firebird_qa = [" src/python " , " */python /src/firebird/qa" ]
197
- tests = [" tests" , " */python/tests " ]
162
+ firebird_qa = [" * /src/firebird/qa" ]
163
+ tests = [" tests" ]
198
164
199
165
[tool .coverage .report ]
200
166
exclude_lines = [
0 commit comments