Skip to content

Commit d0d3cd2

Browse files
committed
DOC: Change documentation copyright strings to use a dynamic end year
This change addresses numpy#26834 by changing the web page copyright strings for documentation and NEPs to have a dynamic end year which will always reflect the current year. [skip actions] [skip azp] [skip cirrus]
1 parent 735a477 commit d0d3cd2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

doc/neps/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# documentation root, use os.path.abspath to make it absolute, like shown here.
1717
#
1818
import os
19+
from datetime import datetime
1920
# import sys
2021
# sys.path.insert(0, os.path.abspath('.'))
2122

@@ -48,7 +49,8 @@
4849

4950
# General information about the project.
5051
project = 'NumPy Enhancement Proposals'
51-
copyright = '2017-2018, NumPy Developers'
52+
year = datetime.now().year
53+
copyright = f'2017-{year}, NumPy Developers'
5254
author = 'NumPy Developers'
5355
title = 'NumPy Enhancement Proposals Documentation'
5456

doc/source/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import importlib
55
from docutils import nodes
66
from docutils.parsers.rst import Directive
7+
from datetime import datetime
78

89
# Minimum version, enforced by sphinx
910
needs_sphinx = '4.3'
@@ -107,7 +108,8 @@ class PyTypeObject(ctypes.Structure):
107108

108109
# General substitutions.
109110
project = 'NumPy'
110-
copyright = '2008-2024, NumPy Developers'
111+
year = datetime.now().year
112+
copyright = f'2008-{year}, NumPy Developers'
111113

112114
# The default replacements for |version| and |release|, also used in various
113115
# other places throughout the built documents.

0 commit comments

Comments
 (0)