Skip to content

Commit

Permalink
Check if generated file does not exist and generate it
Browse files Browse the repository at this point in the history
Signed-off-by: Kai-Uwe Hermann <[email protected]>
  • Loading branch information
hikinggrass committed Oct 14, 2024
1 parent 62634bc commit c535943
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ev-dev-tools/src/ev_cli/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,8 @@ def print_available_mod_files(mod_files):


def is_template_newer(file_info) -> Tuple[bool, str]:
if not file_info['path'].exists():
return (True, f' (Generated file did not exist)')

Check notice on line 674 in ev-dev-tools/src/ev_cli/helpers.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

ev-dev-tools/src/ev_cli/helpers.py#L674

f-string is missing placeholders (F541)
if file_info['template_mtime'] > file_info['path'].stat().st_mtime:
return (True, f' (Template file has changed since last generation)')

Check notice on line 676 in ev-dev-tools/src/ev_cli/helpers.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

ev-dev-tools/src/ev_cli/helpers.py#L676

f-string is missing placeholders (F541)
return (False, '')
Expand Down

0 comments on commit c535943

Please sign in to comment.