From 446d64ac7c9e47cc63512006d7edc5f5005a94d2 Mon Sep 17 00:00:00 2001 From: Adam Souzis Date: Sat, 29 Jul 2023 11:36:20 -0700 Subject: [PATCH] fix mypy errors < python 3.9 --- unfurl/repo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unfurl/repo.py b/unfurl/repo.py index 5f20e1bb..f495c0e6 100644 --- a/unfurl/repo.py +++ b/unfurl/repo.py @@ -25,7 +25,7 @@ logger = getLogger("unfurl") try: - Path.is_relative_to + Path.is_relative_to # type: ignore except AttributeError: # for python < 3.9 def is_relative_to(self, *other): @@ -262,7 +262,7 @@ def find_path(self, path: str, importLoader=None) -> Tuple[Optional[str], Option return None, None, None repoRoot = os.path.abspath(base) abspath = os.path.abspath(path).rstrip("/") - if Path(abspath).is_relative_to(repoRoot): + if Path(abspath).is_relative_to(repoRoot): # type: ignore # XXX find pinned # if importLoader: # revision = importLoader.getRevision(self)