Skip to content

Commit

Permalink
Fixed missing import "metadata" for Python < 3.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
atollk committed Aug 12, 2020
1 parent 74cef69 commit 9e6e9a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion flake8_import_restrictions/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
import ast
import fnmatch
from collections import defaultdict
from importlib import metadata
try:
from importlib import metadata
except ImportError:
import importlib_metadata as metadata
from typing import Dict, Iterable, List, Tuple, Union

import flake8.options.manager
Expand Down
3 changes: 2 additions & 1 deletion requirements/py37.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
flake8>=3.0,<4
pytest-flake8dir>=2.2,<3
pytest>=5.4,<6
pytest>=5.4,<6
importlib_metadata>=1.7,<2

0 comments on commit 9e6e9a2

Please sign in to comment.