Skip to content

Commit

Permalink
Add more type hints for methods in check_eof script
Browse files Browse the repository at this point in the history
  • Loading branch information
Mab879 committed Nov 30, 2023
1 parent f8bc982 commit f68bead
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/check_eof.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_all_files(paths: list) -> list:
return files


def should_skip_file(file: pathlib.Path):
def should_skip_file(file: pathlib.Path) -> bool:
for exclude in EXCLUSIONS:
if exclude in str(file.absolute()):
return True
Expand All @@ -65,7 +65,7 @@ def get_files_with_no_newline(files: list) -> list:
return bad_files


def fix_file(file: pathlib.Path):
def fix_file(file: pathlib.Path) -> None:
with open(file.absolute(), 'a') as f:
f.write('\n')

Expand Down

0 comments on commit f68bead

Please sign in to comment.