Fix bug in create_django_issue

Parsing doesn't work for classifiers that only
include the Django major version, e.g.:
``'Framework :: Django :: 3'`

We need a '.' in the 4th part of the classifier
to be able to parse it:
``'Framework :: Django :: 3.2'`
This commit is contained in:
Bruno Alla 2023-12-07 12:29:02 +00:00
parent 7d5a14d9f6
commit 52d25ad019
No known key found for this signature in database

View File

@ -212,7 +212,7 @@ class GitHubManager:
for classifier in package_info["info"]["classifiers"]:
# Usually in the form of "Framework :: Django :: 3.2"
tokens = classifier.split(" ")
if len(tokens) >= 5 and tokens[2].lower() == "django":
if len(tokens) >= 5 and tokens[2].lower() == "django" and "." in tokens[4]:
version = DjVersion.parse(tokens[4])
if len(version) == 2:
supported_dj_versions.append(version)