forked from orbit-oss/flask
revert copyright year to project start
add copyright header to files
This commit is contained in:
parent
9bf5c3b3a3
commit
310fbfcf64
52 changed files with 167 additions and 52 deletions
16
docs/conf.py
16
docs/conf.py
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue