Skip to content

Commit bbd7a51

Browse files
authored
Merge pull request #5 from kumaranvpl/fix-pre-commit
Fix versions in pre-commit
2 parents 9bd8f88 + c4a710e commit bbd7a51

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 23.7.0
3+
rev: 24.4.2
44
hooks:
55
- id: black
66
files: "^fastapi_code_generator|^tests"
77
exclude: "^tests/data"
88
- repo: https://github.com/pycqa/isort
9-
rev: 5.12.0
9+
rev: 5.13.2
1010
hooks:
1111
- id: isort
1212
files: "^fastapi_code_generator|^tests"

fastapi_code_generator/parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@ def get_parameter_type(
299299
self.imports_for_fastapi.append(
300300
Import(from_='fastapi', import_=param_is)
301301
)
302-
default: Optional[
303-
str
304-
] = f"{param_is}({'...' if field.required else repr(schema.default)}, alias='{orig_name}')"
302+
default: Optional[str] = (
303+
f"{param_is}({'...' if field.required else repr(schema.default)}, alias='{orig_name}')"
304+
)
305305
else:
306306
default = repr(schema.default) if schema.has_default else None
307307
self.imports_for_fastapi.append(field.imports)

poetry.lock

Lines changed: 6 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pytest-mock = "*"
5050
mypy = "*"
5151
freezegun = "^1.2.2"
5252
black = "24.4.2"
53-
isort = "==5.11.4"
53+
isort = "==5.13.2"
5454

5555
#[tool.poetry.extras]
5656

0 commit comments

Comments
 (0)