diff --git a/.deepsource.toml b/.deepsource.toml new file mode 100644 index 00000000..1cd8dcda --- /dev/null +++ b/.deepsource.toml @@ -0,0 +1,16 @@ +version = 1 + +test_patterns = ["tests/**"] + +exclude_patterns = [ + "examples/**", + "pipenv/vendor/**", + "pipenv/patched/**" +] + +[[analyzers]] +name = "python" +enabled = true + + [analyzers.meta] + runtime_version = "3.x.x" diff --git a/pipenv/_compat.py b/pipenv/_compat.py index fdcca7f5..04040c74 100644 --- a/pipenv/_compat.py +++ b/pipenv/_compat.py @@ -36,7 +36,7 @@ def getpreferredencoding(): # Borrowed from Invoke # (see https://github.com/pyinvoke/invoke/blob/93af29d/invoke/runners.py#L881) _encoding = locale.getpreferredencoding(False) - if six.PY2 and not sys.platform == "win32": + if six.PY2 and sys.platform != "win32": _default_encoding = locale.getdefaultlocale()[1] if _default_encoding is not None: _encoding = _default_encoding diff --git a/pipenv/environments.py b/pipenv/environments.py index 945e1930..fce4bf94 100644 --- a/pipenv/environments.py +++ b/pipenv/environments.py @@ -3,8 +3,6 @@ import os import sys -from io import UnsupportedOperation - from appdirs import user_cache_dir from ._compat import fix_utf8 diff --git a/pipenv/project.py b/pipenv/project.py index 9709609f..6d589429 100644 --- a/pipenv/project.py +++ b/pipenv/project.py @@ -726,7 +726,7 @@ class Project(object): if not self.pipfile_exists: return True - if not len(self.read_pipfile()): + if not self.read_pipfile(): return True return False diff --git a/tasks/vendoring/__init__.py b/tasks/vendoring/__init__.py index 03b25e68..34aa9183 100644 --- a/tasks/vendoring/__init__.py +++ b/tasks/vendoring/__init__.py @@ -47,7 +47,6 @@ PY2_DOWNLOAD = ["enum34"] # from time to time, remove the no longer needed ones HARDCODED_LICENSE_URLS = { - "pytoml": "https://github.com/avakar/pytoml/raw/master/LICENSE", "cursor": "https://raw.githubusercontent.com/GijsTimmers/cursor/master/LICENSE", "delegator.py": "https://raw.githubusercontent.com/amitt001/delegator.py/master/LICENSE", "click-didyoumean": "https://raw.githubusercontent.com/click-contrib/click-didyoumean/master/LICENSE",