Skip to content

Commit 608cf49

Browse files
A round of ruff format after ruff check --fix
1 parent f428f12 commit 608cf49

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

pkg_resources/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ class _ZipLoaderModule(Protocol):
128128
__loader__: zipimport.zipimporter
129129

130130

131-
_PEP440_FALLBACK = re.compile(r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.IGNORECASE)
131+
_PEP440_FALLBACK = re.compile(
132+
r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.IGNORECASE
133+
)
132134

133135

134136
class PEP440Warning(RuntimeWarning):

setuptools/_normalization.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
_VALID_NAME = re.compile(r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.IGNORECASE)
1313
_UNSAFE_NAME_CHARS = re.compile(r"[^A-Z0-9._-]+", re.IGNORECASE)
1414
_NON_ALPHANUMERIC = re.compile(r"[^A-Z0-9]+", re.IGNORECASE)
15-
_PEP440_FALLBACK = re.compile(r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.IGNORECASE)
15+
_PEP440_FALLBACK = re.compile(
16+
r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.IGNORECASE
17+
)
1618

1719

1820
def safe_identifier(name: str) -> str:

setuptools/tests/config/test_apply_pyprojecttoml.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def _mock_expand_patterns(patterns, *_, **__):
4141
Allow comparing the given patterns for 2 dist objects.
4242
We need to strip special chars to avoid errors when validating.
4343
"""
44-
return [re.sub("[^a-z0-9]+", "", p, flags=re.IGNORECASE) or "empty" for p in patterns]
44+
return [
45+
re.sub("[^a-z0-9]+", "", p, flags=re.IGNORECASE) or "empty" for p in patterns
46+
]
4547

4648

4749
@pytest.mark.parametrize("url", urls_from_file(HERE / EXAMPLES_FILE))

setuptools/tests/config/test_pyprojecttoml.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ def test_invalid_example(tmp_path, example, error_msg):
325325
pyproject = tmp_path / "pyproject.toml"
326326
pyproject.write_text(cleandoc(example), encoding="utf-8")
327327

328-
pattern = re.compile(f"invalid pyproject.toml.*{error_msg}.*", re.MULTILINE | re.DOTALL)
328+
pattern = re.compile(
329+
f"invalid pyproject.toml.*{error_msg}.*", re.MULTILINE | re.DOTALL
330+
)
329331
with pytest.raises(ValueError, match=pattern):
330332
read_configuration(pyproject)
331333

0 commit comments

Comments
 (0)