PY-18973 Fixed: implement support for PEP 515 (Underscores in Numeric Literals)
Update PyNumericLiteralExpression to support all possible forms of numeric literals (incl. underscores)
Update PyTypeCheckerInspection to warn about async generators without "async" inside comprehensions
Add tests for values iterated over async generator inside comprehensions
Introduce fake __asyncgenerator type for async generator objects described in PEP 525.
Update PyFunctionImpl.createCoroutineType to convert __generator to __asyncgenerator.
Update PyTargetExpressionImpl.getIterationType to infer type of elements which are getting from async generator
Highlight non-empty return inside async generators as error
Annotation is preserved at the level of assignment nodes similar to
where CPython keeps them in its AST (in special "augassign" nodes).
For type annotations in form "x: int" without variable initialization
special statement PyTypeDefinitionStatement was introduced.
Additionally, I did the following:
* re-generated lists of supported/unsupported interpreter modules
* updated test data wherever Python versions appear in warnings
Still need to figure out, though, why _bz2/bz2 modules were not found
for some old versions of Python, hence information about their presense
should be updated by hand in versions.xml.
PY-19530 Fixed: from MODULE import SUBMODULE as NAME not find inheritance
If superclass is imported via 'as', save its imported and original names in stubs.
Use original name in PySuperClassIndex building and imported name in superclasses calculating
Type checker has separate checks to perform type casting to abstract
base classes like Mapping, but it didn't support MutableMapping so this
commit added MutableMapping inspection to type checker.
Generally, you should never access invalid element. Invalid element is stale (cached somewhere and reused) hence it is bug to use it. We now use PyPsiUtil.assertValid to fight such access. Is you have PSIAE doublecheck your code. Beware of PSIAE error: it uses heuristic and may give wrong reason.
creating: check that namedtuple(...) is called, locally resolve tuple name and fields
IO: deserialize and serialize: callee name, tuple name, fields number and fields names
using: update PyStdlibTypeProvider to use stubs for namedtuples
Introduce PyClassLikeType.getMemberNames(boolean, TypeEvalContext). This method returns all members including dynamically ones (e.g. fields of namedtuple)