Merge pull request #551 from cjmayo/links

Make LinkChecker documentation pass a LinkChecker check
This commit is contained in:
Chris Mayo 2021-08-19 19:28:19 +01:00 committed by GitHub
commit 31cc977582
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 15 additions and 15 deletions

View file

@ -97,7 +97,7 @@ As an exception to this rule, this specific document cannot be changed
without the consensus of all administrators of the project.
Note: Those guidelines were inspired by the `Collective Code
Construct Contract <https://rfc.zeromq.org/spec:42/C4/>`__. The
Construction Contract <https://rfc.zeromq.org/spec/42/>`__. The
document was found to be a little too complex and hard to read and
wasnt adopted in its entirety. See this
`discussion <https://github.com/zeromq/rfc/issues?utf8=%E2%9C%93&q=author%3Aanarcat%20>`__

View file

@ -1,4 +1,4 @@
:github_url: https://github.com/linkchecker/linkchecker/blob/master/doc/src/code/install.rst
:github_url: https://github.com/linkchecker/linkchecker/blob/master/doc/src/install.rst
Code
====

View file

@ -1,4 +1,4 @@
:github_url: https://github.com/linkchecker/linkchecker/blob/master/doc/src/linkchecker.rst
:github_url: https://github.com/linkchecker/linkchecker/blob/master/doc/src/man/linkchecker.rst
linkchecker
===========

View file

@ -1,4 +1,4 @@
:github_url: https://github.com/linkchecker/linkchecker/blob/master/doc/src/linkcheckerrc.rst
:github_url: https://github.com/linkchecker/linkchecker/blob/master/doc/src/man/linkcheckerrc.rst
linkcheckerrc
=============

View file

@ -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
"""

View file

@ -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

View file

@ -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"

View file

@ -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):

View file

@ -17,7 +17,7 @@
Robots.txt parser.
The robots.txt Exclusion Protocol is implemented as specified in
http://www.robotstxt.org/wc/norobots-rfc.html
https://www.robotstxt.org/norobots-rfc.txt
"""
import time
import urllib.parse