revert copyright year to project start

add copyright header to files
This commit is contained in:
David Lord 2018-02-08 10:57:40 -08:00
parent 9bf5c3b3a3
commit 310fbfcf64
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
52 changed files with 167 additions and 52 deletions

View file

@ -17,6 +17,8 @@ import pkg_resources
import time
import datetime
from sphinx.application import Sphinx
BUILD_DATE = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
# If extensions (or modules to document with autodoc) are in another directory,
@ -296,3 +298,17 @@ def unwrap_decorators():
unwrap_decorators()
del unwrap_decorators
def setup(app: Sphinx):
def cut_module_meta(app, what, name, obj, options, lines):
"""Remove metadata from autodoc output."""
if what != 'module':
return
lines[:] = [
line for line in lines
if not line.startswith((':copyright:', ':license:'))
]
app.connect('autodoc-process-docstring', cut_module_meta)