Skip to content

Commit

Permalink
style: modern typing in files.py
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola committed Sep 25, 2024
1 parent ea33066 commit c828762
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/darker/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

import inspect
from typing import TYPE_CHECKING, Collection, Optional, Set, Tuple
from typing import TYPE_CHECKING, Collection

from black import (
DEFAULT_EXCLUDES,
Expand All @@ -23,7 +23,7 @@
from darker.formatters.base_formatter import BaseFormatter


def find_pyproject_toml(path_search_start: Tuple[str, ...]) -> Optional[str]:
def find_pyproject_toml(path_search_start: tuple[str, ...]) -> str | None:
"""Find the absolute filepath to a pyproject.toml if it exists"""
path_project_root = find_project_root(path_search_start)
path_pyproject_toml = path_project_root / "pyproject.toml"
Expand All @@ -47,7 +47,7 @@ def filter_python_files(
paths: Collection[Path], # pylint: disable=unsubscriptable-object
root: Path,
formatter: BaseFormatter,
) -> Set[Path]:
) -> set[Path]:
"""Get Python files and explicitly listed files not excluded by Black's config.
:param paths: Relative file/directory paths from CWD to Python sources
Expand Down

0 comments on commit c828762

Please sign in to comment.