Skip to content

Commit e78eed6

Browse files
feat: drop supporting Python < 3.9 (#296)
* feat: drop support for Python < 3.9 Added CI pipelines for Pyton 3.12, 3.13 * chore: add poetry.lock for reproducible dev environment --------- Co-authored-by: Doyle Rowland <doyle.rowland@reliaqual.com>
1 parent 1e76252 commit e78eed6

6 files changed

Lines changed: 1878 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
python-version:
16-
- "pypy-3.8-v7.3.10"
16+
- "pypy3.9"
17+
- "3.13"
1718
- "3.12"
1819
- "3.11"
1920
- "3.10"

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dist/
1313
htmlcov/
1414
*coverage*
1515
.python-version
16-
poetry.lock
1716
.idea/
1817
.vscode/
1918
.tox/

poetry.lock

Lines changed: 1846 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,32 @@ packages = [{include = "docformatter", from = "src"}]
3131
include = ["LICENSE"]
3232

3333
[tool.poetry.dependencies]
34-
python = "^3.7"
34+
python = "^3.9"
3535
charset_normalizer = "^3.0.0"
3636
tomli = {version = "^2.0.0", python = "<3.11", optional = true}
3737
untokenize = "^0.1.1"
3838

39-
[poetry.group.dev-dependencies]
39+
[tool.poetry.group.dev.dependencies]
40+
Sphinx = "^6.0.0"
41+
tox = "<4.0.0"
42+
twine = "^4.0.0"
43+
44+
[tool.poetry.group.testing.dependencies]
45+
coverage = {extras = ["toml"], version = "^6.4.0"}
46+
mock = "^4.0.0"
47+
pytest = "^7.1.0"
48+
pytest-cov = "^4.0.0"
49+
50+
[tool.poetry.group.linting.dependencies]
4051
autopep8 = "^2.0.0"
4152
black = "^22.0.0"
42-
coverage = {extras = ["toml"], version = "^6.4.0"}
4353
isort = "^5.10.0"
44-
mock = "^4.0.0"
4554
mypy = "0.991"
4655
pycodestyle = "^2.8.0"
4756
pydocstyle = "^6.1.1"
48-
pylint = [
49-
{version = "^2.12.0", python = "<3.7.2"},
50-
{version = "^2.14.0", python = ">=3.7.2"},
51-
]
52-
pytest = "^7.1.0"
53-
pytest-cov = "^4.0.0"
54-
ruff = "^0.0.267"
57+
pylint = "^2.14.0"
5558
rstcheck = "^6.1.0"
56-
tox = "<4.0.0"
57-
Sphinx = [
58-
{version = "5.3.0", python = "<3.8"},
59-
{version = "^6.0.0", python = ">=3.8"},
60-
]
61-
twine = "^4.0.0"
59+
ruff = "^0.0.267"
6260

6361
[tool.poetry.extras]
6462
tomli = ["tomli"]
@@ -144,7 +142,7 @@ output = 'coverage.xml'
144142

145143
[tool.black]
146144
line-length = 88
147-
target-version = ['py38', 'py39', 'py310', 'py311']
145+
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
148146
include = '\.pyi?$'
149147
exclude = '''
150148
/(
@@ -194,6 +192,7 @@ envlist =
194192
py310
195193
py311
196194
py312
195+
py313
197196
pypy3
198197
coverage
199198
style
@@ -207,7 +206,8 @@ python =
207206
3.10: py310
208207
3.11: py311
209208
3.12: py312
210-
pypy-3.10: pypy3
209+
3.13: py313
210+
pypy-3.9: pypy3
211211
212212
[testenv]
213213
description = run the test suite using pytest under {basepython}
@@ -252,7 +252,7 @@ commands =
252252
coverage combine
253253
coverage report -m
254254
coverage xml -o {toxworkdir}/coverage.xml
255-
depends = py39, py310, py311, py312, pypy3
255+
depends = py39, py310, py311, py312, py313, pypy3
256256
257257
[testenv:style]
258258
description = run autoformatters and style checkers

tests/_data/string_files/do_format_code.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ instring='''
3737
CONST = 123
3838
3939
"""docstring for CONST."""
40-
'''
40+
'''
4141
outstring='''
4242
CONST = 123
4343
"""docstring for CONST."""
@@ -50,7 +50,7 @@ instring='''
5050
:cvar test_int: a class attribute.
5151
..py.method: big_method()
5252
"""
53-
'''
53+
'''
5454
outstring='''
5555
class TestClass:
5656
"""This is a class docstring.
@@ -74,7 +74,7 @@ instring='''
7474
7575
7676
"""This is a second class variable docstring."""
77-
'''
77+
'''
7878
outstring='''
7979
class TestClass:
8080
"""This is a class docstring."""

tests/test_docformatter.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,9 @@ class TestEndToEndPyproject:
688688
"contents",
689689
[
690690
'''\
691-
class TestFoo():
692-
"""Docstring that should not have a pre-summary space."""
693-
'''
691+
class TestFoo():
692+
""" Docstring that should not have a pre-summary space."""
693+
'''
694694
],
695695
)
696696
@pytest.mark.parametrize(
@@ -725,10 +725,10 @@ def test_no_pre_summary_space_using_pyproject(
725725
See issue #119.
726726
"""
727727
assert '''\
728-
@@ -1,3 +1,2 @@
729-
class TestFoo():
730-
"""Docstring that should not have a pre-summary space."""
731-
-
728+
@@ -1,2 +1,2 @@
729+
class TestFoo():
730+
- """ Docstring that should not have a pre-summary space."""
731+
+ """Docstring that should not have a pre-summary space."""
732732
''' == "\n".join(
733733
run_docformatter.communicate()[0].decode().replace("\r", "").split("\n")[2:]
734734
)

0 commit comments

Comments
 (0)