Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: drop support for Python < 3.9 #1

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
fail-fast: false
matrix:
python-version:
- "pypy-3.8-v7.3.10"
- "pypy3.9"
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
name: "${{ matrix.os }} Python: ${{ matrix.python-version }}"
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ dist/
htmlcov/
*coverage*
.python-version
poetry.lock
.idea/
.vscode/
.tox/
1,846 changes: 1,846 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

46 changes: 22 additions & 24 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,32 @@ packages = [{include = "docformatter", from = "src"}]
include = ["LICENSE"]

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.9"
charset_normalizer = "^3.0.0"
tomli = {version = "^2.0.0", python = "<3.11", optional = true}
untokenize = "^0.1.1"

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
Sphinx = "^6.0.0"
tox = "<4.0.0"
twine = "^4.0.0"

[tool.poetry.group.testing.dependencies]
coverage = {extras = ["toml"], version = "^6.4.0"}
mock = "^4.0.0"
pytest = "^7.1.0"
pytest-cov = "^4.0.0"

[tool.poetry.group.linting.dependencies]
autopep8 = "^2.0.0"
black = "^22.0.0"
coverage = {extras = ["toml"], version = "^6.4.0"}
isort = "^5.10.0"
mock = "^4.0.0"
mypy = "0.991"
pycodestyle = "^2.8.0"
pydocstyle = "^6.1.1"
pylint = [
{version = "^2.12.0", python = "<3.7.2"},
{version = "^2.14.0", python = ">=3.7.2"},
]
pytest = "^7.1.0"
pytest-cov = "^4.0.0"
ruff = "^0.0.267"
pylint = "^2.14.0"
rstcheck = "^6.1.0"
tox = "<4.0.0"
Sphinx = [
{version = "5.3.0", python = "<3.8"},
{version = "^6.0.0", python = ">=3.8"},
]
twine = "^4.0.0"
ruff = "^0.0.267"

[tool.poetry.extras]
tomli = ["tomli"]
Expand Down Expand Up @@ -145,7 +143,7 @@ output = 'coverage.xml'

[tool.black]
line-length = 88
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
include = '\.pyi?$'
exclude = '''
/(
Expand Down Expand Up @@ -191,11 +189,11 @@ ignore_roles = [
legacy_tox_ini = """
[tox]
envlist =
py37
py38
py39
py310
py311
py312
py313
pypy3
coverage
style
Expand All @@ -205,12 +203,12 @@ skipsdist = true

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
pypy-3.8: pypy3
3.12: py312
3.13: py313
pypy-3.9: pypy3

[testenv]
description = run the test suite using pytest under {basepython}
Expand Down Expand Up @@ -255,7 +253,7 @@ commands =
coverage combine
coverage report -m
coverage xml -o {toxworkdir}/coverage.xml
depends = py37, py38, py39, py310, py311, pypy3
depends = py39, py310, py311, py312, py313, pypy3

[testenv:style]
description = run autoformatters and style checkers
Expand Down
6 changes: 3 additions & 3 deletions tests/_data/string_files/do_format_code.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ instring='''
CONST = 123

"""docstring for CONST."""
'''
'''
outstring='''
CONST = 123
"""docstring for CONST."""
Expand All @@ -50,7 +50,7 @@ instring='''
:cvar test_int: a class attribute.
..py.method: big_method()
"""
'''
'''
outstring='''
class TestClass:
"""This is a class docstring.
Expand All @@ -74,7 +74,7 @@ instring='''


"""This is a second class variable docstring."""
'''
'''
outstring='''
class TestClass:
"""This is a class docstring."""
Expand Down
14 changes: 7 additions & 7 deletions tests/test_docformatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,9 @@ class TestEndToEndPyproject:
"contents",
[
'''\
class TestFoo():
"""Docstring that should not have a pre-summary space."""
'''
class TestFoo():
""" Docstring that should not have a pre-summary space."""
'''
],
)
@pytest.mark.parametrize(
Expand Down Expand Up @@ -725,10 +725,10 @@ def test_no_pre_summary_space_using_pyproject(
See issue #119.
"""
assert '''\
@@ -1,3 +1,2 @@
class TestFoo():
"""Docstring that should not have a pre-summary space."""
-
@@ -1,2 +1,2 @@
class TestFoo():
- """ Docstring that should not have a pre-summary space."""
+ """Docstring that should not have a pre-summary space."""
''' == "\n".join(
run_docformatter.communicate()[0].decode().replace("\r", "").split("\n")[2:]
)
Expand Down
Loading