Skip to content

Commit efb589b

Browse files
committed
fix type errors
1 parent 3633d40 commit efb589b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

python/runfiles/runfiles.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ class Path(pathlib.Path):
159159
using the associated `Runfiles` instance when converted to a string.
160160
"""
161161

162+
# Mypy isn't smart enough to realize `self` in the methods
163+
# refers to our Path class instead of pathlib.Path
164+
_runfiles: Optional["Runfiles"]
165+
_source_repo: Optional[str]
166+
162167
# For Python < 3.12 compatibility when subclassing Path directly
163168
_flavour = getattr(type(pathlib.Path()), "_flavour", None)
164169

0 commit comments

Comments
 (0)