Skip to content

Commit

Permalink
Allow override of known 3rd parties
Browse files Browse the repository at this point in the history
  • Loading branch information
harahu authored and arkq committed Jun 15, 2022
1 parent 4ee2e86 commit c946232
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/flake8_requirements/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from .modules import STDLIB_PY3

# NOTE: Changing this number will alter package version as well.
__version__ = "1.5.4"
__version__ = "1.5.5"
__license__ = "MIT"

LOG = getLogger('flake8.plugin.requirements')
Expand Down Expand Up @@ -657,12 +657,12 @@ def get_mods_3rd_party(self):
# Get 3rd party module names based on requirements.
for requirement in self.get_mods_3rd_party_requirements():
modules = [project2module(requirement.project_name)]
if modules[0] in self.known_3rd_parties:
if modules[0] in self.known_modules:
modules = self.known_modules[modules[0]]
elif modules[0] in self.known_3rd_parties:
modules = self.known_3rd_parties[modules[0]]
elif modules[0] in self.known_host_3rd_parties:
modules = self.known_host_3rd_parties[modules[0]]
elif modules[0] in self.known_modules:
modules = self.known_modules[modules[0]]
for module in modules:
mods_3rd_party.add(modsplit(module), requirement)
return mods_3rd_party
Expand Down

0 comments on commit c946232

Please sign in to comment.