diff --git a/copier_template/{{library_name}}/main.py.jinja b/copier_template/{{library_name}}/main.py.jinja index 1a83cd0..d311d13 100644 --- a/copier_template/{{library_name}}/main.py.jinja +++ b/copier_template/{{library_name}}/main.py.jinja @@ -5,7 +5,7 @@ import sys from typing import List import structlog -import typer +import typer # type: ignore from meltano.edk.extension import DescribeFormat from meltano.edk.logging import default_logging_config, parse_log_level from {{library_name}}.extension import {{ extension_name }} @@ -16,7 +16,8 @@ log = structlog.get_logger(APP_NAME) ext = {{ extension_name }}() -typer.core.rich = None # remove to enable stylized help output when `rich` is installed +# remove to enable stylized help output when `rich` is installed +typer.core.rich = None # type: ignore app = typer.Typer( name=APP_NAME, pretty_exceptions_enable=False, diff --git a/poetry.lock b/poetry.lock index 7f63202..717fcb1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -454,7 +454,7 @@ tornado = {version = "*", markers = "python_version > \"2.7\""} name = "markdown-it-py" version = "3.0.0" description = "Python port of markdown-it. Markdown parsing, done right!" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, @@ -566,7 +566,7 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "mdurl" version = "0.1.2" description = "Markdown URL utilities" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, @@ -1022,6 +1022,25 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] +[[package]] +name = "rich" +version = "13.7.1" +description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"}, + {file = "rich-13.7.1.tar.gz", hash = "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432"}, +] + +[package.dependencies] +markdown-it-py = ">=2.2.0" +pygments = ">=2.13.0,<3.0.0" +typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.9\""} + +[package.extras] +jupyter = ["ipywidgets (>=7.5.1,<9)"] + [[package]] name = "ruff" version = "0.3.4" @@ -1048,6 +1067,17 @@ files = [ {file = "ruff-0.3.4.tar.gz", hash = "sha256:f0f4484c6541a99862b693e13a151435a279b271cff20e37101116a21e2a1ad1"}, ] +[[package]] +name = "shellingham" +version = "1.5.4" +description = "Tool to Detect Surrounding Shell" +optional = false +python-versions = ">=3.7" +files = [ + {file = "shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686"}, + {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"}, +] + [[package]] name = "six" version = "1.16.0" @@ -1309,21 +1339,53 @@ files = [ [[package]] name = "typer" -version = "0.11.1" +version = "0.12.0" +description = "Typer, build great CLIs. Easy to code. Based on Python type hints." +optional = false +python-versions = ">=3.7" +files = [ + {file = "typer-0.12.0-py3-none-any.whl", hash = "sha256:0441a0bb8962fb4383b8537ada9f7eb2d0deda0caa2cfe7387cc221290f617e4"}, + {file = "typer-0.12.0.tar.gz", hash = "sha256:900fe786ce2d0ea44653d3c8ee4594a22a496a3104370ded770c992c5e3c542d"}, +] + +[package.dependencies] +typer-cli = "0.12.0" +typer-slim = {version = "0.12.0", extras = ["standard"]} + +[[package]] +name = "typer-cli" +version = "0.12.0" +description = "Typer, build great CLIs. Easy to code. Based on Python type hints." +optional = false +python-versions = ">=3.7" +files = [ + {file = "typer_cli-0.12.0-py3-none-any.whl", hash = "sha256:7b7e2dd49f59974bb5a869747045d5444b17bffb851e006cd424f602d3578104"}, + {file = "typer_cli-0.12.0.tar.gz", hash = "sha256:603ed3d5a278827bd497e4dc73a39bb714b230371c8724090b0de2abdcdd9f6e"}, +] + +[package.dependencies] +typer-slim = {version = "0.12.0", extras = ["standard"]} + +[[package]] +name = "typer-slim" +version = "0.12.0" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." optional = false python-versions = ">=3.7" files = [ - {file = "typer-0.11.1-py3-none-any.whl", hash = "sha256:4ce7b2a60b8543816ca97d5ec016026cbe95d1a7a931083b988c1d3682548fe7"}, - {file = "typer-0.11.1.tar.gz", hash = "sha256:f5ae987b97ebbbd59182f8e84407bbc925bc636867fa007bce87a7a71ac81d5c"}, + {file = "typer_slim-0.12.0-py3-none-any.whl", hash = "sha256:ddd7042b29a32140528caa415750bcae54113ba0c32270ca11a6f64069ddadf9"}, + {file = "typer_slim-0.12.0.tar.gz", hash = "sha256:3e8a3f17286b173d76dca0fd4e02651c9a2ce1467b3754876b1ac4bd72572beb"}, ] [package.dependencies] click = ">=8.0.0" +rich = {version = ">=10.11.0", optional = true, markers = "extra == \"standard\""} +shellingham = {version = ">=1.3.0", optional = true, markers = "extra == \"standard\""} typing-extensions = ">=3.7.4.3" [package.extras] -all = ["colorama (>=0.4.3,<0.5.0)", "rich (>=10.11.0,<14.0.0)", "shellingham (>=1.3.0,<2.0.0)"] +all = ["rich (>=10.11.0)", "shellingham (>=1.3.0)"] +standard = ["rich (>=10.11.0)", "shellingham (>=1.3.0)"] [[package]] name = "types-pyyaml" @@ -1396,4 +1458,4 @@ docs = ["furo", "myst-parser", "sphinx", "sphinx-autobuild", "sphinx-copybutton" [metadata] lock-version = "2.0" python-versions = ">=3.8,<4" -content-hash = "27b0d73f20cc62d7bb29fc56df7acea1a98059768bc3210476eeb82db0079fad" +content-hash = "840dc95911d5744124ba2239af4f6e95b23e390641b38983bae84fe78aee3f0a" diff --git a/pyproject.toml b/pyproject.toml index a7e4cfb..e5430df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ types-pyyaml = "^6.0.12.4" # Cookiecutter tests mypy = "^1.6" ruff = ">=0.1,<0.4" -typer = ">=0.6.1,<0.12.0" +typer = ">=0.6.1,<0.13.0" [tool.ruff] target-version = "py38"