Skip to content

Commit edeec7c

Browse files
authored
chore: Pin linter dependencies (#415)
1 parent f0cac10 commit edeec7c

File tree

3 files changed

+28
-21
lines changed

3 files changed

+28
-21
lines changed

Diff for: dev_requirements/linter-requirements.txt

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
bandit==1.7.0
2+
black==21.12b0
3+
doc8==0.10.1
4+
flake8==4.0.1
5+
flake8-bugbear==21.11.29
6+
flake8-docstrings==1.6.0
7+
flake8-print==4.0.0
8+
isort==5.10.1
9+
pyflakes==2.4.0
10+
pylint==2.12.2
11+
readme_renderer==32.0
12+
seed-isort-config==2.2.0
13+
vulture==2.3
14+
sphinx==4.4.0

Diff for: test/unit/test_encryption_context.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,4 @@ def test_deserialize_encryption_context_empty(self):
189189
test = aws_encryption_sdk.internal.formatting.encryption_context.deserialize_encryption_context(
190190
serialized_encryption_context=b""
191191
)
192-
assert test == {}
192+
assert not test

Diff for: tox.ini

+13-20
Original file line numberDiff line numberDiff line change
@@ -134,26 +134,21 @@ commands = {[testenv:test-upstream-requirements-base]commands}
134134
[testenv:flake8]
135135
basepython = python3
136136
deps =
137-
flake8
138-
flake8-docstrings>=1.5.0
139-
# https://github.com/JBKahn/flake8-print/pull/30
140-
flake8-print>=3.1.0
141-
flake8-bugbear
137+
-rdev_requirements/linter-requirements.txt
142138
commands =
143139
flake8 src/aws_encryption_sdk/ setup.py
144140

145141
[testenv:flake8-tests]
146142
basepython = {[testenv:flake8]basepython}
147143
deps =
148-
flake8
149-
# https://github.com/JBKahn/flake8-print/pull/30
150-
flake8-print>=3.1.0
144+
-rdev_requirements/linter-requirements.txt
151145
commands =
152146
flake8 \
153147
# Ignore F811 redefinition errors in tests (breaks with pytest-mock use)
154148
# E203 is not PEP8 compliant https://github.com/ambv/black#slices
155149
# W503 is not PEP8 compliant https://github.com/ambv/black#line-breaks--binary-operators
156-
--ignore F811,E203,W503 \
150+
# D is for Documentation. We do not care if Test classes and their methods have docstrings
151+
--ignore F811,E203,W503,D \
157152
test/
158153

159154
[testenv:flake8-examples]
@@ -172,8 +167,7 @@ commands =
172167
basepython = python3
173168
deps =
174169
{[testenv]deps}
175-
pyflakes
176-
pylint
170+
-rdev_requirements/linter-requirements.txt
177171
commands =
178172
pylint \
179173
--rcfile=src/pylintrc \
@@ -200,7 +194,7 @@ commands =
200194
[testenv:blacken-src]
201195
basepython = python3
202196
deps =
203-
black
197+
-rdev_requirements/linter-requirements.txt
204198
commands =
205199
black --line-length 120 \
206200
src/aws_encryption_sdk/ \
@@ -227,12 +221,12 @@ commands =
227221

228222
[testenv:isort-seed]
229223
basepython = python3
230-
deps = seed-isort-config
224+
deps = -rdev_requirements/linter-requirements.txt
231225
commands = seed-isort-config
232226

233227
[testenv:isort]
234228
basepython = python3
235-
deps = isort
229+
deps = -rdev_requirements/linter-requirements.txt
236230
commands = isort -rc \
237231
src \
238232
test \
@@ -259,25 +253,24 @@ commands =
259253
[testenv:doc8]
260254
basepython = python3
261255
deps =
262-
sphinx
263-
doc8
256+
-rdev_requirements/linter-requirements.txt
264257
commands = doc8 doc/index.rst README.rst CHANGELOG.rst
265258

266259
[testenv:readme]
267260
basepython = python3
268-
deps = readme_renderer
261+
deps = -rdev_requirements/linter-requirements.txt
269262
commands = python setup.py check -r -s
270263

271264
[testenv:bandit]
272265
basepython = python3
273-
deps =
274-
bandit>=1.5.1
266+
deps =
267+
-rdev_requirements/linter-requirements.txt
275268
commands = bandit -r src/aws_encryption_sdk/
276269

277270
# Prone to false positives: only run independently
278271
[testenv:vulture]
279272
basepython = python3
280-
deps = vulture
273+
deps = -rdev_requirements/linter-requirements.txt
281274
commands = vulture src/aws_encryption_sdk/
282275

283276
[testenv:linters]

0 commit comments

Comments
 (0)