Commit Graph
19 Commits
Author SHA1 Message Date
Mikhail Golubev 3b110194df PY-19375 Disable "Code compatibility" and "Missing or empty docstring" inspections in .pyi files 2016-05-05 14:06:33 +03:00
Andrey Vlasovskikh 5edd67644b Use upper-cased versions of built-in types in type descriptions (PY-16303) 2015-10-22 18:50:28 +03:00
Andrey Vlasovskikh 955e588e03 Show generic types in PEP 484 notation (PY-16889)
In particular, show unresolved refernces in generic bounds as Any.
We used to ignore these unresolved types which resulted in
incomprehensible warning messages.
2015-10-02 21:50:55 +03:00
Andrey Vlasovskikh e971940c7a Disable unused locals and statement has no effect inspections for Python stubs
All parameters in Python stubs are considered used. The '...' statement
common in Python stubs has no effect but it's use is specified by
PEP 484.
2015-09-02 22:20:41 +03:00
Andrey Vlasovskikh 46588e3a78 Fixed unnecessary calls to PyiTypeProvider for generic types 2015-09-02 19:13:22 +03:00
Andrey Vlasovskikh a0436ddad1 Allow @typing.overload functions to be located only in stubs with no original function in a Python file 2015-09-02 18:39:15 +03:00
Andrey Vlasovskikh 95840ca22b Type checker inspection checks arguments against multiple function signatures
This is necessary for @typing.overload.

Removed specialized code to check the default values of parameters
for NumPy as bad for performance (stubs->AST for every function with
default values). We'll replace it with another workaround.
2015-09-02 17:59:44 +03:00
Andrey Vlasovskikh 3115e8d79a Initial version of inferring the type of calls to overloaded functions
We don't handle the parameters of overloaded calls properly yet.
2015-09-01 17:53:34 +03:00
Andrey Vlasovskikh e3ff134329 Compute types of overloaded top-level functions in Python stubs
The corresponding tests still don't pass since we haven't switched
to multi-signature arguments-parameters mapping.
2015-08-26 13:45:01 +03:00
Andrey Vlasovskikh 4a90af129c Collect the type of functions with @typing.overload in PyiTypeProvider
The test of overloads in Python stubs still fails since this union
type isn't used when analyzing function calls and matching arguments
against formal parameters.
2015-08-06 16:08:27 +03:00
Andrey Vlasovskikh 8454b5747b Search for *.pyi stubs in sys.path 2015-07-31 15:07:24 +03:00
Andrey Vlasovskikh d737cf6b4e Resolve class attributes in Python stub files (PY-16402) 2015-07-13 19:23:17 +03:00
Andrey Vlasovskikh 283758f15e Don't expose any imported names in *.pyi except for the ones defined with "as" (PY-16402) 2015-07-13 18:40:05 +03:00
Andrey Vlasovskikh 60fdbc241d Resolve module attributes in Python stub files (PY-16402) 2015-07-13 14:19:05 +03:00
Andrey Vlasovskikh 56fa61cd49 Added a type provider for extracting the data from Python *.pyi stubs (PY-16402)
The provider is similar to PyUserSkeletonsTypeProvider. Currently it
searches for stubs only next to the original Python files. It provides
types of function parameters, function return types, function types,
target expression types.
2015-07-08 16:55:01 +03:00
Andrey Vlasovskikh 69b0243b5d Added a test for resolving from a Python *.pyi stub to a Python file (PY-16402) 2015-07-08 14:41:21 +03:00
Andrey Vlasovskikh 2df926971f Added a test for resolving builtins in *.pyi (PY-15206) 2015-07-08 01:28:32 +03:00
Andrey Vlasovskikh de7a0d6143 Resolve references inside *.pyi files (PY-15206) 2015-07-08 01:17:53 +03:00
Andrey Vlasovskikh 8d82508fc6 Parse *.pyi files using Python 3.5 (PY-15206) 2015-07-07 23:43:37 +03:00