Skip to content

Commit

Permalink
Workaround spurious mypy failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed May 6, 2020
1 parent 55faa5f commit 5ab9193
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions pip_run/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@
import functools

try:
from pip._vendor import pkg_resources
from pip._vendor import pkg_resources # type: ignore
except ImportError:
import pkg_resources


filterfalse = getattr(itertools, 'filterfalse', None) or itertools.ifilterfalse
import pkg_resources # type: ignore


def _installable(args):
Expand Down Expand Up @@ -80,4 +77,4 @@ def pkg_installed(spec):
return True


not_installed = functools.partial(filterfalse, pkg_installed)
not_installed = functools.partial(itertools.filterfalse, pkg_installed)
4 changes: 2 additions & 2 deletions pip_run/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import json

try:
from pip._vendor import pkg_resources
from pip._vendor import pkg_resources # type: ignore
except ImportError:
import pkg_resources
import pkg_resources # type: ignore


if sys.version_info < (3,):
Expand Down

0 comments on commit 5ab9193

Please sign in to comment.