* pygnulib/GLInfo.py (GLInfo.copyright_range): New function. Return a
copyright string with a year range.
* pygnulib/GLEmiter.py (GLEmiter.copyright_notice): Use the new function
for file copyright headers.
+2024-02-28 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Emit year range on file copyright notices.
+ * pygnulib/GLInfo.py (GLInfo.copyright_range): New function. Return a
+ copyright string with a year range.
+ * pygnulib/GLEmiter.py (GLEmiter.copyright_notice): Use the new function
+ for file copyright headers.
+
2024-02-28 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Make module sorting more similar to gnulib-tool.
'''GLEmiter.copyright_notice() -> str
Emit a header for a generated file.'''
- emit = "# %s" % self.info.copyright()
+ emit = '# %s' % self.info.copyright_range()
emit += """
#
# This file is free software; you can redistribute it and/or modify
result = re.compile(' .*').sub('', first_changelog_line)
return result
+ def copyright_range(self):
+ '''Returns a formatted copyright string showing a year range.'''
+ return f'Copyright (C) {constants.__copyright__}'
+
def usage(self):
'''Show help message.'''
result = '''\