Skip to content

Commit 80c80d9

Browse files
authored
chore: Pin dependencies for linters (#397)
1 parent c067b79 commit 80c80d9

File tree

3 files changed

+26
-16
lines changed

3 files changed

+26
-16
lines changed
Lines changed: 14 additions & 0 deletions
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.3.2

test/unit/test_encryption_context.py

Lines changed: 1 addition & 1 deletion
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

tox.ini

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,14 @@ commands =
149149
[testenv:flake8-tests]
150150
basepython = {[testenv:flake8]basepython}
151151
deps =
152-
flake8
153-
# https://github.com/JBKahn/flake8-print/pull/30
154-
flake8-print>=3.1.0
152+
-rdev_requirements/linter-requirements.txt
155153
commands =
156154
flake8 \
157155
# Ignore F811 redefinition errors in tests (breaks with pytest-mock use)
158156
# E203 is not PEP8 compliant https://github.com/ambv/black#slices
159157
# W503 is not PEP8 compliant https://github.com/ambv/black#line-breaks--binary-operators
160-
--ignore F811,E203,W503 \
158+
# D is for Documentation. We do not care if Test classes and their methods have docstrings
159+
--ignore F811,E203,W503,D \
161160
test/
162161

163162
[testenv:flake8-examples]
@@ -176,8 +175,7 @@ commands =
176175
basepython = python3
177176
deps =
178177
{[testenv]deps}
179-
pyflakes
180-
pylint
178+
-rdev_requirements/linter-requirements.txt
181179
commands =
182180
pylint \
183181
--rcfile=src/pylintrc \
@@ -205,7 +203,7 @@ commands =
205203
[testenv:blacken-src]
206204
basepython = python3
207205
deps =
208-
black
206+
-rdev_requirements/linter-requirements.txt
209207
commands =
210208
black --line-length 120 \
211209
src/aws_encryption_sdk/ \
@@ -232,12 +230,12 @@ commands =
232230

233231
[testenv:isort-seed]
234232
basepython = python3
235-
deps = seed-isort-config
233+
deps = -rdev_requirements/linter-requirements.txt
236234
commands = seed-isort-config
237235

238236
[testenv:isort]
239237
basepython = python3
240-
deps = isort
238+
deps = -rdev_requirements/linter-requirements.txt
241239
commands = isort -rc \
242240
src \
243241
test \
@@ -264,25 +262,23 @@ commands =
264262
[testenv:doc8]
265263
basepython = python3
266264
deps =
267-
sphinx
268-
doc8
265+
-rdev_requirements/linter-requirements.txt
269266
commands = doc8 doc/index.rst README.rst CHANGELOG.rst
270267

271268
[testenv:readme]
272269
basepython = python3
273-
deps = readme_renderer
270+
deps = -rdev_requirements/linter-requirements.txt
274271
commands = python setup.py check -r -s
275272

276273
[testenv:bandit]
277274
basepython = python3
278-
deps =
279-
bandit>=1.5.1
275+
deps = -rdev_requirements/linter-requirements.txt
280276
commands = bandit -r src/aws_encryption_sdk/
281277

282278
# Prone to false positives: only run independently
283279
[testenv:vulture]
284280
basepython = python3
285-
deps = vulture
281+
deps = -rdev_requirements/linter-requirements.txt
286282
commands = vulture src/aws_encryption_sdk/
287283

288284
[testenv:linters]

0 commit comments

Comments
 (0)