aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-01-19 12:46:30 -0500
committerJason R. Coombs <jaraco@jaraco.com>2020-01-19 12:46:30 -0500
commit3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b (patch)
treeffbf9cd5a02337ced626892b672b7e21bd305717 /pkg_resources
parenta0e8d0568d84e29066a5b45aade5aafe28237ec0 (diff)
downloadexternal_python_setuptools-3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b.tar.gz
external_python_setuptools-3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b.tar.bz2
external_python_setuptools-3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b.zip
👹 Feed the hobgoblins (delint).
Diffstat (limited to 'pkg_resources')
-rw-r--r--pkg_resources/__init__.py4
-rw-r--r--pkg_resources/tests/test_pkg_resources.py8
-rw-r--r--pkg_resources/tests/test_resources.py3
3 files changed, 9 insertions, 6 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 3fa883ce..75563f95 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -2329,7 +2329,8 @@ register_namespace_handler(object, null_ns_handler)
def normalize_path(filename):
"""Normalize a file/dir name for comparison purposes"""
- return os.path.normcase(os.path.realpath(os.path.normpath(_cygwin_patch(filename))))
+ return os.path.normcase(os.path.realpath(os.path.normpath(
+ _cygwin_patch(filename))))
def _cygwin_patch(filename): # pragma: nocover
@@ -3288,6 +3289,7 @@ def _initialize_master_working_set():
list(map(working_set.add_entry, sys.path))
globals().update(locals())
+
class PkgResourcesDeprecationWarning(Warning):
"""
Base class for warning about deprecations in ``pkg_resources``
diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py
index 5960868a..78281869 100644
--- a/pkg_resources/tests/test_pkg_resources.py
+++ b/pkg_resources/tests/test_pkg_resources.py
@@ -17,7 +17,9 @@ try:
except ImportError:
import mock
-from pkg_resources import DistInfoDistribution, Distribution, EggInfoDistribution
+from pkg_resources import (
+ DistInfoDistribution, Distribution, EggInfoDistribution,
+)
from setuptools.extern import six
from pkg_resources.extern.six.moves import map
from pkg_resources.extern.six import text_type, string_types
@@ -279,8 +281,8 @@ def make_distribution_no_version(tmpdir, basename):
('dist-info', 'METADATA', DistInfoDistribution),
],
)
-def test_distribution_version_missing(tmpdir, suffix, expected_filename,
- expected_dist_type):
+def test_distribution_version_missing(
+ tmpdir, suffix, expected_filename, expected_dist_type):
"""
Test Distribution.version when the "Version" header is missing.
"""
diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py
index 93fa7114..ed7cdfcc 100644
--- a/pkg_resources/tests/test_resources.py
+++ b/pkg_resources/tests/test_resources.py
@@ -15,7 +15,7 @@ import pkg_resources
from pkg_resources import (
parse_requirements, VersionConflict, parse_version,
Distribution, EntryPoint, Requirement, safe_version, safe_name,
- WorkingSet, PkgResourcesDeprecationWarning)
+ WorkingSet)
# from Python 3.6 docs.
@@ -501,7 +501,6 @@ class TestEntryPoints:
ep.load(require=False)
-
class TestRequirements:
def testBasics(self):
r = Requirement.parse("Twisted>=1.2")