Skip to content

Commit 4dea02e

Browse files
mkniewallnerericwb
andauthored
refactor: remove importlib-metadata fallback (#1066)
Python 3.7 support has been removed in #1034, so the `importlib-metadata` fallback, is no longer required, as it was only need for Python < 3.8. Co-authored-by: Eric Brown <[email protected]>
1 parent 0d35086 commit 4dea02e

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

bandit/__init__.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
# Copyright 2014 Hewlett-Packard Development Company, L.P.
33
#
44
# SPDX-License-Identifier: Apache-2.0
5-
try:
6-
from importlib import metadata
7-
except ImportError:
8-
import importlib_metadata as metadata
5+
from importlib import metadata
96

107
from bandit.core import config # noqa
118
from bandit.core import context # noqa

requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ PyYAML>=5.3.1 # MIT
66
stevedore>=1.20.0 # Apache-2.0
77
colorama>=0.3.9;platform_system=="Windows" # BSD License (3 clause)
88
rich # MIT
9-
importlib-metadata;python_version<"3.8" # Apache-2.0

0 commit comments

Comments
 (0)