Skip to content

Commit 5e7997a

Browse files
committed
Small docstring cleanup.
1 parent 597ad37 commit 5e7997a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

domain_utils/domain_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,23 +119,23 @@ def hostname_subparts(url, include_ps=False, **kwargs):
119119
def get_stripped_url(url, scheme=False, drop_non_http=False, use_netloc=True):
120120
"""
121121
Returns a url stripped to just the beginning and end, or more formally,
122-
(scheme)?+netloc+path
122+
``(scheme)?+netloc+path``.
123123
For example ``https://my.domain.net/a/path/to/a/file.html#anchor?a=1``
124124
becomes ``my.domain.net/a/path/to/a/file.html``
125125
126126
URL parsing is done using std lib
127127
`urllib.parse.urlparse <https://docs.python.org/3.8/library/urllib.parse.html>`_.
128128
Empty scheme e.g. ``my.domain.cloudfront.net`` are assumed to be http schemes.
129129
130-
If a URL has a port but no scheme, urlparse determines the scheme to
130+
If a URL has a port but no scheme, urlparse determines the scheme to
131131
be the hostname and we do not handle this special case. In this case,
132-
the url will be treated as a non_http_scheme and the return value will
132+
the url will be treated as a non-http scheme and the return value will
133133
be determined by the ``drop_non_http`` setting.
134134
135135
:param url: URL to be parsed
136136
:type url: str
137137
:param scheme: If ``True``, scheme will be prepended in
138-
returned result, defaults to False
138+
returned result. Defaults is ``False``.
139139
:type scheme: bool, optional
140140
:param drop_non_http: Action to take if scheme is not
141141
``http`` or ``https`` e.g. ``file:`` or ``about:blank``.
@@ -145,7 +145,7 @@ def get_stripped_url(url, scheme=False, drop_non_http=False, use_netloc=True):
145145
if ``scheme=False``. The result for http urls will be the stripped
146146
url with or without the scheme as per scheme param.
147147
Default is ``False``.
148-
:type non_http_scheme: bool, optional
148+
:type drop_non_http: bool, optional
149149
:param use_netloc: If ``True`` urlparse's netloc will be used.
150150
If ``False`` urlparse's host will be returned. Using netloc means
151151
that a port is included, for example, if it was in the path.

0 commit comments

Comments
 (0)