mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-26 02:40:23 +00:00
Merge pull request #680 from cjmayo/misc
Collection of independent small improvements
This commit is contained in:
commit
b66ca30e84
6 changed files with 13 additions and 12 deletions
|
|
@ -157,7 +157,7 @@ Application
|
|||
.. option:: -D STRING, --debug=STRING
|
||||
|
||||
Print debugging output for the given logger.
|
||||
Available loggers are cmdline, checking, cache, plugin and all.
|
||||
Available debug loggers are cmdline, checking, cache, plugin and all.
|
||||
all is an alias for all available loggers.
|
||||
This option can be given multiple times to debug with more than one logger.
|
||||
|
||||
|
|
|
|||
|
|
@ -220,10 +220,9 @@ Application
|
|||
"""""""""""
|
||||
|
||||
**debug=**\ *STRING*\ [**,**\ *STRING*...]
|
||||
Print debugging output for the given modules. Available debug
|
||||
modules are **cmdline**, **checking**, **cache**, **dns**,
|
||||
**thread**, **plugins** and **all**. Specifying **all** is an alias
|
||||
for specifying all available loggers.
|
||||
Print debugging output for the given logger. Available debug
|
||||
loggers are **cmdline**, **checking**, **cache**, **plugin** and **all**.
|
||||
**all** is an alias for all available loggers.
|
||||
Command line option: :option:`--debug`
|
||||
|
||||
Quiet
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ class TextLogger(_Logger):
|
|||
self.write(
|
||||
_n("in %d URL", "in %d URLs", self.stats.num_urls) % self.stats.num_urls
|
||||
)
|
||||
self.write(" checked. ")
|
||||
self.write(_(" checked.") + " ")
|
||||
warning_text = (
|
||||
_n("%d warning found", "%d warnings found", self.stats.warnings_printed)
|
||||
% self.stats.warnings_printed
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@ class TestConfig(TestBase):
|
|||
"""Test configuration parsing."""
|
||||
|
||||
def test_confparse(self):
|
||||
# Tests must either cover every possiblity or
|
||||
# use a value other than the default
|
||||
# Tests must not use the default value only
|
||||
config = linkcheck.configuration.Configuration()
|
||||
files = [get_file("config0.ini")]
|
||||
config.read(files)
|
||||
|
|
|
|||
|
|
@ -45,4 +45,4 @@ class TestDecorators(unittest.TestCase):
|
|||
return 42
|
||||
|
||||
self.assertEqual(f(), 42)
|
||||
self.assertRegex(log.getvalue(), r"f took 1\.0. seconds")
|
||||
self.assertRegex(log.getvalue(), r"f took 1\.0\d seconds")
|
||||
|
|
|
|||
|
|
@ -41,9 +41,12 @@ class CustomBuildHook(BuildHookInterface):
|
|||
committer_date = committer_year = "unknown"
|
||||
try:
|
||||
cp = subprocess.run(["git", "log", "-n 1", "HEAD", "--format=%cs"],
|
||||
capture_output=True, text=True)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
capture_output=True, check=True, text=True)
|
||||
except (FileNotFoundError, subprocess.CalledProcessError):
|
||||
# support building wheel from sdist
|
||||
if Path(*RELEASE_PY).is_file():
|
||||
self.app.display_warning("_release.py already exists")
|
||||
return
|
||||
else:
|
||||
if cp and cp.stdout:
|
||||
committer_date = cp.stdout.strip()
|
||||
|
|
|
|||
Loading…
Reference in a new issue