Skip to content

Commit

Permalink
chore: update blacken-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
maxb2 committed Aug 16, 2023
1 parent 578c9de commit 66b9dce
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
```
Expand Down
7 changes: 4 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
```
Expand Down
2 changes: 1 addition & 1 deletion duties.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
)
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 66b9dce

Please sign in to comment.