summaryrefslogtreecommitdiff
path: root/src/flake8
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2019-09-07 23:42:33 -0700
committerAnthony Sottile <asottile@umich.edu>2019-09-07 23:42:33 -0700
commitf0cd1537acbe2a737e2d5b111c5ee7a05e07c0a2 (patch)
treec371034f267f5c3472f3909cf595c0c4765ada23 /src/flake8
parenta13f02a386c63f307e5d48fbccd9ccea8dd6fa9f (diff)
downloadflake8-f0cd1537acbe2a737e2d5b111c5ee7a05e07c0a2.tar.gz
Simplify bandit config and allow `assert`
Diffstat (limited to 'src/flake8')
-rw-r--r--src/flake8/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/flake8/utils.py b/src/flake8/utils.py
index 92fec71..68eff98 100644
--- a/src/flake8/utils.py
+++ b/src/flake8/utils.py
@@ -39,7 +39,7 @@ def parse_comma_separated_list(value, regexp=COMMA_SEPARATED_LIST_RE):
:rtype:
list
"""
- assert isinstance(value, string_types), value # nosec (for bandit)
+ assert isinstance(value, string_types), value
separated = regexp.split(value)
item_gen = (item.strip() for item in separated)
@@ -163,7 +163,7 @@ def normalize_paths(paths, parent=os.curdir):
:rtype:
[str]
"""
- assert isinstance(paths, list), paths # nosec (for bandit)
+ assert isinstance(paths, list), paths
return [normalize_path(p, parent) for p in paths]
@@ -276,7 +276,7 @@ def parse_unified_diff(diff=None):
1 if not group else int(group)
for group in hunk_match.groups()
]
- assert current_path is not None # nosec (for mypy)
+ assert current_path is not None
parsed_paths[current_path].update(
range(row, row + number_of_rows)
)