I'm trying to integrate a project with a flake8 plugin I wrote as a local plugin (not a PyPI package for example) as explained here. The project uses a virtual env, both locally and as a github workflow. Since flake8 is invoked from within the virtual env it can't find the plugin, which resides as a folder under the project root. When I manually add the plugin code to the virtual env folder it integrates nicely and flake8 is able to find to execute it.
The solution smells like some kind of github pre-commit-config/hook, but I can't find any reference in the docs for this usecase. Currently flake8 is configured in pre-commit-config like so:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: debug-statements
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: ['dlint']
Is there a way to use my non-packaged flake8 plugin with a virtual env locally / in a github workflow?