Skip to content

Commit

Permalink
Fix type hint
Browse files Browse the repository at this point in the history
Well, I actually don't see why the status check will fail,
but the status check's suggestion seems not wrong...
Maybe there is an hidden issue?
  • Loading branch information
WangGithubUser committed Aug 17, 2023
1 parent 9a7de90 commit 0f829e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/configuration/search_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def process_raw_elements(
) -> List[Element]:
elements: List[Element] = []

def verify_valid(element: Union[SimpleElement, SitePackageElement]) -> bool:
def verify_valid(element: Element) -> bool:
# verify if the package_path or path(for SimpleElement) exist.(see facebook/pyre-check#773)
if os.path.exists(element.path()):
elements.append(element)
Expand All @@ -244,7 +244,7 @@ def verify_valid(element: Union[SimpleElement, SitePackageElement]) -> bool:
return element.package_name in site_packages_in_root[element.site_root]
return False

def add_if_exists(element: Union[SimpleElement, SitePackageElement]) -> None:
def add_if_exists(element: Element) -> None:
if os.path.exists(element.path()):
elements.append(element)

Expand Down

0 comments on commit 0f829e8

Please sign in to comment.