mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-08 12:34:17 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
72ad6dc953
commit
f4cd1ba0d6
813 changed files with 66015 additions and 58839 deletions
|
|
@ -1,14 +1,12 @@
|
|||
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
|
||||
|
||||
"""The version and URL for coverage.py"""
|
||||
# This file is exec'ed in setup.py, don't import anything!
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
# version_info: same semantics as sys.version_info.
|
||||
# _dev: the .devN suffix if any.
|
||||
version_info = (7, 4, 4, "final", 0)
|
||||
version_info = (7, 4, 4, 'final', 0)
|
||||
_dev = 0
|
||||
|
||||
|
||||
|
|
@ -16,18 +14,18 @@ def _make_version(
|
|||
major: int,
|
||||
minor: int,
|
||||
micro: int,
|
||||
releaselevel: str = "final",
|
||||
releaselevel: str = 'final',
|
||||
serial: int = 0,
|
||||
dev: int = 0,
|
||||
) -> str:
|
||||
"""Create a readable version string from version_info tuple components."""
|
||||
assert releaselevel in ["alpha", "beta", "candidate", "final"]
|
||||
version = "%d.%d.%d" % (major, minor, micro)
|
||||
if releaselevel != "final":
|
||||
short = {"alpha": "a", "beta": "b", "candidate": "rc"}[releaselevel]
|
||||
version += f"{short}{serial}"
|
||||
assert releaselevel in ['alpha', 'beta', 'candidate', 'final']
|
||||
version = '%d.%d.%d' % (major, minor, micro)
|
||||
if releaselevel != 'final':
|
||||
short = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc'}[releaselevel]
|
||||
version += f'{short}{serial}'
|
||||
if dev != 0:
|
||||
version += f".dev{dev}"
|
||||
version += f'.dev{dev}'
|
||||
return version
|
||||
|
||||
|
||||
|
|
@ -41,8 +39,8 @@ def _make_url(
|
|||
) -> str:
|
||||
"""Make the URL people should start at for this version of coverage.py."""
|
||||
return (
|
||||
"https://coverage.readthedocs.io/en/"
|
||||
+ _make_version(major, minor, micro, releaselevel, serial, dev)
|
||||
'https://coverage.readthedocs.io/en/' +
|
||||
_make_version(major, minor, micro, releaselevel, serial, dev)
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue