diff options
author | Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> | 2020-07-16 04:17:38 +0200 |
---|---|---|
committer | Martin Braun <martin@gnuradio.org> | 2020-08-03 11:40:27 +0200 |
commit | a4b7a48f71a059c7410ee3e97aa682361cf22799 (patch) | |
tree | 9530900b05516aae06b6483781a5ebb818f322a0 /docs | |
parent | f25a97122d74ce8217efcdec807b4c338627ec06 (diff) |
python: Remove unnecessary 'from __future__ import'
All of the removed `from __future__ import` were needed in older
versions of Python (mostly 2.5.x and below) but later became mandatory
in most versions of Python 3 hence are not necessary anymore.
More specifically, according to __future__.py[1]:
- unicode_literals is part of Python since versions 2.6.0 and 3.0.0;
- print_function is part of Python since versions 2.6.0 and 3.0.0;
- absolute_import is part of Python since versions 2.5.0 and 3.0.0;
- division is part of Python since versions 2.2.0 and 3.0.0;
Get rid of those unnecessary imports to slightly clean up the codebase.
[1] https://github.com/python/cpython/blob/master/Lib/__future__.py
Diffstat (limited to 'docs')
-rw-r--r-- | docs/doxygen/doxyxml/__init__.py | 1 | ||||
-rw-r--r-- | docs/doxygen/doxyxml/base.py | 2 | ||||
-rw-r--r-- | docs/doxygen/doxyxml/doxyindex.py | 1 | ||||
-rw-r--r-- | docs/doxygen/doxyxml/generated/__init__.py | 1 | ||||
-rw-r--r-- | docs/doxygen/doxyxml/generated/compound.py | 1 | ||||
-rw-r--r-- | docs/doxygen/doxyxml/generated/compoundsuper.py | 2 | ||||
-rw-r--r-- | docs/doxygen/doxyxml/generated/index.py | 1 | ||||
-rw-r--r-- | docs/doxygen/doxyxml/generated/indexsuper.py | 2 | ||||
-rw-r--r-- | docs/doxygen/doxyxml/text.py | 1 | ||||
-rw-r--r-- | docs/doxygen/other/doxypy.py | 2 | ||||
-rw-r--r-- | docs/doxygen/update_pydoc.py | 1 |
11 files changed, 0 insertions, 15 deletions
diff --git a/docs/doxygen/doxyxml/__init__.py b/docs/doxygen/doxyxml/__init__.py index e2edf5b6d7..d07ccb828b 100644 --- a/docs/doxygen/doxyxml/__init__.py +++ b/docs/doxygen/doxyxml/__init__.py @@ -51,7 +51,6 @@ This line is uninformative and is only to test line breaks in the comments. u'Outputs the vital aadvark statistics.' """ -from __future__ import unicode_literals from .doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther diff --git a/docs/doxygen/doxyxml/base.py b/docs/doxygen/doxyxml/base.py index 193ceca8a5..845cee9227 100644 --- a/docs/doxygen/doxyxml/base.py +++ b/docs/doxygen/doxyxml/base.py @@ -13,8 +13,6 @@ Classes based upon this are used to make more user-friendly interfaces to the doxygen xml docs than the generated classes provide. """ -from __future__ import print_function -from __future__ import unicode_literals import os import pdb diff --git a/docs/doxygen/doxyxml/doxyindex.py b/docs/doxygen/doxyxml/doxyindex.py index 7818f46fa8..c4fd1f8be2 100644 --- a/docs/doxygen/doxyxml/doxyindex.py +++ b/docs/doxygen/doxyxml/doxyindex.py @@ -10,7 +10,6 @@ Classes providing more user-friendly interfaces to the doxygen xml docs than the generated classes provide. """ -from __future__ import unicode_literals import os diff --git a/docs/doxygen/doxyxml/generated/__init__.py b/docs/doxygen/doxyxml/generated/__init__.py index 23095c1f34..39823979f6 100644 --- a/docs/doxygen/doxyxml/generated/__init__.py +++ b/docs/doxygen/doxyxml/generated/__init__.py @@ -5,4 +5,3 @@ These do the real work of parsing the doxygen xml files but the resultant classes are not very friendly to navigate so the rest of the doxyxml module processes them further. """ -from __future__ import unicode_literals diff --git a/docs/doxygen/doxyxml/generated/compound.py b/docs/doxygen/doxyxml/generated/compound.py index cd3cd1f96b..294f0216e7 100644 --- a/docs/doxygen/doxyxml/generated/compound.py +++ b/docs/doxygen/doxyxml/generated/compound.py @@ -3,7 +3,6 @@ """ Generated Mon Feb 9 19:08:05 2009 by generateDS.py. """ -from __future__ import unicode_literals from xml.dom import minidom diff --git a/docs/doxygen/doxyxml/generated/compoundsuper.py b/docs/doxygen/doxyxml/generated/compoundsuper.py index f18ec6cda9..5a72b830ca 100644 --- a/docs/doxygen/doxyxml/generated/compoundsuper.py +++ b/docs/doxygen/doxyxml/generated/compoundsuper.py @@ -4,8 +4,6 @@ # Generated Thu Jun 11 18:44:25 2009 by generateDS.py. # -from __future__ import print_function -from __future__ import unicode_literals import sys diff --git a/docs/doxygen/doxyxml/generated/index.py b/docs/doxygen/doxyxml/generated/index.py index eb9a9048b2..c58407dbfe 100644 --- a/docs/doxygen/doxyxml/generated/index.py +++ b/docs/doxygen/doxyxml/generated/index.py @@ -3,7 +3,6 @@ """ Generated Mon Feb 9 19:08:05 2009 by generateDS.py. """ -from __future__ import unicode_literals from xml.dom import minidom diff --git a/docs/doxygen/doxyxml/generated/indexsuper.py b/docs/doxygen/doxyxml/generated/indexsuper.py index 11312db635..1e9ef4382e 100644 --- a/docs/doxygen/doxyxml/generated/indexsuper.py +++ b/docs/doxygen/doxyxml/generated/indexsuper.py @@ -4,8 +4,6 @@ # Generated Thu Jun 11 18:43:54 2009 by generateDS.py. # -from __future__ import print_function -from __future__ import unicode_literals import sys diff --git a/docs/doxygen/doxyxml/text.py b/docs/doxygen/doxyxml/text.py index d48c42cd31..dc3d390a7d 100644 --- a/docs/doxygen/doxyxml/text.py +++ b/docs/doxygen/doxyxml/text.py @@ -9,7 +9,6 @@ """ Utilities for extracting text from generated classes. """ -from __future__ import unicode_literals def is_string(txt): if isinstance(txt, str): diff --git a/docs/doxygen/other/doxypy.py b/docs/doxygen/other/doxypy.py index c615a08f4a..b500719011 100644 --- a/docs/doxygen/other/doxypy.py +++ b/docs/doxygen/other/doxypy.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -from __future__ import print_function -from __future__ import unicode_literals __applicationName__ = "doxypy" __blurb__ = """ diff --git a/docs/doxygen/update_pydoc.py b/docs/doxygen/update_pydoc.py index 44290e2fc6..e6b4544423 100644 --- a/docs/doxygen/update_pydoc.py +++ b/docs/doxygen/update_pydoc.py @@ -15,7 +15,6 @@ The file instructs Pybind11 to transfer the doxygen comments into the python docstrings. """ -from __future__ import unicode_literals import os, sys, time, glob, re, json from argparse import ArgumentParser |