mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-06-30 18:33:11 +03:00
Port some changes from Ruff
This commit is contained in:
parent
425520956d
commit
cc0bd38eff
|
@ -12,7 +12,6 @@ from __future__ import annotations
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
from collections.abc import Iterable
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING, Any, NamedTuple
|
from typing import TYPE_CHECKING, Any, NamedTuple
|
||||||
|
|
||||||
|
@ -20,6 +19,8 @@ import requests
|
||||||
from github import Github
|
from github import Github
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
from collections.abc import Iterable
|
||||||
|
|
||||||
from github.Issue import Issue
|
from github.Issue import Issue
|
||||||
|
|
||||||
CURRENT_FILE = Path(__file__)
|
CURRENT_FILE = Path(__file__)
|
||||||
|
@ -83,7 +84,7 @@ def get_name_and_version(requirements_line: str) -> tuple[str, ...]:
|
||||||
|
|
||||||
|
|
||||||
def get_all_latest_django_versions(
|
def get_all_latest_django_versions(
|
||||||
django_max_version: tuple[DjVersion] = None,
|
django_max_version: tuple[DjVersion] | None = None,
|
||||||
) -> tuple[DjVersion, list[DjVersion]]:
|
) -> tuple[DjVersion, list[DjVersion]]:
|
||||||
"""
|
"""
|
||||||
Grabs all Django versions that are worthy of a GitHub issue.
|
Grabs all Django versions that are worthy of a GitHub issue.
|
||||||
|
@ -221,8 +222,7 @@ class GitHubManager:
|
||||||
if supported_dj_versions:
|
if supported_dj_versions:
|
||||||
if any(v >= needed_dj_version for v in supported_dj_versions):
|
if any(v >= needed_dj_version for v in supported_dj_versions):
|
||||||
return package_info["info"]["version"], "✅"
|
return package_info["info"]["version"], "✅"
|
||||||
else:
|
return "", "❌"
|
||||||
return "", "❌"
|
|
||||||
|
|
||||||
# Django classifier DNE; assume it isn't a Django lib
|
# Django classifier DNE; assume it isn't a Django lib
|
||||||
# Great exceptions include pylint-django, where we need to do this manually...
|
# Great exceptions include pylint-django, where we need to do this manually...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user