mirror of
https://github.com/enpaul/kodak.git
synced 2024-11-13 01:56:56 +00:00
Update pre-commit config to use locked dependencies in poetry env
This commit is contained in:
parent
92d4382373
commit
3f5259e0b5
@ -1,28 +1,48 @@
|
||||
---
|
||||
# All of the pre-commit hooks here actually use the `pytyhon` pre-commit language
|
||||
# setting. However, for the python language setting, pre-commit will create and manage
|
||||
# a cached virtual environment for each hook ID and do a bare `pip install <repo>` into
|
||||
# the venv to setup the hook. This can result in conflicting dependency versions between
|
||||
# the version installed to the pre-commit venv and the version installed to the Poetry
|
||||
# venv specified in the lockfile.
|
||||
#
|
||||
# The solution is to specify `language: system` for all hooks and then install the
|
||||
# required dependencies to the Poetry venv. The `system` language skips the isolated
|
||||
# venv creation and looks for the entrypoint specified by the hook in the global
|
||||
# environment which, if running in the Poetry venv, will find the entrypoint provided
|
||||
# by the Poetry-managed dependency.
|
||||
#
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.3.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
language: system
|
||||
- id: fix-encoding-pragma
|
||||
args:
|
||||
- "--remove"
|
||||
language: system
|
||||
- id: trailing-whitespace
|
||||
language: system
|
||||
- id: check-merge-conflict
|
||||
language: system
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: master
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3.7
|
||||
language: system
|
||||
|
||||
- repo: https://github.com/asottile/blacken-docs
|
||||
rev: v0.5.0
|
||||
hooks:
|
||||
- id: blacken-docs
|
||||
additional_dependencies: [black]
|
||||
language_version: python3.7
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v2.0.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
- id: fix-encoding-pragma
|
||||
args: [--remove]
|
||||
- id: trailing-whitespace
|
||||
|
||||
- repo: https://github.com/asottile/reorder_python_imports
|
||||
rev: v1.8.0
|
||||
hooks:
|
||||
- id: blacken-docs
|
||||
language: system
|
||||
|
||||
- repo: https://github.com/asottile/reorder_python_imports
|
||||
rev: v2.3.6
|
||||
hooks:
|
||||
- id: reorder-python-imports
|
||||
language_version: python3
|
||||
args:
|
||||
- "--unclassifiable-application-module=imagemonk"
|
||||
language: system
|
||||
|
1101
poetry.lock
generated
1101
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,9 @@
|
||||
[tool.poetry]
|
||||
name = "imagemonk"
|
||||
version = "0.0.0"
|
||||
license = "MIT"
|
||||
authors = ["Ethan Paul <24588726+enpaul@users.noreply.github.com>"]
|
||||
description = "HTTP server for uploading images and generating thumbnails"
|
||||
authors = ["Ethan Paul <e@enp.one>"]
|
||||
repository = "https://github.com/mocproject/imagemonk/"
|
||||
packages = [{include = "imagemonk"}]
|
||||
|
||||
@ -12,18 +13,20 @@ python = "^3.7"
|
||||
[tool.poetry.dev-dependencies]
|
||||
bandit = "^1.6.2"
|
||||
black = { git = "https://github.com/psf/black.git" }
|
||||
blacken-docs = "^1.9.1"
|
||||
ipython = "^7.10.2"
|
||||
mypy = "^0.782"
|
||||
mypy = "^0.790"
|
||||
pre-commit = "^2.1.1"
|
||||
pylint = "^2.4.4"
|
||||
pre-commit-hooks = "^3.4.0"
|
||||
pylint = "^2.6.0"
|
||||
pytest = "^5.2.0"
|
||||
pytest-cov = "^2.8.0"
|
||||
reorder-python-imports = "^1.8.0"
|
||||
reorder-python-imports = "^2.3.0"
|
||||
safety = "^1.9.0"
|
||||
sphinx = "^3.0.4"
|
||||
sphinx-autodoc-typehints = "^1.8.0"
|
||||
sphinx = "^3.3.0"
|
||||
sphinx-autodoc-typehints = "^1.11.1"
|
||||
toml = "^0.10.1"
|
||||
tox = "^3.14.0"
|
||||
tox = "^3.20.0"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry>=1.0.0"]
|
||||
|
Loading…
Reference in New Issue
Block a user