Skip to content

Commit

Permalink
Fixed linting problems
Browse files Browse the repository at this point in the history
  • Loading branch information
cc-a committed Dec 3, 2019
1 parent 4183610 commit f28c217
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 20 deletions.
6 changes: 3 additions & 3 deletions docs/docs/repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ a custom certificate authority or client certificates, similarly refer to the ex
`certificates` section. Poetry will use these values to authenticate to your private repository when downloading or
looking for packages.

### Non-Pep 503 Repositories
### Non-Pep 503 Repositories

A private repository may not follow the structure described in Pep 503. In this case you
can use the `find_links` keyword. The below provides the equivalent behaviour to `pip
can use the `find_links` keyword. The below provides the equivalent behaviour to `pip
install --find-links https://foo.bar/index.html`.


Expand All @@ -136,7 +136,7 @@ find_links = true
```

If `find_links` is used the url may return a html page containing links to python
archives, or may point directly to an installable artifact e.g.
archives, or may point directly to an installable artifact e.g.
https://foo.bar/poetry-0.1.0-py3-none-any.whl. The use of `find_links` with local
paths or file:// urls is not yet supported.

Expand Down
1 change: 0 additions & 1 deletion poetry/installation/pip_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def install(self, package, update=False):
)
args += ["--trusted-host", parsed.hostname]


if repository.cert:
args += ["--cert", str(repository.cert)]

Expand Down
19 changes: 10 additions & 9 deletions poetry/repositories/find_links_repository.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import re

from typing import Generator
from typing import Tuple
from typing import Union

from poetry.packages.utils.link import Link

from .legacy_repository import LegacyRepository
from .legacy_repository import Page


try:
import urllib.parse as urlparse
except ImportError:
Expand All @@ -15,15 +25,6 @@

unescape = HTMLParser().unescape

from typing import Generator
from typing import Tuple
from typing import Union


from poetry.packages.utils.link import Link

from .legacy_repository import LegacyRepository, Page


def parse_url(url): # type: (str) -> Tuple[str, str]
"""Parse an url returning the base url for the repository and
Expand Down
2 changes: 1 addition & 1 deletion tests/installation/test_pip_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from poetry.installation.pip_installer import PipInstaller
from poetry.io.null_io import NullIO
from poetry.packages.package import Package
from poetry.repositories.legacy_repository import LegacyRepository
from poetry.repositories.find_links_repository import FindLinksRepository
from poetry.repositories.legacy_repository import LegacyRepository
from poetry.repositories.pool import Pool
from poetry.utils._compat import Path
from poetry.utils.env import NullEnv
Expand Down
13 changes: 7 additions & 6 deletions tests/repositories/test_find_links_repository.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import shutil

try:
import urllib.parse as urlparse
except ImportError:
import urlparse

from poetry.packages.utils.link import Link
from poetry.repositories.find_links_repository import FindLinksRepository
from poetry.repositories.find_links_repository import FilteredPage
from poetry.repositories.find_links_repository import FindLinksRepository
from poetry.repositories.find_links_repository import SingleLink
from poetry.utils._compat import Path

from .test_legacy_repository import MockRepository as LegacyMockRepository


try:
import urllib.parse as urlparse
except ImportError:
import urlparse


TEST_PACKAGES = ["isort", "futures"]


Expand Down

0 comments on commit f28c217

Please sign in to comment.