Skip to content

Commit

Permalink
Revert "remove mdformat because of (#13)"
Browse files Browse the repository at this point in the history
This reverts commit a6d309e.
  • Loading branch information
rmorshea committed Nov 21, 2024
1 parent a6d309e commit b0a1dd0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 0 additions & 3 deletions docs/src/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def get_message(*, recipient: Recipient = required) -> str:
```

!!! warning

Don't forget to add the `required` default value. Without it, PyBooster will not
know that the argument is a dependency that needs to be injected.

Expand Down Expand Up @@ -425,7 +424,6 @@ with solution(sqlite_connection.bind(":memory:")):
```

!!! note

Bindable parameters are not allowed to be dependencies.

### Generic Providers
Expand Down Expand Up @@ -535,7 +533,6 @@ with solution(config_file_provider.bind(Config, json_file)):
```

!!! tip

This approach also works great for a provider that has `overload` implementations.

### Singleton Providers
Expand Down
7 changes: 7 additions & 0 deletions project.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ def cov(no_test: bool, no_report: bool):

@main.command("lint")
@click.option("--check", is_flag=True, help="Check for linting issues without fixing.")
@click.option("--no-md-style", is_flag=True, help="Style check Markdown files.")
@click.option("--no-py-style", is_flag=True, help="Style check Python files.")
@click.option("--no-py-types", is_flag=True, help="Type check Python files.")
@click.option("--no-uv-locked", is_flag=True, help="Check that the UV lock file is synced")
@click.option("--no-yml-style", is_flag=True, help="Style check YAML files.")
def lint(
check: bool,
no_md_style: bool,
no_py_style: bool,
no_py_types: bool,
no_uv_locked: bool,
Expand All @@ -70,6 +72,11 @@ def lint(
else:
run(["ruff", "format"])
run(["ruff", "check", "--fix"])
if not no_md_style:
if check:
run(["mdformat", "--ignore-missing-references", "--check", "."])
else:
run(["mdformat", "--ignore-missing-references", "."])
if not no_yml_style:
if check:
run(["yamlfix", "--check", "."])
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ docs = [
]
lint = [
{ include-group = "test" },
"mdformat-mkdocs==3.1.1",
"mdformat-pyproject==0.0.1",
"mdformat-ruff==0.1.3",
"mdformat-tables==1.0.0",
"mdformat==0.7.19",
"pyright==1.1.389",
"ruff==0.7.3",
"yamlfix==1.17.0",
Expand Down

0 comments on commit b0a1dd0

Please sign in to comment.