Skip to content

Commit

Permalink
Fix lint remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorbirjukov committed Apr 12, 2020
1 parent 20fcc08 commit a757f0d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion news/1182.feature
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Added support for ntlm authentication using ``--auth-ntlm`` option.
Added support for ntlm authentication using ``--auth-ntlm`` option.
6 changes: 5 additions & 1 deletion src/pip/_internal/cli/req_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
from pip._internal.cli import cmdoptions
from pip._internal.cli.base_command import Command
from pip._internal.cli.command_context import CommandContextMixIn
from pip._internal.exceptions import CommandError, InstallationError, PreviousBuildDirError
from pip._internal.exceptions import (
CommandError,
InstallationError,
PreviousBuildDirError,
)
from pip._internal.index.package_finder import PackageFinder
from pip._internal.models.selection_prefs import SelectionPreferences
from pip._internal.network.auth import MultiDomainNtlmAuth
Expand Down
12 changes: 7 additions & 5 deletions src/pip/_internal/network/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@

import logging

try:
from requests_ntlm import HttpNtlmAuth # noqa
except ImportError:
HttpNtlmAuth = None

from pip._vendor.requests.auth import AuthBase, HTTPBasicAuth
from pip._vendor.requests.utils import get_netrc_auth
from pip._vendor.six.moves.urllib import parse as urllib_parse
Expand All @@ -28,6 +23,13 @@
)
from pip._internal.utils.typing import MYPY_CHECK_RUNNING

try:
from requests_ntlm import HttpNtlmAuth # noqa
except ImportError:
HttpNtlmAuth = None



if MYPY_CHECK_RUNNING:
from optparse import Values
from typing import Dict, Optional, Tuple
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def test_pep518_forkbombs(script, data, common_wheels, command, package):
def test_without_ntlm(script, data):
result = script.pip(
'install', '--auth-ntlm',
'-f', data.packages,
'-f', data.packages,
'INITools==0.2',
expect_error=True,
)
Expand Down

0 comments on commit a757f0d

Please sign in to comment.