Skip to content

Commit 4cf1ea5

Browse files
authored
release: v1.7.6 (#305)
* release: prepare for release of v1.7.6 * chore: update workflow files to remove Python<3.9 and add 3.12 * chore: update version strings
1 parent eb1df34 commit 4cf1ea5

File tree

8 files changed

+19
-22
lines changed

8 files changed

+19
-22
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,18 @@ jobs:
1414
matrix:
1515
python-version:
1616
- "pypy-3.8-v7.3.10"
17+
- "3.12"
1718
- "3.11"
1819
- "3.10"
1920
- "3.9"
20-
- "3.8"
21-
- "3.7"
2221
os: [ubuntu-latest]
2322
runs-on: ${{ matrix.os }}
2423
name: "${{ matrix.os }} Python: ${{ matrix.python-version }}"
2524
steps:
2625
- name: Setup Python for tox
2726
uses: actions/setup-python@v4
2827
with:
29-
python-version: "3.11"
28+
python-version: "3.12"
3029
- name: Install tox
3130
run: python -m pip install tox tox-gh-actions
3231
- uses: actions/checkout@v3

.github/workflows/do-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup Python for linting
1616
uses: actions/setup-python@v4
1717
with:
18-
python-version: "3.11"
18+
python-version: "3.12"
1919
- name: Install tox
2020
run: python -m pip install tox tox-gh-actions
2121
- uses: actions/checkout@v3

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
project = "docformatter"
1212
copyright = "2022-2023, Steven Myint"
1313
author = "Steven Myint"
14-
release = "1.7.5"
14+
release = "1.7.6"
1515

1616
# -- General configuration ---------------------------------------------------
1717
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

pyproject.toml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "docformatter"
3-
version = "1.7.5"
3+
version = "1.7.6"
44
description = "Formats docstrings to follow PEP 257"
55
authors = ["Steven Myint"]
66
maintainers = [
@@ -18,11 +18,10 @@ classifiers=[
1818
'Intended Audience :: Developers',
1919
'Environment :: Console',
2020
'Programming Language :: Python :: 3',
21-
'Programming Language :: Python :: 3.7',
22-
'Programming Language :: Python :: 3.8',
2321
'Programming Language :: Python :: 3.9',
2422
'Programming Language :: Python :: 3.10',
2523
'Programming Language :: Python :: 3.11',
24+
'Programming Language :: Python :: 3.12',
2625
'Programming Language :: Python :: Implementation',
2726
'Programming Language :: Python :: Implementation :: PyPy',
2827
'Programming Language :: Python :: Implementation :: CPython',
@@ -37,7 +36,7 @@ charset_normalizer = "^3.0.0"
3736
tomli = {version = "^2.0.0", python = "<3.11", optional = true}
3837
untokenize = "^0.1.1"
3938

40-
[tool.poetry.dev-dependencies]
39+
[poetry.group.dev-dependencies]
4140
autopep8 = "^2.0.0"
4241
black = "^22.0.0"
4342
coverage = {extras = ["toml"], version = "^6.4.0"}
@@ -145,7 +144,7 @@ output = 'coverage.xml'
145144

146145
[tool.black]
147146
line-length = 88
148-
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
147+
target-version = ['py38', 'py39', 'py310', 'py311']
149148
include = '\.pyi?$'
150149
exclude = '''
151150
/(
@@ -191,11 +190,10 @@ ignore_roles = [
191190
legacy_tox_ini = """
192191
[tox]
193192
envlist =
194-
py37
195-
py38
196193
py39
197194
py310
198195
py311
196+
py312
199197
pypy3
200198
coverage
201199
style
@@ -205,12 +203,11 @@ skipsdist = true
205203
206204
[gh-actions]
207205
python =
208-
3.7: py37
209-
3.8: py38
210206
3.9: py39
211207
3.10: py310
212208
3.11: py311
213-
pypy-3.8: pypy3
209+
3.12: py312
210+
pypy-3.10: pypy3
214211
215212
[testenv]
216213
description = run the test suite using pytest under {basepython}
@@ -255,7 +252,7 @@ commands =
255252
coverage combine
256253
coverage report -m
257254
coverage xml -o {toxworkdir}/coverage.xml
258-
depends = py37, py38, py39, py310, py311, pypy3
255+
depends = py39, py310, py311, py312, pypy3
259256
260257
[testenv:style]
261258
description = run autoformatters and style checkers

src/docformatter/__pkginfo__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
# SOFTWARE.
2424
"""Package information for docformatter."""
2525

26-
__version__ = "1.7.5"
26+
__version__ = "1.7.6"

src/docformatter/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def _do_format_code(self, source):
334334

335335
return _strings.normalize_line_endings(
336336
_code.splitlines(True), _original_newline
337-
)
337+
).rstrip(" ")
338338
except (tokenize.TokenError, IndentationError):
339339
return source
340340

src/docformatter/strings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def normalize_line(line: str, newline: str) -> str:
101101
The supplied line with line endings replaced by the newline.
102102
"""
103103
stripped = line.rstrip("\n\r")
104+
104105
return stripped + newline if stripped != line else line
105106

106107

tests/_data/string_files/do_format_code.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,14 @@ outstring='''def pytest_addoption(parser: pytest.Parser) -> "
151151
'''
152152

153153
[issue_97_2]
154-
instring='''def pytest_addoption(parser: pytest.Parser) ->
154+
instring='''def pytest_addoption(parser: pytest.Parser) ->
155155
None: # pragma: no cover
156-
156+
157157
register_toggle.pytest_addoption(parser)
158158
'''
159-
outstring='''def pytest_addoption(parser: pytest.Parser) ->
159+
outstring='''def pytest_addoption(parser: pytest.Parser) ->
160160
None: # pragma: no cover
161-
161+
162162
register_toggle.pytest_addoption(parser)
163163
'''
164164

0 commit comments

Comments
 (0)