Skip to content

Commit

Permalink
fix mypy errors < python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
aszs committed Jul 29, 2023
1 parent 2af8bc7 commit 446d64a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unfurl/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 446d64a

Please sign in to comment.