facebook / pyre-check

Performant type-checking for python.
https://pyre-check.org/
MIT License
6.8k stars 434 forks source link

`input` is not part of the environment, no module `input` in search path. #830

Closed Victor725 closed 4 months ago

Victor725 commented 4 months ago

Pysa Bug

Pre-submission checklist [ ] I've checked the list of common issues and mine does not appear

Bug description when i run "pyre analyze", following error raised image my taint.config, general.pysa, .pyre_configuration are identical to "Running Pysa" in pyre documentation another .pyre_configuration in /usr/local/lib/python3.8/dist-packages/libcst/tests/pyre/.pyre_configuration as follows image

How could I let pyre find my "input"?

Victor725 commented 4 months ago

OH,I set search_path like: "search_path": [ "/usr/local/lib/pyre_check/typeshed/stubs/", "/usr/local/lib/pyre_check/typeshed/stdlib/" ] and then pysa can find input and os.system

arthaud commented 4 months ago

I think you shouldn't need to specify search_path and typeshed in your .pyre_configuration.

Have you tried removing it and using pyre init-pysa?

Victor725 commented 2 months ago

yes, but it says: image but I've installed typeshed by pip install mypy

arthaud commented 2 months ago

pyre should provide its own version of typeshed. My guess is that it conflicts with the one from mypy and leads to problems in pyre init-pysa. I will try to reproduce when I get the time.

Victor725 commented 2 months ago

OK, thank you very much!