Skip to content

Commit

Permalink
Compare years as ints
Browse files Browse the repository at this point in the history
  • Loading branch information
llugin committed Aug 9, 2024
1 parent a55fba0 commit 1ea08fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pontos/updateheader/updateheader.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ def update_file(
)

with_multi_year = copyright_match.creation_year and copyright_match.modification_year
with_single_year_outdated = not copyright_match.modification_year and copyright_match.creation_year < year
with_multi_year_outdated = with_multi_year and copyright_match.modification_year < year
with_single_year_outdated = not copyright_match.modification_year and int(copyright_match.creation_year) < int(year)
with_multi_year_outdated = with_multi_year and int(copyright_match.modification_year) < int(year)

if single_year and with_multi_year:
_substitute_license_text(fp, line, copyright_regex, copyright_term)
Expand Down

0 comments on commit 1ea08fe

Please sign in to comment.