@@ -28,8 +28,32 @@ exclude_lines = [
2828 " raise NotImplementedError"
2929]
3030
31+ [tool .bumpversion ]
32+ current_version = " 1.1.1"
33+ commit = true
34+ message = " Release {new_version}"
35+ tag = true
36+ tag_message = " Release {new_version}"
37+
38+ [[tool .bumpversion .files ]]
39+ filename = " sedate/__init__.py"
40+ search = " __version__ = '{current_version}'"
41+ replace = " __version__ = '{new_version}'"
42+
43+ [[tool .bumpversion .files ]]
44+ filename = " HISTORY.rst"
45+ search = """
46+ ---------
47+ """
48+ replace = """
49+ ---------
50+
51+ {new_version} ({now:%d.%m.%Y})
52+ ~~~~~~~~~~~~~~~~~~~
53+ """
54+
3155[tool .mypy ]
32- python_version = 3.8
56+ python_version = 3.9
3357follow_imports = " silent"
3458warn_redundant_casts = true
3559warn_unreachable = true
@@ -38,27 +62,192 @@ disallow_any_generics = true
3862disallow_untyped_defs = true
3963mypy_path = " $MYPY_CONFIG_FILE_DIR"
4064
41- [[tool .mypy .overrides ]]
42- module = []
43- ignore_missing_imports = true
65+ [tool .ruff ]
66+ exclude = [
67+ " .bzr" ,
68+ " .direnv" ,
69+ " .eggs" ,
70+ " .git" ,
71+ " .git-rewrite" ,
72+ " .hg" ,
73+ " .ipynb_checkpoints" ,
74+ " .mypy_cache" ,
75+ " .nox" ,
76+ " .pants.d" ,
77+ " .pyenv" ,
78+ " .pytest_cache" ,
79+ " .pytype" ,
80+ " .ruff_cache" ,
81+ " .svn" ,
82+ " .tox" ,
83+ " .venv" ,
84+ " .vscode" ,
85+ " __pypackages__" ,
86+ " _build" ,
87+ " buck-out" ,
88+ " build" ,
89+ " dist" ,
90+ " node_modules" ,
91+ " site-packages" ,
92+ " venv" ,
93+ ]
94+ src = [" src" , " tests" ]
95+ include = [
96+ " pyproject.toml" ,
97+ " sedate/**/*.py" ,
98+ " tests/**/*.py" ,
99+ " stubs/**/*.pyi"
100+ ]
101+ line-length = 79
102+ indent-width = 4
103+ target-version = " py39"
104+
105+ [tool .ruff .lint ]
106+ select = [
107+ " B0" ,
108+ " B904" ,
109+ " B909" ,
110+ " C4" ,
111+ " COM818" ,
112+ " D2" ,
113+ " D301" ,
114+ " D4" ,
115+ " E" ,
116+ " F" ,
117+ " FLY002" ,
118+ " I002" ,
119+ " ISC" ,
120+ " N" ,
121+ " PERF" ,
122+ " PGH004" ,
123+ " PIE" ,
124+ " PYI" ,
125+ " Q" ,
126+ " RUF" ,
127+ " SIM" ,
128+ " SLOT" ,
129+ " UP" ,
130+ " W"
131+ ]
132+ ignore = [
133+ " B007" ,
134+ " C420" ,
135+ " D200" ,
136+ " D201" ,
137+ " D202" ,
138+ " D204" ,
139+ " D205" ,
140+ " D209" ,
141+ " D210" ,
142+ " D211" ,
143+ " D400" ,
144+ " D401" ,
145+ " D412" ,
146+ " E226" ,
147+ " E402" ,
148+ " E711" ,
149+ " E712" ,
150+ " E741" ,
151+ " N818" ,
152+ " PYI019" ,
153+ " PYI041" ,
154+ " RUF012" ,
155+ " RUF013" ,
156+ " RUF021" ,
157+ " RUF022" ,
158+ " RUF023" ,
159+ " RUF031" ,
160+ " RUF052" ,
161+ " RUF056" ,
162+ " SIM103" ,
163+ " SIM105" ,
164+ " SIM108" ,
165+ " SIM110" ,
166+ " SIM118" ,
167+ " SIM210" ,
168+ " SIM910" ,
169+ " UP009" ,
170+ " UP012" ,
171+ " UP032" ,
172+ " UP038" ,
173+ ]
174+ unfixable = []
175+ external = [" TC" ]
176+ allowed-confusables = [" ×" ]
177+ preview = true
178+
179+ [tool .ruff .lint .extend-per-file-ignores ]
180+ "tests/**/*.py" = [
181+ " C4" ,
182+ " D" ,
183+ " FLY002" ,
184+ " I002" ,
185+ " ISC" ,
186+ " N" ,
187+ " Q" ,
188+ " PERF" ,
189+ " PGH" ,
190+ " PIE" ,
191+ " PYI" ,
192+ " RUF" ,
193+ " SIM" ,
194+ " UP" ,
195+ ]
196+
197+ [tool .ruff .lint .isort ]
198+ required-imports = [" from __future__ import annotations" ]
199+
200+ [tool .ruff .lint .pep8-naming ]
201+ extend-ignore-names = [
202+ " afterFlowable" ,
203+ " HSTORE" ,
204+ " sortKey" ,
205+ " URL" ,
206+ " UUID"
207+ ]
208+ classmethod-decorators = [
209+ # NOTE: We can potentially get rid some of these with SQLAlchemy 2.0
210+ # since they should cleanly combine with classmethod
211+ " declared_attr" ,
212+ " expression" ,
213+ " comparator" ,
214+ ]
215+
216+ [tool .ruff .lint .pydocstyle ]
217+ convention = " pep257"
218+ ignore-decorators = [" typing.overload" ]
219+
220+ [tool .ruff .lint .flake8-quotes ]
221+ avoid-escape = true
222+ docstring-quotes = " double"
223+ inline-quotes = " single"
224+ multiline-quotes = " double"
225+
226+ [tool .ruff .format ]
227+ quote-style = " single"
228+ indent-style = " space"
229+ skip-magic-trailing-comma = false
230+ line-ending = " lf"
231+ docstring-code-format = true
232+ docstring-code-line-length = " dynamic"
44233
45234[tool .tox ]
46235legacy_tox_ini = """
47236[tox]
48237isolated_build = True
49- envlist = py37,py38, py39,py310,lint,bandit,mypy
238+ envlist = py39,py310,py311,py312,py313 ,lint,bandit,mypy
50239
51240[gh-actions]
52241python =
53- 3.8: py38,flake8,bandit,mypy
54242 3.9: py39
55243 3.10: py310
56- 3.11: py310
57- 3.12: py310
244+ 3.11: py311,flake8,bandit,mypy
245+ 3.12: py312
246+ 3.13: py313
58247
59248[testenv]
60249setenv =
61- py{38, 39,310,311,312}: COVERAGE_FILE = .coverage.{envname}
250+ py{39,310,311,312,313 }: COVERAGE_FILE = .coverage.{envname}
62251deps =
63252 coverage[toml]
64253 pytest
@@ -67,20 +256,29 @@ deps =
67256commands = py.test --cov={envsitepackagesdir}/sedate --cov-report= {posargs}
68257
69258[testenv:lint]
70- basepython = python3.8
259+ basepython = python3.11
71260deps =
72261 flake8
73- commands = flake8 sedate/ tests/
262+ flake8-type-checking
263+ ruff
264+ commands =
265+ ruff check
266+ flake8 sedate/ tests/
74267
75268[testenv:mypy]
76- basepython = python3.8
269+ basepython = python3.11
77270deps =
78271 mypy
79272 types-pytz
80- commands = mypy -p sedate
273+ commands =
274+ mypy -p sedate --python-version 3.9
275+ mypy -p sedate --python-version 3.10
276+ mypy -p sedate --python-version 3.11
277+ mypy -p sedate --python-version 3.12
278+ mypy -p sedate --python-version 3.13
81279
82280[testenv:bandit]
83- basepython = python3.8
281+ basepython = python3.11
84282deps =
85283 bandit[toml]
86284commands = bandit -q -c pyproject.toml -r sedate/
0 commit comments