diff --git a/README.md b/README.md index e2ca765..5f69ad4 100644 --- a/README.md +++ b/README.md @@ -41,10 +41,11 @@ app = typer.Typer() @app.command() -@use_yaml_config() # MUST BE AFTER @app.command() -def main(...): +@use_yaml_config() # MUST BE AFTER @app.command() +def main(foo: FooType): ... + if __name__ == "__main__": app() ``` diff --git a/docs/index.md b/docs/index.md index 5328655..f9a277e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,16 +24,17 @@ You can use a decorator to quickly add a configuration parameter to your `typer` ```py import typer -from typer_config import use_yaml_config # other formats available (1) +from typer_config import use_yaml_config # other formats available (1) app = typer.Typer() @app.command() -@use_yaml_config() # MUST BE AFTER @app.command() (2) -def main(...): +@use_yaml_config() # MUST BE AFTER @app.command() (2) +def main(foo: FooType): ... + if __name__ == "__main__": app() ``` diff --git a/duties.py b/duties.py index b7f9181..16b5a95 100644 --- a/duties.py +++ b/duties.py @@ -44,7 +44,7 @@ def fmt_docs(ctx: Context): ctx (Context): the context instance (passed automatically). """ ctx.run( - blacken_docs.run("docs/", exts=[".md"]), + blacken_docs.run("./", exts=[".md"]), nofail=True, title="Formatting docs (blacken-docs)", ) diff --git a/poetry.lock b/poetry.lock index ede6537..5aa4c9c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -99,7 +99,7 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "blacken_docs" -version = "1.15.0" +version = "1.16.0" description = "" optional = false python-versions = ">=3.8" @@ -112,8 +112,8 @@ black = ">=22.1.0" [package.source] type = "git" url = "https://github.com/maxb2/blacken-docs.git" -reference = "fbd2ffc07e4afa42c23130489ee1ac7b06f0f1a9" -resolved_reference = "fbd2ffc07e4afa42c23130489ee1ac7b06f0f1a9" +reference = "81051e16aadfd6e6b67b0f498bf70978bce02e03" +resolved_reference = "81051e16aadfd6e6b67b0f498bf70978bce02e03" [[package]] name = "certifi" @@ -1817,4 +1817,4 @@ yaml = ["pyyaml"] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "0cd2c05b8e931bf720dc5d38c6dfc80b64fb6bfb35db2f094b2d6f62d10ab92c" +content-hash = "ea9e11bb2cde977a86db0c0ae4620d68086032522263795ef85e1f100fbec5f2" diff --git a/pyproject.toml b/pyproject.toml index 1f4cdbc..3030fda 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ mkdocstrings = {extras = ["python"], version = ">=0.21.2,<0.23.0"} mike = "^1.1.2" mkdocs-gen-files = "^0.5.0" pydantic = ">=1.10.7,<3.0.0" -blacken-docs = { git = "https://github.com/maxb2/blacken-docs.git", rev = "fbd2ffc07e4afa42c23130489ee1ac7b06f0f1a9" } +blacken-docs = { git = "https://github.com/maxb2/blacken-docs.git", rev = "81051e16aadfd6e6b67b0f498bf70978bce02e03" } schema = "^0.7.5" [tool.isort]