Skip to content

Commit b68cce9

Browse files
committed
update tox, pre-commit config
1 parent c135165 commit b68cce9

File tree

5 files changed

+84
-37
lines changed

5 files changed

+84
-37
lines changed

.pre-commit-config.yaml

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v3.4.0
3+
rev: v4.2.0
44
hooks:
55
- id: no-commit-to-branch
66
args: [--branch, main]
7+
stages: [push]
78
- id: check-added-large-files
89
- id: check-ast
910
- id: check-builtin-literals
10-
- id: check-byte-order-marker
1111
- id: check-case-conflict
1212
- id: check-docstring-first
1313
- id: check-executables-have-shebangs
@@ -23,81 +23,71 @@ repos:
2323
- id: fix-byte-order-marker
2424
- id: forbid-new-submodules
2525
- id: mixed-line-ending
26+
- id: name-tests-test
2627
- id: trailing-whitespace
2728
args: ['--markdown-linebreak-ext=md']
2829
- repo: https://github.com/asottile/add-trailing-comma
29-
rev: v2.1.0
30+
rev: v2.2.3
3031
hooks:
3132
- id: add-trailing-comma
32-
- repo: git://github.com/Lucas-C/pre-commit-hooks
33-
rev: v1.1.9
34-
hooks:
35-
- id: forbid-crlf
36-
- id: forbid-tabs
3733
- repo: https://github.com/asottile/pyupgrade
38-
rev: v2.11.0
34+
rev: v2.32.0
3935
hooks:
4036
- id: pyupgrade
4137
args: ['--py3-plus']
42-
- repo: https://github.com/PyCQA/isort
43-
rev: 5.8.0
44-
hooks:
45-
- id: isort
46-
- repo: https://github.com/python/black
47-
rev: 20.8b1
48-
hooks:
49-
- id: black
50-
args: ['--target-version', 'py37', '--line-length', '128']
5138
- repo: https://gitlab.com/pycqa/flake8
52-
rev: 3.9.0
39+
rev: 3.9.2
5340
hooks:
5441
- id: flake8
55-
additional_dependencies: [flake8-eradicate]
42+
additional_dependencies: [flake8-eradicate, flake8-pytest-style]
5643
args: ["--max-line-length", "130"]
5744
- repo: https://github.com/pre-commit/mirrors-mypy
58-
rev: v0.812
45+
rev: v0.950
5946
hooks:
6047
- id: mypy
61-
additional_dependencies: [tokenize-rt==4.1.0]
48+
additional_dependencies: [tokenize-rt]
6249
types: [python]
6350
args: ['--follow-imports=skip', '--ignore-missing-imports']
6451
- repo: https://github.com/pre-commit/pygrep-hooks
65-
rev: v1.8.0
52+
rev: v1.9.0
6653
hooks:
6754
- id: python-check-blanket-noqa
6855
- id: python-check-mock-methods
6956
- id: python-no-eval
7057
- id: python-no-log-warn
7158
- id: python-use-type-annotations
72-
- repo: https://github.com/asottile/add-trailing-comma
73-
rev: v2.1.0
74-
hooks:
75-
- id: add-trailing-comma
7659
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
77-
rev: v1.2.1
60+
rev: v1.2.4
7861
hooks:
7962
- id: python-safety-dependencies-check
8063
stages: [manual]
8164
- repo: https://github.com/Lucas-C/pre-commit-hooks-bandit
82-
rev: v1.0.4
65+
rev: v1.0.6
8366
hooks:
8467
- id: python-bandit-vulnerability-check
8568
stages: [manual]
8669
- repo: https://github.com/Lucas-C/pre-commit-hooks
87-
rev: v1.1.9
70+
rev: v1.1.13
8871
hooks:
8972
- id: forbid-crlf
9073
- id: remove-crlf
9174
- id: forbid-tabs
9275
- id: remove-tabs
9376
- repo: https://github.com/PyCQA/isort
94-
rev: 5.8.0
77+
rev: 5.10.1
9578
hooks:
9679
- id: isort
9780
types: [python]
9881
args: ["--profile", "black", "--filter-files", "-l 128"]
9982
- repo: https://github.com/python/black
100-
rev: 20.8b1
83+
rev: 22.3.0
10184
hooks:
10285
- id: black
10386
args: ['--target-version', 'py35', '--line-length', '128']
87+
- repo: https://github.com/jazzband/pip-tools
88+
rev: 6.6.0
89+
hooks:
90+
- id: pip-compile
91+
name: pip-compile requirements-dev.in
92+
args: [requirements-dev.in]
93+
files: ^requirements-dev\.(in|txt)$
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
apache-libcloud
21
cryptography
32
pytest
43
vcrpy

requirements-dev.txt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#
2+
# This file is autogenerated by pip-compile with python 3.10
3+
# To update, run:
4+
#
5+
# pip-compile requirements-dev.in
6+
#
7+
attrs==21.4.0
8+
# via pytest
9+
cffi==1.15.0
10+
# via cryptography
11+
cryptography==37.0.1
12+
# via -r requirements-dev.in
13+
idna==3.3
14+
# via yarl
15+
iniconfig==1.1.1
16+
# via pytest
17+
multidict==6.0.2
18+
# via yarl
19+
packaging==21.3
20+
# via pytest
21+
pluggy==1.0.0
22+
# via pytest
23+
py==1.11.0
24+
# via pytest
25+
pycparser==2.21
26+
# via cffi
27+
pyparsing==3.0.8
28+
# via packaging
29+
pytest==7.1.2
30+
# via -r requirements-dev.in
31+
pyyaml==6.0
32+
# via vcrpy
33+
six==1.16.0
34+
# via vcrpy
35+
tomli==2.0.1
36+
# via pytest
37+
vcrpy==4.1.1
38+
# via -r requirements-dev.in
39+
wrapt==1.14.0
40+
# via vcrpy
41+
yarl==1.7.2
42+
# via vcrpy
File renamed without changes.

tox.ini

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1+
[tox]
2+
envlist = libcloud{30,31,32,33,34,35}, lint
3+
# https://libcloud.apache.org/about.html#supported-python-versions
4+
# envlist = py35,py36,py37,py38,py39,py310,pypy35,pypy36,pypy37,pypy38
5+
16
[testenv]
27
passenv =
38
VDSINA_TOKEN
9+
description = Run pytest
410
deps =
5-
pytest
6-
vcrpy
7-
apache-libcloud>=3.0.0
11+
libcloud30: apache-libcloud>=3.0.0,<3.1.0
12+
libcloud31: apache-libcloud>=3.1.0,<3.2.0
13+
libcloud32: apache-libcloud>=3.2.0,<3.3.0
14+
libcloud33: apache-libcloud>=3.3.0,<3.4.0
15+
libcloud34: apache-libcloud>=3.4.0,<3.5.0
16+
libcloud35: apache-libcloud>=3.5.0,<3.6.0
17+
-rrequirements-dev.txt
818
commands =
9-
pytest
19+
pytest {posargs}
20+
21+
[testenv:lint]
22+
description = Run all pre-commit hooks.
23+
skip_install = true
24+
deps = pre-commit
25+
commands = pre-commit run --all-files

0 commit comments

Comments
 (0)