Skip to content

Commit 8d813a3

Browse files
authored
Merge branch 'master' into drop-python38
2 parents 19b3ef1 + 543ba0e commit 8d813a3

File tree

9 files changed

+31
-29
lines changed

9 files changed

+31
-29
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup Python for tox
2727
uses: actions/setup-python@v4
2828
with:
29-
python-version: "3.11"
29+
python-version: "3.12"
3030
- name: Install tox
3131
run: python -m pip install tox tox-gh-actions
3232
- 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: 2 additions & 3 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',

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)