@@ -7,7 +7,7 @@ name = "firebird-butler-protobuf"
77dynamic = [" version" ]
88description = ' Firebird Butler protocol buffers'
99readme = " README.md"
10- requires-python = " >=3.8 "
10+ requires-python = " >=3.11 "
1111license = { file = " LICENSE" }
1212keywords = [" Firebird" , " Butler" , " protobuf" ]
1313authors = [
@@ -18,17 +18,16 @@ classifiers = [
1818 " Intended Audience :: Developers" ,
1919 " License :: OSI Approved :: MIT License" ,
2020 " Programming Language :: Python :: 3 :: Only" ,
21- " Programming Language :: Python :: 3.8" ,
22- " Programming Language :: Python :: 3.9" ,
23- " Programming Language :: Python :: 3.10" ,
2421 " Programming Language :: Python :: 3.11" ,
22+ " Programming Language :: Python :: 3.12" ,
23+ " Programming Language :: Python :: 3.13" ,
2524 " Operating System :: POSIX :: Linux" ,
2625 " Operating System :: Microsoft :: Windows" ,
2726 " Operating System :: MacOS" ,
2827 " Topic :: Software Development" ,
2928]
3029dependencies = [
31- " protobuf>=4.23.4 " ,
30+ " protobuf~=5.29 " ,
3231]
3332
3433[project .urls ]
@@ -52,95 +51,46 @@ include = ["src"]
5251[tool .hatch .build .targets .wheel ]
5352packages = [" src/firebird" ]
5453
55- [tool .hatch .envs .test ]
54+ [tool .hatch .metadata ]
55+ allow-direct-references = true
56+
57+ [tool .hatch .envs .default ]
58+ dependencies = [
59+ ]
60+
61+ [tool .hatch .envs .hatch-test ]
62+ extra-args = [" -vv" ]
5663dependencies = [
5764 " coverage[toml]>=6.5" ,
5865 " pytest" ,
5966]
60- [tool .hatch .envs .test .scripts ]
61- test = " pytest {args:tests}"
62- test-cov = " coverage run -m pytest {args:tests}"
63- cov-report = [
64- " - coverage combine" ,
65- " coverage report" ,
66- ]
67- cov = [
68- " test-cov" ,
69- " cov-report" ,
70- ]
71- version = " python --version"
7267
73- [[tool .hatch .envs .test .matrix ]]
74- python = [" 3.8 " , " 3.9 " , " 3.10 " , " 3.11 " ]
68+ [[tool .hatch .envs .hatch- test .matrix ]]
69+ python = [" 3.11 " , " 3.12 " , " 3.13 " ]
7570
7671[tool .hatch .envs .doc ]
7772detached = false
7873platforms = [" linux" ]
7974dependencies = [
80- " Sphinx>=7.1 " ,
75+ " Sphinx==7.2.6 " ,
8176 " sphinx-bootstrap-theme>=0.8.1" ,
8277 " sphinx-autodoc-typehints>=1.24.0" ,
78+ " doc2dash>=3.0.0"
8379]
8480[tool .hatch .envs .doc .scripts ]
8581build = " cd docs ; make html"
86-
87- [tool .hatch .envs .lint ]
88- detached = true
89- dependencies = [
90- " black>=23.1.0" ,
91- " mypy>=1.0.0" ,
92- " ruff>=0.0.243" ,
93- ]
94- [tool .hatch .envs .lint .scripts ]
95- typing = " mypy --install-types --non-interactive {args:src/firebird/uuid tests}"
96- style = [
97- " ruff {args:.}" ,
98- " black --check --diff {args:.}" ,
99- ]
100- fmt = [
101- " black {args:.}" ,
102- " ruff --fix {args:.}" ,
103- " style" ,
104- ]
105- all = [
106- " style" ,
107- " typing" ,
82+ docset = [
83+ " cd docs ; doc2dash -u https://firebird-butler.readthedocs.io/en/latest/ -f -i ./_static/fb-favicon.png -n firebird-butler ./_build/html/" ,
84+ " cd docs; VERSION=`hatch version` ; tar --exclude='.DS_Store' -cvzf ../dist/firebird-butler-$VERSION-docset.tgz firebird-butler.docset" ,
10885]
10986
110- [tool .black ]
111- target-version = [" py38" ]
112- line-length = 120
113- skip-string-normalization = true
114-
11587[tool .ruff ]
116- target-version = " py38 "
88+ target-version = " py311 "
11789line-length = 120
118- select = [
119- " A" ,
120- " ARG" ,
121- " B" ,
122- " C" ,
123- " DTZ" ,
124- " E" ,
125- " EM" ,
126- " F" ,
127- " FBT" ,
128- " I" ,
129- " ICN" ,
130- " ISC" ,
131- " N" ,
132- " PLC" ,
133- " PLE" ,
134- " PLR" ,
135- " PLW" ,
136- " Q" ,
137- " RUF" ,
138- " S" ,
139- " T" ,
140- " TID" ,
141- " UP" ,
142- " W" ,
143- " YTT" ,
90+
91+ [tool .ruff .lint ]
92+ select = [" A" , " ARG" , " B" , " C" , " DTZ" , " E" , " EM" , " F" , " FBT" , " I" , " ICN" , " ISC" , " N" ,
93+ " PLC" , " PLE" , " PLR" , " PLW" , " Q" , " RUF" , " S" , " T" , " TID" , " UP" , " W" , " YTT" ,
14494]
14595ignore = [
14696 # Allow non-abstract empty methods in abstract base classes
@@ -151,32 +101,43 @@ ignore = [
151101 " S105" , " S106" , " S107" ,
152102 # Ignore complexity
153103 " C901" , " PLR0911" , " PLR0912" , " PLR0913" , " PLR0915" ,
104+ #
105+ " E741" ,
106+ # Allow relative imports
107+ " TID252" ,
108+ # Allow literals in exceptions
109+ " EM101" , " EM102" ,
110+ # Single quotes instead double
111+ " Q000"
154112]
155113unfixable = [
156114 # Don't touch unused imports
157115 " F401" ,
116+ # Don't change single quotes to double
117+ " Q000"
158118]
119+ exclude = [" *_pb2.py" , " *.pyi" , " tests/*" , " docs/*" , " personal/*" ]
159120
160- [tool .ruff .isort ]
161- known-first-party = [" firebird.uuid " ]
121+ [tool .ruff .lint . isort ]
122+ known-first-party = [" firebird.butler " ]
162123
163- [tool .ruff .flake8-tidy-imports ]
124+ [tool .ruff .lint . flake8-tidy-imports ]
164125ban-relative-imports = " all"
165126
166- [tool .ruff .per-file-ignores ]
127+ [tool .ruff .lint . extend- per-file-ignores ]
167128# Tests can use magic values, assertions, and relative imports
168129"tests/**/*" = [" PLR2004" , " S101" , " TID252" ]
169130
170131[tool .coverage .run ]
171- source_pkgs = [" firebird.uuid " , " tests" ]
132+ source_pkgs = [" firebird.butler " , " tests" ]
172133branch = true
173134parallel = true
174135omit = [
175- " src/firebird/uuid /__about__.py" ,
136+ " src/firebird/butler /__about__.py" ,
176137]
177138
178139[tool .coverage .paths ]
179- firebird_uuid = [" src/python " , " */python/src/firebird/uuid " ]
140+ firebird_butler = [" */python/src/firebird/butler " ]
180141tests = [" tests" , " */python/tests" ]
181142
182143[tool .coverage .report ]
0 commit comments