Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 21, 2023
1 parent 1b64de2 commit 86e3cf7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fastapi_code_generator/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@ def get_argument_list(self, snake_case: bool, path: List[str]) -> List[Argument]
for argument in arguments:
if positional_argument and argument.required and argument.default is None:
argument.default = UsefulStr('...')
positional_argument = argument.required or (argument.default is not None) or argument.type_hint.startswith('Optional[')
positional_argument = (
argument.required
or (argument.default is not None)
or argument.type_hint.startswith('Optional[')
)

return arguments

Expand Down

0 comments on commit 86e3cf7

Please sign in to comment.