Skip to content

Commit c8b5741

Browse files
A round of ruff format after ruff check --fix
1 parent 96cab0a commit c8b5741

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

pkg_resources/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ class _LoaderProtocol(Protocol):
126126
def load_module(self, fullname: str, /) -> types.ModuleType: ...
127127

128128

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

131133

132134
class PEP440Warning(RuntimeWarning):

setuptools/_normalization.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
_VALID_NAME = re.compile(r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.IGNORECASE)
1212
_UNSAFE_NAME_CHARS = re.compile(r"[^A-Z0-9._-]+", re.IGNORECASE)
1313
_NON_ALPHANUMERIC = re.compile(r"[^A-Z0-9]+", re.IGNORECASE)
14-
_PEP440_FALLBACK = re.compile(r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.IGNORECASE)
14+
_PEP440_FALLBACK = re.compile(
15+
r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.IGNORECASE
16+
)
1517

1618

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

setuptools/config/_validate_pyproject/formats.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
(?:\+(?P<local>[a-z0-9]+(?:[-_\.][a-z0-9]+)*))? # local version
5555
"""
5656

57-
VERSION_REGEX = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)
57+
VERSION_REGEX = re.compile(
58+
r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE
59+
)
5860

5961

6062
def pep440(version: str) -> bool:
@@ -260,7 +262,9 @@ def url(value: str) -> bool:
260262
ENTRYPOINT_PATTERN = r"[^\[\s=]([^=]*[^\s=])?"
261263
ENTRYPOINT_REGEX = re.compile(f"^{ENTRYPOINT_PATTERN}$", re.IGNORECASE)
262264
RECOMMEDED_ENTRYPOINT_PATTERN = r"[\w.-]+"
263-
RECOMMEDED_ENTRYPOINT_REGEX = re.compile(f"^{RECOMMEDED_ENTRYPOINT_PATTERN}$", re.IGNORECASE)
265+
RECOMMEDED_ENTRYPOINT_REGEX = re.compile(
266+
f"^{RECOMMEDED_ENTRYPOINT_PATTERN}$", re.IGNORECASE
267+
)
264268
ENTRYPOINT_GROUP_PATTERN = r"\w+(\.\w+)*"
265269
ENTRYPOINT_GROUP_REGEX = re.compile(f"^{ENTRYPOINT_GROUP_PATTERN}$", re.IGNORECASE)
266270

setuptools/package_index.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ def wrapper(*args, **kwargs):
213213
return wrapper
214214

215215

216-
REL = re.compile(r"""<([^>]*\srel\s{0,10}=\s{0,10}['"]?([^'" >]+)[^>]*)>""", re.IGNORECASE)
216+
REL = re.compile(
217+
r"""<([^>]*\srel\s{0,10}=\s{0,10}['"]?([^'" >]+)[^>]*)>""", re.IGNORECASE
218+
)
217219
"""
218220
Regex for an HTML tag with 'rel="val"' attributes.
219221
"""

setuptools/tests/config/test_pyprojecttoml.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ def test_invalid_example(tmp_path, example, error_msg):
326326
pyproject = tmp_path / "pyproject.toml"
327327
pyproject.write_text(cleandoc(example), encoding="utf-8")
328328

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

0 commit comments

Comments
 (0)