Skip to content

Commit

Permalink
Compare years as ints
Browse files Browse the repository at this point in the history
  • Loading branch information
llugin authored and greenbonebot committed Aug 13, 2024
1 parent 3f37803 commit e2a3689
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 @@ -226,8 +226,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 e2a3689

Please sign in to comment.