Skip to content

Commit 3c4b1fe

Browse files
authored
Merge branch 'master' into fix/encoding-detection
2 parents 4465d1a + 543ba0e commit 3c4b1fe

File tree

9 files changed

+38
-39
lines changed

9 files changed

+38
-39
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

CHANGELOG.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## [v1.7.6](https://github.com/PyCQA/docformatter/tree/v1.7.6) (2025-05-07)
4+
5+
[Full Changelog](https://github.com/PyCQA/docformatter/compare/v1.7.5...v1.7.6)
6+
7+
Features
8+
9+
- prefer new unittest.mock from the standard library [\#280](https://github.com/PyCQA/docformatter/pull/280) ([a-detiste](https://github.com/a-detiste))
10+
- Handle abbreviation 'etc.' \(et cetera\) [\#273](https://github.com/PyCQA/docformatter/pull/273) ([knedlsepp](https://github.com/knedlsepp))
11+
12+
Bug Fixes
13+
14+
- Do not double-process urls [\#284](https://github.com/PyCQA/docformatter/pull/284) ([lilatomic](https://github.com/lilatomic))
15+
16+
**Merged pull requests:**
17+
18+
- Fix pre-commit syntax [\#266](https://github.com/PyCQA/docformatter/pull/266) ([jonashaag](https://github.com/jonashaag))
19+
- Update version listed in documentation's Pre-Commit example [\#262](https://github.com/PyCQA/docformatter/pull/262) ([korverdev](https://github.com/korverdev))
20+
- Add missing comma in requirements table [\#261](https://github.com/PyCQA/docformatter/pull/261) ([EFord36](https://github.com/EFord36))
21+
322
## [v1.7.5](https://github.com/PyCQA/docformatter/tree/v1.7.5) (2023-07-12)
423

524
[Full Changelog](https://github.com/PyCQA/docformatter/compare/v1.7.4...v1.7.5)
@@ -122,27 +141,10 @@ Bug Fixes
122141

123142
[Full Changelog](https://github.com/PyCQA/docformatter/compare/v1.6.0...v1.6.1)
124143

125-
Bug Fixes
126-
127-
- fix: remove blank lines after line beginning with 'def' [\#171](https://github.com/PyCQA/docformatter/pull/171) ([weibullguy](https://github.com/weibullguy))
128-
129144
## [v1.6.0](https://github.com/PyCQA/docformatter/tree/v1.6.0) (2023-04-04)
130145

131146
[Full Changelog](https://github.com/PyCQA/docformatter/compare/v1.5.1...v1.6.0)
132147

133-
Features
134-
135-
- \(🎁\) Support python 3.11 [\#164](https://github.com/PyCQA/docformatter/pull/164) ([KotlinIsland](https://github.com/KotlinIsland))
136-
137-
Bug Fixes
138-
139-
- fix: update URL handling functions [\#152](https://github.com/PyCQA/docformatter/pull/152) ([weibullguy](https://github.com/weibullguy))
140-
141-
**Merged pull requests:**
142-
143-
- docs: clarify future arguments [\#168](https://github.com/PyCQA/docformatter/pull/168) ([weibullguy](https://github.com/weibullguy))
144-
- chore: update GitHub action workflows [\#153](https://github.com/PyCQA/docformatter/pull/153) ([weibullguy](https://github.com/weibullguy))
145-
146148
## [v1.5.1](https://github.com/PyCQA/docformatter/tree/v1.5.1) (2022-12-16)
147149

148150
[Full Changelog](https://github.com/PyCQA/docformatter/compare/v1.5.0...v1.5.1)

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)