Skip to content

Commit

Permalink
Apply ruff/flake8-implicit-str-concat rule ISC001
Browse files Browse the repository at this point in the history
- 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/
  • Loading branch information
DimitriPapadopoulos committed May 9, 2024
1 parent bb33eb7 commit 573bee1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
14 changes: 12 additions & 2 deletions testing/test_mercurial.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,22 @@ def test_version_from_archival(wd: WorkDir) -> None:
# entrypoints are unordered,
# cleaning the wd ensure this test won't break randomly
wd.cwd.joinpath(".hg").rename(wd.cwd / ".nothg")
wd.write(".hg_archival.txt", "node: 000000000000\n" "tag: 0.1\n")
wd.write(
".hg_archival.txt",
"""\
node: 000000000000
tag: 0.1
""",
)
assert wd.get_version() == "0.1"

wd.write(
".hg_archival.txt",
"node: 000000000000\n" "latesttag: 0.1\n" "latesttagdistance: 3\n",
"""\
node: 000000000000
latesttag: 0.1
latesttagdistance: 3
""",
)

assert wd.get_version() == "0.2.dev3+h000000000000"
Expand Down
5 changes: 4 additions & 1 deletion testing/test_regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ def test_pkginfo_noscmroot(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> N

tmp_path.joinpath(".git").mkdir()
p.joinpath("setup.py").write_text(
"from setuptools import setup;" 'setup(use_scm_version={"root": ".."})',
"""\
from setuptools import setup
setup(use_scm_version={"root": ".."})
""",
encoding="utf-8",
)

Expand Down

0 comments on commit 573bee1

Please sign in to comment.