Close #8132: Add project_copyright confval as an alias of copyright

Avoid to pylint error, add a new config variable; project_copyright
as an alias of `copyright`.
This commit is contained in:
Takeshi KOMIYA 2020-12-27 18:39:48 +09:00
parent 4fc93ac13c
commit c7d1536828
3 changed files with 9 additions and 1 deletions

View File

@ -13,6 +13,8 @@ Deprecated
Features added
--------------
* #8132: Add :confval:`project_copyright` as an alias of :confval:`copyright`
Bugs fixed
----------

View File

@ -70,9 +70,14 @@ Project information
The author name(s) of the document. The default value is ``'unknown'``.
.. confval:: copyright
.. confval:: project_copyright
A copyright statement in the style ``'2008, Author Name'``.
.. versionchanged:: 3.5
As an alias, ``project_copyright`` is also allowed.
.. confval:: version
The major project version, used as the replacement for ``|version|``. For

View File

@ -98,7 +98,8 @@ class Config:
# general options
'project': ('Python', 'env', []),
'author': ('unknown', 'env', []),
'copyright': ('', 'html', []),
'project_copyright': ('', 'html', [str]),
'copyright': (lambda c: c.project_copyright, 'html', [str]),
'version': ('', 'env', []),
'release': ('', 'env', []),
'today': ('', 'env', []),