Skip to content

Commit f08753c

Browse files
style: pre-commit fixes
1 parent 42bee9c commit f08753c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/validate_pyproject/formats.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def _download_classifiers() -> str:
164164
_TIMEOUT = 10 # seconds; avoids hanging indefinitely in pre-commit hooks
165165
url = "https://pypi.org/pypi?:action=list_classifiers"
166166
context = ssl.create_default_context()
167-
with urlopen(url, context=context, timeout=_TIMEOUT) as response: # noqa: S310 (audit URLs)
167+
with urlopen(url, context=context, timeout=_TIMEOUT) as response:
168168
headers = Message()
169169
headers["content_type"] = response.getheader("content-type", "text/plain")
170170
return response.read().decode(headers.get_param("charset", "utf-8")) # type: ignore[no-any-return]
@@ -178,7 +178,7 @@ class _TroveClassifier:
178178
option (classifiers will be validated anyway during the upload to PyPI).
179179
"""
180180

181-
downloaded: None | Literal[False] | set[str]
181+
downloaded: Literal[False] | set[str] | None
182182
"""
183183
None => not cached yet
184184
False => unavailable

tools/cache_urls_for_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
sys.path.insert(0, str(PROJECT / "src")) # <-- Use development version of library
1313
logging.basicConfig(level=logging.DEBUG)
1414

15-
from validate_pyproject import caching, http # noqa: E402
15+
from validate_pyproject import caching, http
1616

1717
SCHEMA_STORE = "https://json.schemastore.org/pyproject.json"
1818

0 commit comments

Comments
 (0)