mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Typecheck typeshed's code with pyright (#9793)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -135,4 +135,6 @@ def spec_matches_path(spec: pathspec.PathSpec, path: Path) -> bool:
|
||||
normalized_path = path.as_posix()
|
||||
if path.is_dir():
|
||||
normalized_path += "/"
|
||||
return spec.match_file(normalized_path)
|
||||
# pathspec.PathSpec.match_file has partially Unknown file parameter
|
||||
# https://github.com/cpburnz/python-pathspec/pull/75
|
||||
return spec.match_file(normalized_path) # pyright: ignore[reportUnknownMemberType]
|
||||
|
||||
Reference in New Issue
Block a user