Facebook's Pysa tool looks useful, in the Pysa tutorial exercises they refer to files that are provided in the pyre-check repository using a relative path to include a path outside of the exercise directory.
https://github.com/facebook/pyre-check/blob/master/pysa_tutorial/exercise1/.pyre_configuration
{
"source_directories": ["."],
"taint_models_path": ["."],
"search_path": [
"../../stubs/"
],
"exclude": [
".*/integration_test/.*"
]
}
There are stubs provided for Django in the pyre-check repository which if I know the path where pyre check is installed I can hard-code in my .pyre_configuration and get something working but another developer may install pyre-check differently.
Is there a better way to refer to these provided stubs or should I copy them to the repository I'm working on?
Many projects have a standard development environment, allowing for hard coded paths in the
.pyre_configurationfile. These will usually point into thevenv, or some other standard install location for dependencies.For projects without a standard development environment, you could trying incorporating
pyre initinto your setup scripts.pyre initwill setup a fresh.pyre_configurationfile with paths that correspond to the current install ofpyre. For additional configuration you want to add on top of the generated.pyre_configurationfile (such as a pointer to local taint models), you can hand write a.pyre_configuration.local, which will act as an overlay and overwrite/add to the content of.pyre_configuration.