a way to add to sys.path so local plugins can be found
In trying to use the new local-plugins support, we've realized that setting up sys.path so flake8 can find the local plugin is a bit of a pain point. It's solvable with
PYTHONPATH, but it's a bit sad to require that to be set for every flake8 run. It would be great to be able to set things up with a local plugin such that simply running
Some possible ideas:
If a local-plugins section is found in a config file, add that config file's path to
sys.path. This is simple and pretty intuitive, though it lacks flexibility for situations where you might have an intervening
src/dir in between the flake8 config and the actual source, and you want your local plugin with the actual source (e.g. so it can be tested), not next to the flake8 config.
For more flexibility, add a sys-path or local-plugins-path option, which could be set to e.g.
./src(relative to the config file location).
I'd lean toward (2) -- probably named
local-plugin-path or similar. Interested in your thoughts before I submit a merge request. Thanks!