Skip to content

Commit 972b2df

Browse files
committed
Update copyright to be dynamic
- Updated the copyright to be dynamic. - Made changes in import to adhere to PEP8
1 parent 4ae0b0e commit 972b2df

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/conf.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
# All configuration values have a default; values that are commented out
1212
# serve to show the default.
1313

14-
import sys, os
14+
import datetime
15+
import os
16+
import sys
1517

1618
# If extensions (or modules to document with autodoc) are in another directory,
1719
# add these directories to sys.path here. If the directory is relative to the
@@ -45,8 +47,11 @@
4547
master_doc = 'index'
4648

4749
# General information about the project.
50+
current_year = datetime.datetime.now().year
4851
project = u'pythonguide'
49-
copyright = u'2011–2018 <a href="https://www.kennethreitz.org/projects">Kenneth Reitz</a> &amp; <a href="https://realpython.com">Real Python</a>. <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA 3.0</a>'
52+
copyright = (u'2011-{} <a href="http://kennethreitz.com/pages/open-projects.html">Kenneth Reitz</a>'
53+
' &amp; <a href="https://realpython.com">Real Python</a>.'
54+
' <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA 3.0</a>').format(current_year)
5055

5156
# The version info for the project you're documenting, acts as replacement for
5257
# |version| and |release|, also used in various other places throughout the
@@ -241,7 +246,7 @@
241246
epub_title = u'pythonguide'
242247
epub_author = u'Kenneth Reitz'
243248
epub_publisher = u'Kenneth Reitz'
244-
epub_copyright = u'2011–2018, Kenneth Reitz & Real Python'
249+
epub_copyright = u'2011–{}, Kenneth Reitz & Real Python'.format(current_year)
245250

246251
# The language of the text. It defaults to the language option
247252
# or en if the language is not set.

0 commit comments

Comments
 (0)