diff --git a/noxfile.py b/noxfile.py index 48c61b540..e2216be5b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -16,7 +16,7 @@ import string import subprocess from glob import glob -from typing import List, Tuple +from typing import List, Set, Tuple import nox @@ -604,7 +604,7 @@ def make_release_commit(session): def load_allowed_change_types(project_toml: pathlib.Path = pathlib.Path('./pyproject.toml') - ) -> set[str]: + ) -> Set[str]: """ Load the list of allowed change types from the pyproject.toml file. """ @@ -613,7 +613,7 @@ def load_allowed_change_types(project_toml: pathlib.Path = pathlib.Path('./pypro return set(entry['directory'] for entry in configuration['tool']['towncrier']['type']) -def is_changelog_filename_valid(filename: str, allowed_change_types: set[str]) -> tuple[bool, str]: +def is_changelog_filename_valid(filename: str, allowed_change_types: Set[str]) -> Tuple[bool, str]: """ Validates whether the given filename matches our rules. Provides information about why it doesn't match them. @@ -647,7 +647,7 @@ def is_changelog_filename_valid(filename: str, allowed_change_types: set[str]) - return len(error_reasons) == 0, ' / '.join(error_reasons) if error_reasons else '' -def is_changelog_entry_valid(file_content: str) -> tuple[bool, str]: +def is_changelog_entry_valid(file_content: str) -> Tuple[bool, str]: """ We expect the changelog entry to be a valid sentence in the English language. This includes, but not limits to, providing a capital letter at the start