Update flake8 to 3.5.0 (#88)

* Update flake8 from 3.4.1 to 3.5.0

* fix linting with flake8 3.5
This commit is contained in:
pyup.io bot
2017-10-23 16:35:56 +02:00
committed by Samuel Colvin
parent 6f3ceb07d5
commit 06d971ae4d
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -56,14 +56,14 @@ class ConstrainedStr(str):
if value is None:
raise TypeError('None is not an allow value')
l = len(value)
if cls.min_length is not None and l < cls.min_length:
v_len = len(value)
if cls.min_length is not None and v_len < cls.min_length:
raise ValueError(f'length less than minimum allowed: {cls.min_length}')
if cls.curtail_length:
if l > cls.curtail_length:
if v_len > cls.curtail_length:
value = value[:cls.curtail_length]
elif cls.max_length is not None and l > cls.max_length:
elif cls.max_length is not None and v_len > cls.max_length:
raise ValueError(f'length greater than maximum allowed: {cls.max_length}')
if cls.regex:
+1 -1
View File
@@ -1,5 +1,5 @@
coverage==4.4.1
flake8==3.4.1
flake8==3.5.0
isort==4.2.15
mypy==0.540
pycodestyle==2.3.1