Skip to content

Commit

Permalink
Making noxfile <3.9 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
kkalinowski-reef committed Dec 6, 2023
1 parent cf1ddb2 commit 4cd1e49
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
"""
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4cd1e49

Please sign in to comment.