Skip to content

Commit

Permalink
Add else pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
koxudaxi committed Dec 15, 2024
1 parent 7efe87a commit 209f4d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions datamodel_code_generator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ def get_header_and_first_line(csv_file: IO[str]) -> Dict[str, Any]:
if isinstance(input_, Path)
else input_
)
else: # pragma: no cover
raise Error(f'Unsupported input file type: {input_file_type}')
except: # noqa
raise Error('Invalid file format')

Expand Down

0 comments on commit 209f4d8

Please sign in to comment.