1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00

Clean up other Python files (#11379)

* Address issues found by ruff check.

* Make mypy happy; remove some Python 2 compat code.

* Also declare port1.
This commit is contained in:
Felix Fontein 2026-01-05 17:59:58 +01:00 committed by GitHub
parent 75234597bc
commit b3dc06a7dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 52 additions and 47 deletions

View file

@ -56,7 +56,7 @@ IGNORE_NO_MAINTAINERS = [
class BotmetaCheck:
def __init__(self):
def __init__(self) -> None:
self.errors: list[str] = []
self.botmeta_filename = ".github/BOTMETA.yml"
self.list_entries = frozenset(("supershipit", "maintainers", "labels", "keywords", "notify", "ignore"))
@ -121,8 +121,8 @@ class BotmetaCheck:
)
):
maintainers = self.read_authors(filename)
for maintainer in maintainers:
maintainer = self.extract_author_name(maintainer)
for maintainer_str in maintainers:
maintainer = self.extract_author_name(maintainer_str)
if maintainer is not None and maintainer not in all_maintainers:
others = ", ".join(all_maintainers)
msg = f"Author {maintainer} not mentioned as active or inactive maintainer for {filename} (mentioned are: {others})"