From e2a36899151e79a67dcd93a20c1f0c189447330a Mon Sep 17 00:00:00 2001 From: Leszek Lugin Date: Fri, 9 Aug 2024 16:53:06 +0200 Subject: [PATCH] Compare years as ints --- pontos/updateheader/updateheader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pontos/updateheader/updateheader.py b/pontos/updateheader/updateheader.py index 9f70ede9..9d76d5c3 100644 --- a/pontos/updateheader/updateheader.py +++ b/pontos/updateheader/updateheader.py @@ -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)