pyre-check icon indicating copy to clipboard operation
pyre-check copied to clipboard

Pyre couldn't find a required site-package

Open WangGithubUser opened this issue 2 years ago • 1 comments

Pyre Bug

Bug description Pyre can't find a Python Extension Module (.pyd) package in site-package

Reproduction steps Run pyre with the following .pyre_configuration:

{
  "site_package_search_strategy": "pep561",
  "source_directories": [
    "."
  ],
  "search_path": [
    {
      "site-package": "ujson"
    }
  ],
  "taint_models_path": "Secret",
  "typeshed": "Secret"
}

Expected behavior It should pass but not warning ƛ Site package does not exist: `ujson`

Logs

pyre check
ƛ Site package does not exist: `ujson`
ƛ No type errors found

Additional context This may due to pyre do not treat .pyd files(actully all the files that not have .py shuffix) as a package.

WangGithubUser avatar Aug 09 '23 05:08 WangGithubUser

Fix suggestion: Every site-package must have a name-version.dist-info folder in the site root, and there will be a RECORD file in the folder. image

And all the files will be listed in the RECORD file, so we can filter them out.

WangGithubUser avatar Aug 10 '23 03:08 WangGithubUser