Commit Graph

14 Commits

Author SHA1 Message Date
Phillip Schanely
86f9472bc9 Correct 2 typing comments in inspect module (#2110) 2018-05-12 01:27:29 -04:00
Jelle Zijlstra
26e573ba1c change default value to ... in inspect.pyi (#1998)
This is in our style guide. This is the last piece of offending code; I just submitted ambv/flake8-pyi#10 to enforce the rule in the linter in the future.
2018-03-28 20:24:39 -07:00
rchen152
8d46ada49d Add undocumented but occasionally used attributes to inspect.pyi. (#1864)
* Add attributes not in docs to 2/inspect.pyi.
* Add attributes not in docs to 3/inspect.pyi.
* Change list to List[Any] in 2/inspect.pyi
2018-02-14 16:20:55 +00:00
Jelle Zijlstra
54dd6ba27c Change numerous default values to ... (#1722)
This is the convention, and some default values (e.g. strings) apparently
break pytype.
2017-11-09 06:28:40 -08:00
Jelle Zijlstra
4ea798b869 inspect.getmoduleinfo was removed in 3.6 (#1318)
Compare https://docs.python.org/3.5/library/inspect.html#inspect.getmoduleinfo
and https://docs.python.org/3.6/library/inspect.html
2017-05-23 16:52:16 -07:00
Jelle Zijlstra
c1944f944e fix some missing ", ..." in tuples (#1079) 2017-03-22 21:04:39 -07:00
Jelle Zijlstra
349ff59f33 change empty bodies from "pass" to "..."
CONTRIBUTING.md says to prefer ... Not the most impactful change but fixing
these will allow us to lint for it in the future and get a consistent style.
2017-03-16 09:13:08 -07:00
Alvaro Caceres
f90a6d1c0e Inspect: use any instead of object (#585)
* Have inspect.getmembers' return value use Any instead of object
2016-10-06 11:36:17 -07:00
Antoine Catton
5b5135878b Typo: isis -> is (#495)
Fixes inspect.isgeneratorfunction().
2016-08-23 16:24:16 -07:00
Jakub Stasiak
ea37877558 Improve Python 3 inspect stub
This is follow-up to a similar commit improving Python 2.7 inspect stub[1].

Similarly, this commit consists of:

* Splitting and reordering the content into sections corresponding
  to the module's documentation sections
* Implementing missing functions, classes etc.
* Adding TODOs for things that are either difficult to get or I can't
  figure them out right now
* Making the existing code consistent with the newly added things

As suggested in pull request #108 I'm modifying the generic Python 3
stub even though some things changed and were added in various Python
3.x releases - the changes seem to be backwards compatible and the
additions, well, they should not break much except for some false
positives on older Python 3 versions.

Some of the types in this stub were not obvious so I either read the
source code or used my judgment.

[1] 630f718376
2016-03-10 01:28:07 +01:00
Guido van Rossum
740568ed25 Use NamedTuple for inspect.ArgSpec and .FullArgSpec. 2016-01-18 16:51:23 -08:00
Ben Darnell
3a674645a5 Assorted fixes to stubs 2016-01-16 16:52:01 -05:00
Ben Longbons
793f3399a7 Stub for inspect.stack() and related classes 2015-10-12 10:35:04 -07:00
Matthias Kramm
337abed05a add (overwrite with) mypy stubs, if available 2015-09-30 09:59:44 -07:00