mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-23 21:55:49 +00:00
Make partial and example URLs in docstrings italic
Prevent Sphinx from turning them into broken links.
This commit is contained in:
parent
b9b4936729
commit
43507cf80a
4 changed files with 10 additions and 10 deletions
|
|
@ -31,7 +31,7 @@ def guess_url(url):
|
|||
|
||||
@param url: the URL to check
|
||||
@type url: unicode
|
||||
@return: url with http:// or ftp:// prepended if it's detected as
|
||||
@return: url with *http://* or *ftp://* prepended if it's detected as
|
||||
a http respective ftp URL.
|
||||
@rtype: unicode
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ def get_files(dirname):
|
|||
|
||||
def prepare_urlpath_for_nt(path):
|
||||
"""
|
||||
URLs like 'file://server/path/' result in a path named '/server/path'.
|
||||
However urllib.url2pathname expects '////server/path'.
|
||||
URLs like *file://server/path/* result in a path named */server/path*.
|
||||
However urllib.url2pathname expects *////server/path*.
|
||||
"""
|
||||
if '|' not in path:
|
||||
return "////" + path.lstrip("/")
|
||||
|
|
@ -124,7 +124,7 @@ class FileUrl(urlbase.UrlBase):
|
|||
|
||||
def build_base_url(self):
|
||||
"""The URL is normed according to the platform:
|
||||
- the base URL is made an absolute file:// URL
|
||||
- the base URL is made an absolute *file://* URL
|
||||
- under Windows platform the drive specifier is normed
|
||||
"""
|
||||
if self.base_url is None:
|
||||
|
|
@ -241,7 +241,7 @@ class FileUrl(urlbase.UrlBase):
|
|||
|
||||
def get_os_filename(self):
|
||||
"""
|
||||
Construct os specific file path out of the file:// URL.
|
||||
Construct os specific file path out of the *file://* URL.
|
||||
|
||||
@return: file name
|
||||
@rtype: string
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ class ProxySupport:
|
|||
|
||||
def set_proxy(self, proxy):
|
||||
"""Parse given proxy information and store parsed values.
|
||||
Note that only http:// proxies are supported, both for ftp://
|
||||
and http:// URLs.
|
||||
Note that only *http://* proxies are supported, both for *ftp://*
|
||||
and *http://* URLs.
|
||||
"""
|
||||
self.proxy = proxy
|
||||
self.proxytype = "http"
|
||||
|
|
|
|||
|
|
@ -328,11 +328,11 @@ class UrlBase:
|
|||
return self.ContentMimetypes.get(mime) == ctype
|
||||
|
||||
def is_http(self):
|
||||
"""Return True for http:// or https:// URLs."""
|
||||
"""Return True for *http://* or *https://* URLs."""
|
||||
return self.scheme in ("http", "https")
|
||||
|
||||
def is_file(self):
|
||||
"""Return True for file:// URLs."""
|
||||
"""Return True for *file://* URLs."""
|
||||
return self.scheme == "file"
|
||||
|
||||
def is_directory(self):
|
||||
|
|
@ -340,7 +340,7 @@ class UrlBase:
|
|||
return False
|
||||
|
||||
def is_local(self):
|
||||
"""Return True for local (ie. file://) URLs."""
|
||||
"""Return True for local (ie. *file://*) URLs."""
|
||||
return self.is_file()
|
||||
|
||||
def add_warning(self, s, tag=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue