summaryrefslogtreecommitdiff
path: root/sphinx/util/inspect.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch 'happy_new_year' into masterTakeshi KOMIYA2018-01-011-1/+1
|\
| * A happy new year!Takeshi KOMIYA2018-01-011-1/+1
| |
* | Fix mypy violationsTakeshi KOMIYA2017-12-161-5/+5
| |
* | Merge branch 'stable'Takeshi KOMIYA2017-11-021-0/+8
|\ \ | |/
| * inspect: Sort dictionary keys when possibleDmitry Shachnev2017-10-231-0/+8
| | | | | | | | | | This should help for reproducible builds and for finding items in large dictionaries.
* | Fix flake8 violationTakeshi KOMIYA2017-10-231-1/+1
| |
* | PEP8Antonio Valentino2017-08-201-1/+1
| |
* | Fix compatibility with Python 2Antonio Valentino2017-08-201-6/+9
| |
* | Improve fomatting (make flake8 happy)Antonio Valentino2017-08-181-2/+3
| |
* | Retireve docstirng form base classes (Closes #3140)Antonio Valentino2017-08-181-0/+96
| |
* | Fix mypy violationsTakeshi KOMIYA2017-07-151-1/+1
| |
* | Make self.signature to singular oneTakeshi KOMIYA2017-06-171-3/+3
| |
* | Fix the fallback value of annotationsTakeshi KOMIYA2017-06-171-1/+1
| |
* | Fix typing.UnionMeta is available on py35 or belowTakeshi KOMIYA2017-06-171-1/+2
| |
* | Add bound_method hint to Signature classTakeshi KOMIYA2017-06-171-7/+17
| |
* | Signature formats args of method correctly in py2Takeshi KOMIYA2017-06-171-1/+12
| |
* | Add Signature classTakeshi KOMIYA2017-06-171-3/+208
| |
* | sphinx.util.inspect: Use absolute_importTakeshi KOMIYA2017-06-171-4/+2
|/
* Merge branch 'stable' into 1.6-releaseTakeshi KOMIYA2017-05-131-1/+1
|\
| * Protect isenumclass predicate against non-class argumentsBryan Van de Ven2017-05-111-1/+1
| | | | | | | | | | | | | | | | fixes: #3731 Not being a class is another way a thing might not be an enum class, but without an explicit check, isenumclass raises an exception in this case.
* | Merge pull request #3449 from njsmith/getargspec-__wrapped__Takayuki SHIMIZUKAWA2017-04-191-34/+66
|\ \ | | | | | | On py3, use inspect.signature for more accurate signature calculation
| * | Uglify the code to make flake8 happierNathaniel J. Smith2017-02-241-3/+3
| | |
| * | Make sure that getargspec raises on built-in typesNathaniel J. Smith2017-02-241-0/+9
| | |
| * | On Py3, use inspect.signature for more accurate signature calculationNathaniel J. Smith2017-02-231-34/+57
| | | | | | | | | | | | | | | | | | | | | | | | This improves handling of wrapped functions and bound methods. It turns out that we no longer need to hack in support for functools.partial; inspect.signature handles this automatically. Added a test to make sure this didn't/doesn't regress.
* | | Merge branch 'stable'Takeshi KOMIYA2017-03-261-1/+1
|\ \ \ | | |/ | |/|
| * | Year++Takeshi KOMIYA2017-03-261-1/+1
| | |
* | | Upgrade to mypy-0.5Takeshi KOMIYA2017-03-031-2/+2
| |/ |/|
* | Merge branch 'stable'jfbu2017-02-181-1/+1
|\ \ | |/
| * Fix #3427: autodoc: memory addresses are not stripped on WindowsTakeshi KOMIYA2017-02-171-1/+1
| |
* | Fix mypy violationsTakeshi KOMIYA2017-02-081-2/+4
| |
* | Merge branch 'stable'jfbu2016-12-171-0/+7
|\ \ | |/
| * Fix #3255: In Py3.4 environment, autodoc doesn't support documentation for ↵shimizukawa2016-12-171-0/+7
| | | | | | | | attributes of Enum class correctly.
* | Add type-check annotations to sphinx.utilTakeshi KOMIYA2016-11-161-5/+15
|/
* Closes #3060: autodoc supports documentation for attributes of Enum class. ↵shimizukawa2016-10-281-0/+12
| | | | Now autodoc render just the value of Enum attributes instead of Enum attribute representation.
* Fix #2919: Drop py26 supportTakeshi KOMIYA2016-09-151-1/+1
|
* Simplify try-exceptLeo Huckvale2016-07-181-8/+1
|
* Refactor try-except clauseLeo Huckvale2016-07-151-7/+9
|
* Remove unused local variable for flake8 checkLeo Huckvale2016-07-141-1/+1
|
* inspect: return defargs[0] if obj.__dict__ raises exceptionLeo Huckvale2016-07-141-1/+12
| | | | | | | | The fallback implemented in #2731 cannot return `obj.__dict__[name]` if the `__dict__` method has been redefined in such a way that it raises an exception when trying to access it. This commit adds a try-except block to work around this.
* inspect: return obj.__dict__[name] if there is an exceptionSean Farley2016-06-301-0/+4
| | | | | | When using a cached property, Sphinx tries to access the actual property of an object which raises NotImplementedError. In these cases, we fall back to inspecting the __dict__ and returning that instead.
* Remove all memory addresses from autodocJojoBoulix2016-06-091-1/+1
| | | | | Change `object_desription()` to remove all hexadecimal addresses, not only those at the end of the string. The `repr()` of some objects is generated by taking the `repr()` of one object and then adding stuff to it. Therefore, memory addresses like `<object foo at 0xabcdef>` do not need to occur at the end of the string.
* Obligatory copyright update.Georg Brandl2016-01-141-1/+1
|
* util: pep8 fixesGeorg Brandl2015-03-081-4/+6
|
* Remove non-determinismDmitry Shachnev2015-01-281-2/+9
| | | | | | | | | | | | | | To enable packages using Sphinx to build reproducibly, its output needs to be the same from one build to another. Its output now strips memory references such as: <__main__.A at 0x7f68cb685710> In addition, various generated files (objects.inv, searchindex.js, translations) are now written with their keys in a determinstic order. Based on a patch by Chris Lamb <lamby@debian.org>.
* Merge branch 'stable'Georg Brandl2015-01-031-1/+1
|\
| * all: update copyrightGeorg Brandl2015-01-031-1/+1
| |
* | remove 'six' name except importing line.Takayuki Shimizukawa2014-04-301-5/+6
| |
* | introduce the six module and reduce sphinx.util.pycompat implementation. ↵Takayuki Shimizukawa2014-04-291-7/+6
| | | | | | | | refs #1350.
* | Update copyright year.Georg Brandl2014-03-011-1/+1
|\ \ | |/
| * Update copyright year.Georg Brandl2014-03-011-1/+1
| |