Skip to content

Commit

Permalink
Support newer versions of click (#49)
Browse files Browse the repository at this point in the history
* Support newer versions of click

* upgrade black
  • Loading branch information
ofek authored Apr 2, 2022
1 parent 3a6f274 commit a61fc53
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions mkdocs_click/_docs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under the Apache license (see LICENSE)
import inspect
from typing import Iterator, List, cast

import click
Expand Down Expand Up @@ -113,6 +114,9 @@ def _make_description(ctx: click.Context, remove_ascii_art: bool = False) -> Ite
help_string = ctx.command.help or ctx.command.short_help

if help_string:
# https://github.com/pallets/click/pull/2151
help_string = inspect.cleandoc(help_string)

if remove_ascii_art:
skipped_ascii_art = True
for i, line in enumerate(help_string.splitlines()):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ twine
wheel

# Linters
black==20.8b1
black==22.3.0
flake8==3.8.4
mypy==0.790

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_long_description() -> str:
author_email="[email protected]",
license="Apache",
packages=["mkdocs_click"],
install_requires=["click>=7,<9", "markdown==3.*"],
install_requires=["click>=8.1", "markdown==3.*"],
python_requires=">=3.7",
include_package_data=True,
zip_safe=False,
Expand All @@ -44,5 +44,5 @@ def get_long_description() -> str:
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
]
],
)

0 comments on commit a61fc53

Please sign in to comment.