Skip to content

Commit 54ddbc4

Browse files
committed
Restore private _click_major variable and add public versions for full and major version.
1 parent 01b7cac commit 54ddbc4

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

consolekit/testing.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,24 @@
6969
from pytest_regressions.file_regression import FileRegressionFixture # nodep
7070
from typing_extensions import Literal
7171

72-
__all__ = ("CliRunner", "Result", "cli_runner")
72+
__all__ = ("CliRunner", "Result", "cli_runner", "click_version", "click_major")
7373

7474
_click_version = tuple(map(int, importlib_metadata.version("click").split('.')))
75+
_click_major = _click_version[0]
76+
77+
click_version: Tuple[int, ...] = _click_version
78+
"""
79+
The version number of the currently installed click package.
80+
81+
.. versionadded:: 1.9.0
82+
"""
83+
84+
click_major: int = _click_major
85+
"""
86+
The first part of the version number of the currently installed click package.
87+
88+
.. versionadded:: 1.9.0
89+
"""
7590

7691

7792
class Result(click.testing.Result):

0 commit comments

Comments
 (0)