Merge pull request #4661 from ankitdobhal/refactor

chore : refactor code quality issues
This commit is contained in:
Frost Ming
2021-04-07 08:35:06 +08:00
committed by GitHub
5 changed files with 18 additions and 5 deletions
+16
View File
@@ -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"
+1 -1
View File
@@ -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
-2
View File
@@ -3,8 +3,6 @@
import os
import sys
from io import UnsupportedOperation
from appdirs import user_cache_dir
from ._compat import fix_utf8
+1 -1
View File
@@ -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
-1
View File
@@ -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",