From 7772f5fecf1cd859b169ef7051498a6ce71c81a0 Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Tue, 17 Sep 2024 10:35:48 +0300 Subject: [PATCH] style: modern typing in files.py --- src/darker/files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/darker/files.py b/src/darker/files.py index 1b99a9ece..068d12c4b 100644 --- a/src/darker/files.py +++ b/src/darker/files.py @@ -3,7 +3,7 @@ from __future__ import annotations import inspect -from typing import TYPE_CHECKING, Collection, Optional, Tuple +from typing import TYPE_CHECKING, Collection from black import ( DEFAULT_EXCLUDES, @@ -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"