Skip to content

Commit

Permalink
Docstring for repository_url
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmojaki committed Jun 13, 2020
1 parent 1b1941e commit 4e6853a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Optional arguments:

Optional arguments:

- `repository_url` (default `https://pypi.python.org/pypi/%s/json`): format string to use a different repository pypi repository URL. For example test.pypi.org or a private repository. Formatter is passed the package name as the first argument.
- `repository_url` (default `https://pypi.python.org/pypi/%s/json`): a `%` style format string to use a different repository PyPI repository URL, e.g. test.pypi.org or a private repository. The string is formatted with the package name.

This still makes the HTTP call with retries and caches the result on disk. It doesn't use a separate thread or emit any warnings (unless there is an exception specifically while using the cache, in which case the check will be done without the cache).

Expand Down
5 changes: 5 additions & 0 deletions outdated/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ def check_outdated(package, version, repository_url='https://pypi.python.org/pyp
Attempts to cache on disk the HTTP call it makes for 24 hours. If this
somehow fails the exception is converted to a warning (OutdatedCacheFailedWarning)
and the function continues normally.
`repository_url` is a `%` style format string
to use a different repository PyPI repository URL,
e.g. test.pypi.org or a private repository.
The string is formatted with the package name.
"""

from pkg_resources import parse_version
Expand Down

0 comments on commit 4e6853a

Please sign in to comment.