Skip to content

Commit

Permalink
refactor: remove importlib-metadata fallback (#1066)
Browse files Browse the repository at this point in the history
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 <ericwb@users.noreply.github.com>
  • Loading branch information
mkniewallner and ericwb committed Dec 8, 2023
1 parent 0d35086 commit 4dea02e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions bandit/__init__.py
Expand Up @@ -2,10 +2,7 @@
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# SPDX-License-Identifier: Apache-2.0
try:
from importlib import metadata
except ImportError:
import importlib_metadata as metadata
from importlib import metadata

from bandit.core import config # noqa
from bandit.core import context # noqa
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Expand Up @@ -6,4 +6,3 @@ PyYAML>=5.3.1 # MIT
stevedore>=1.20.0 # Apache-2.0
colorama>=0.3.9;platform_system=="Windows" # BSD License (3 clause)
rich # MIT
importlib-metadata;python_version<"3.8" # Apache-2.0

0 comments on commit 4dea02e

Please sign in to comment.