Skip to content

Commit 9262cc5

Browse files
oprypinmondeja
andauthored
Fix the code to abbreviate Python's version (#2618)
This breaks for Python >= 3.10 Co-authored-by: Álvaro Mondéjar Rubio <mondejar1994@gmail.com>
1 parent 8345850 commit 9262cc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mkdocs/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def callback(ctx, param, value):
146146
click.option('--use-directory-urls/--no-directory-urls', is_flag=True, default=None, help=use_directory_urls_help)
147147
])
148148

149-
PYTHON_VERSION = sys.version[:3]
149+
PYTHON_VERSION = f"{sys.version_info.major}.{sys.version_info.minor}"
150150

151151
PKG_DIR = os.path.dirname(os.path.abspath(__file__))
152152

0 commit comments

Comments
 (0)