mirror of https://github.com/pypa/pip
Remove unnecessary "noqa" comments
This commit is contained in:
parent
7edb8ebfee
commit
b78f71216f
|
@ -18,7 +18,7 @@ if __package__ == '':
|
|||
path = os.path.dirname(os.path.dirname(__file__))
|
||||
sys.path.insert(0, path)
|
||||
|
||||
from pip._internal.cli.main import main as _main # isort:skip # noqa
|
||||
from pip._internal.cli.main import main as _main
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(_main())
|
||||
|
|
|
@ -31,7 +31,7 @@ if MYPY_CHECK_RUNNING:
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
import keyring # noqa
|
||||
import keyring
|
||||
except ImportError:
|
||||
keyring = None
|
||||
except Exception as exc:
|
||||
|
|
|
@ -24,7 +24,7 @@ class RequirementSet:
|
|||
"""Create a RequirementSet.
|
||||
"""
|
||||
|
||||
self.requirements = OrderedDict() # type: Dict[str, InstallRequirement] # noqa: E501
|
||||
self.requirements = OrderedDict() # type: Dict[str, InstallRequirement]
|
||||
self.check_supported_wheels = check_supported_wheels
|
||||
|
||||
self.unnamed_requirements = [] # type: List[InstallRequirement]
|
||||
|
@ -69,7 +69,7 @@ class RequirementSet:
|
|||
parent_req_name=None, # type: Optional[str]
|
||||
extras_requested=None # type: Optional[Iterable[str]]
|
||||
):
|
||||
# type: (...) -> Tuple[List[InstallRequirement], Optional[InstallRequirement]] # noqa: E501
|
||||
# type: (...) -> Tuple[List[InstallRequirement], Optional[InstallRequirement]]
|
||||
"""Add install_req as a requirement to install.
|
||||
|
||||
:param parent_req_name: The name of the requirement that needed this
|
||||
|
|
|
@ -45,7 +45,7 @@ if WINDOWS:
|
|||
# https://bugs.python.org/issue30418
|
||||
def _is_broken_pipe_error(exc_class, exc):
|
||||
"""See the docstring for non-Windows below."""
|
||||
return ((exc_class is BrokenPipeError) or # noqa: F821
|
||||
return ((exc_class is BrokenPipeError) or
|
||||
(exc_class is OSError and
|
||||
exc.errno in (errno.EINVAL, errno.EPIPE)))
|
||||
else:
|
||||
|
@ -58,7 +58,7 @@ else:
|
|||
exc_class: an exception class.
|
||||
exc: an exception instance.
|
||||
"""
|
||||
return (exc_class is BrokenPipeError) # noqa: F821
|
||||
return (exc_class is BrokenPipeError)
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
|
|
@ -170,9 +170,7 @@ def path_to_display(path):
|
|||
except UnicodeDecodeError:
|
||||
# Include the full bytes to make troubleshooting easier, even though
|
||||
# it may not be very human readable.
|
||||
# Silence the "F821 undefined name 'ascii'" flake8 error since
|
||||
# ascii() is a built-in.
|
||||
display_path = ascii(path) # noqa: F821
|
||||
display_path = ascii(path)
|
||||
|
||||
return display_path
|
||||
|
||||
|
|
Loading…
Reference in New Issue