Skip to content

Commit f8022a3

Browse files
authored
chore: updatin using repo-review (#31)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent ad52da6 commit f8022a3

File tree

5 files changed

+22
-23
lines changed

5 files changed

+22
-23
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "weekly"
8+
groups:
9+
actions:
10+
patterns:
11+
- "*"

.pre-commit-config.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ ci:
33
autofix_commit_msg: "style: pre-commit fixes"
44

55
repos:
6-
- repo: https://github.com/psf/black
7-
rev: "25.1.0"
8-
hooks:
9-
- id: black-jupyter
10-
116
- repo: https://github.com/pre-commit/pre-commit-hooks
127
rev: "v5.0.0"
138
hooks:
@@ -31,24 +26,25 @@ repos:
3126
- id: rst-directive-colons
3227
- id: rst-inline-touching-normal
3328

34-
- repo: https://github.com/pre-commit/mirrors-prettier
35-
rev: "v4.0.0-alpha.8"
29+
- repo: https://github.com/rbubley/mirrors-prettier
30+
rev: "v3.5.3"
3631
hooks:
3732
- id: prettier
3833
types_or: [yaml, markdown, html, css, scss, javascript, json]
3934
args: [--prose-wrap=always]
4035

41-
- repo: https://github.com/asottile/blacken-docs
36+
- repo: https://github.com/adamchainz/blacken-docs
4237
rev: "1.19.1"
4338
hooks:
4439
- id: blacken-docs
45-
additional_dependencies: [black==23.3.0]
40+
additional_dependencies: [black~=25.0]
4641

4742
- repo: https://github.com/astral-sh/ruff-pre-commit
48-
rev: "v0.11.5"
43+
rev: "v0.11.6"
4944
hooks:
5045
- id: ruff
5146
args: ["--fix", "--show-fixes"]
47+
- id: ruff-format
5248

5349
- repo: https://github.com/pre-commit/mirrors-mypy
5450
rev: "v1.15.0"

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ implement; one required hook and two optional hooks. The required hook is:
7474
def dynamic_metadata(
7575
field: str,
7676
settings: dict[str, object] | None = None,
77-
) -> str | dict[str, str | None]:
78-
... # return the value of the metadata
77+
) -> str | dict[str, str | None]: ... # return the value of the metadata
7978
```
8079

8180
The backend will call this hook in the same directory as PEP 517's hooks.
@@ -85,8 +84,11 @@ There are two optional hooks.
8584
A plugin can return METADATA 2.2 dynamic status:
8685

8786
```python
88-
def dynamic_wheel(field: str, settings: Mapping[str, Any] | None = None) -> bool:
89-
... # Return true if metadata can change from SDist to wheel (METADATA 2.2 feature)
87+
def dynamic_wheel(
88+
field: str, settings: Mapping[str, Any] | None = None
89+
) -> (
90+
bool
91+
): ... # Return true if metadata can change from SDist to wheel (METADATA 2.2 feature)
9092
```
9193

9294
If this hook is not implemented, it will default to "false". Note that "version"
@@ -98,8 +100,7 @@ A plugin can also decide at runtime if it needs extra dependencies:
98100
```python
99101
def get_requires_for_dynamic_metadata(
100102
settings: Mapping[str, Any] | None = None,
101-
) -> list[str]:
102-
... # return list of packages to require
103+
) -> list[str]: ... # return list of packages to require
103104
```
104105

105106
This is mostly used to provide wrappers for existing non-compatible plugins and

pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ files = ["src", "tests"]
9494
python_version = "3.8"
9595
warn_unused_configs = true
9696
strict = true
97-
show_error_codes = true
9897
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
9998
warn_unreachable = true
10099
disallow_untyped_defs = false
@@ -110,9 +109,6 @@ module = "setuptools_scm"
110109
ignore_missing_imports = true
111110

112111

113-
[tool.ruff]
114-
src = ["src"]
115-
116112
[tool.ruff.lint]
117113
extend-select = [
118114
"B", # flake8-bugbear

src/dynamic_metadata/schema.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212

1313
def get_schema() -> dict[str, Any]:
14-
with resources.files("dynamic_metadata").joinpath(
15-
"resources/toml_schema.json"
16-
).open(encoding="utf-8") as f:
14+
with (
15+
resources.files("dynamic_metadata")
16+
.joinpath("resources/toml_schema.json")
17+
.open(encoding="utf-8")
18+
) as f:
1719
return json.load(f) # type: ignore[no-any-return]

0 commit comments

Comments
 (0)