summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichele Simionato <michele.simionato@gmail.com>2018-04-15 15:22:10 +0200
committerMichele Simionato <michele.simionato@gmail.com>2018-04-15 15:22:10 +0200
commita960e032285948342b4cd8f0ea88f4ba24b53866 (patch)
treeccf868ae0dd1e7c7889745f9487936e578511399
parente26c05d7a6ed19424526d5031a9883ad72cf58bb (diff)
downloadpython-decorator-git-a960e032285948342b4cd8f0ea88f4ba24b53866.tar.gz
Fixed version number in the PDF
-rw-r--r--docs/conf.py8
-rw-r--r--docs/tests.documentation.rst15
2 files changed, 5 insertions, 18 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 5415263..9e0ffad 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -13,8 +13,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys
-import os
+from decorator import __version__
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -49,7 +48,7 @@ master_doc = 'index'
# General information about the project.
project = 'decorator'
-copyright = '2017, Michele Simionato'
+copyright = '2005-2018, Michele Simionato'
author = 'Michele Simionato'
# The version info for the project you're documenting, acts as replacement for
@@ -57,9 +56,8 @@ author = 'Michele Simionato'
# built documents.
#
# The short X.Y version.
-version = '4.1'
+version = release = __version__
# The full version, including alpha/beta/rc tags.
-release = '4.1.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/docs/tests.documentation.rst b/docs/tests.documentation.rst
index a0f34d8..16f94a9 100644
--- a/docs/tests.documentation.rst
+++ b/docs/tests.documentation.rst
@@ -478,7 +478,7 @@ like this:
return decorator(caller)
This is fully general but requires an additional level of nesting. For this
-reasone since version 4.2 there is a facility to build
+reason since version 4.2 there is a facility to build
decorator factories by using a single caller with default arguments i.e.
writing something like this:
@@ -492,7 +492,7 @@ Notice that this simplified approach *only works with default arguments*,
i.e. `param1`, `param2` etc must have known defaults. Thanks to this
restriction, there exists an unique default decorator, i.e. the member
of the family which uses the default values for all parameters. Such
-decorator can be written as `decfactory()` with no parameters specified;
+decorator can be written as ``decfactory()`` with no parameters specified;
moreover, as a shortcut, it is also possible to elide the parenthesis,
a feature much requested by the users. For years I have been opposite
to this feature request, since having expliciti parenthesis to me is more clear
@@ -589,17 +589,6 @@ where ``restricted`` is a decorator factory defined as follows
% (self.user, func.__name__))
-In general a decorator factory has a signature
-
-.. code-block:: python
-
- def decfactory(func, par1=default1, .., parN=defaultN, *a, **k):
- ...
-
-Each parameter must have a default, so that ``decfactory`` can work
-as an alias for ``decfactory()``, i.e. the decorator in which all parameters
-have the default value.
-
``decorator(cls)``
--------------------------------------------