So far, I have used tools from the local
repo, where everything was run as a system command in the development environment. This works great, but is a bit on the slower side from the overhead of running things through poetry, and prevents running linting without a full setup.
Adjusting black and isort to use their respective repos was easy enough, but flake8's plugin system is causing trouble.
Running it from local
, the versions of the plugins are managed by poetry, and can be easily modified in pyproject.toml
while locking ensures there are no unexpected version bumps happening, but there's seemingly no way to achieve this when specifying the plugins through additional_dependencies
on the flake8 hook.
If the versions are left unconstrained, pre-commit may use a different linting configuration in different environments, but then if an exact constraint is provided, it becomes increasingly more difficult to manage as the version bumps have to be done completely manually.
e.g this possibly won't produce the same environment across different runs if the plugin is updated
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies:
[
flake8-plugin, # or some lower upper bound
]
But providing an exact version flake8-plugin==1.2.3
, requires me to manually keep track of the updates of all the plugins and bump everything myself.
Is there any way to get a behaviour similar to normal locking, where I'd specify a reasonable version constraint for the plugin (e.g. ~1.2
) somewhere, and that'd get locked on autoupdate ?