Skip to content

Commit 573bee1

Browse files
Apply ruff/flake8-implicit-str-concat rule ISC001
- Revert to multiline strings, as before #255 / ac2fee8. - Guard the multiline strings from black (and now ruff) unfolding them back to a single line. https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/
1 parent bb33eb7 commit 573bee1

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

testing/test_mercurial.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,22 @@ def test_version_from_archival(wd: WorkDir) -> None:
115115
# entrypoints are unordered,
116116
# cleaning the wd ensure this test won't break randomly
117117
wd.cwd.joinpath(".hg").rename(wd.cwd / ".nothg")
118-
wd.write(".hg_archival.txt", "node: 000000000000\n" "tag: 0.1\n")
118+
wd.write(
119+
".hg_archival.txt",
120+
"""\
121+
node: 000000000000
122+
tag: 0.1
123+
""",
124+
)
119125
assert wd.get_version() == "0.1"
120126

121127
wd.write(
122128
".hg_archival.txt",
123-
"node: 000000000000\n" "latesttag: 0.1\n" "latesttagdistance: 3\n",
129+
"""\
130+
node: 000000000000
131+
latesttag: 0.1
132+
latesttagdistance: 3
133+
""",
124134
)
125135

126136
assert wd.get_version() == "0.2.dev3+h000000000000"

testing/test_regressions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ def test_pkginfo_noscmroot(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> N
3535

3636
tmp_path.joinpath(".git").mkdir()
3737
p.joinpath("setup.py").write_text(
38-
"from setuptools import setup;" 'setup(use_scm_version={"root": ".."})',
38+
"""\
39+
from setuptools import setup
40+
setup(use_scm_version={"root": ".."})
41+
""",
3942
encoding="utf-8",
4043
)
4144

0 commit comments

Comments
 (0)