Commit Graph
1335 Commits
Author SHA1 Message Date
Semyon Proshev cef21f2445 Fix provided type for namedtuple._replace when receiver is namedtuple definition (PY-27148) 2018-10-15 16:46:55 +03:00
Semyon Proshev 6a83e3f336 Ignore access to namedtuple's _field_defaults and _field_types (PY-27148) 2018-10-12 16:52:56 +03:00
Mikhail Golubev a5f412d2ed PY-31442 Spellchecker properly handles f-strings
It also now correctly processes escape sequences in
mixed up raw and normal string elements (previously
it stopped extracting escapes altogether once there
was at least one raw string element among those
belonging to a string literal expression).
2018-10-01 12:46:49 +03:00
Mikhail Golubev 34eb344514 PY-31442 Update tests on creating definitions from unresolved references in f-strings 2018-10-01 12:46:46 +03:00
Mikhail Golubev 2289223414 PY-31795 Don't suggest removing parentheses when there is no expression inside 2018-09-25 15:56:54 +03:00
Mikhail Golubev a28f8a4668 PY-31424 Adjust the signature to TypeVar to accept type references
One can pass string literals containing such references both to "*constraints"
and "bound" parameters.
2018-08-17 12:57:03 +03:00
Mikhail Golubev 7c2b079481 PY-24161 Properly treat variables annotated with Type[...] as callable 2018-08-15 12:44:23 +03:00
Andrey Vlasovskikh 94923b4447 PY-30803 Ignore requirements with environment markers
Environment markers are not supported yet, see PEP 496.
2018-08-03 17:10:29 +03:00
Semyon Proshev c1cd227e56 Fix test data after syncing with typeshed 2018-07-23 18:11:07 +03:00
Semyon Proshev c579994aec Quick fix to set abc.ABCMeta as metaclass (PY-30789) 2018-07-17 20:27:51 +03:00
Semyon Proshev e2855325d1 Quick fix to add abc.ABC to superclasses (PY-30789) 2018-07-17 20:27:51 +03:00
Semyon Proshev b8f5298ee3 Consider class inheriting abc.ABC as abstract (PY-30789) 2018-07-17 20:27:51 +03:00
Semyon Proshev 8b0dbf4e1b Ignore init=False attributes while inspecting fields order (PY-30880) 2018-07-16 15:44:23 +03:00
Anton Bragin 2b5e738a5a PY-30827 PyRenameElementQuickFix changed to avoid special handling of unit test cases
Test data and PyQuickFixTest are updated accordingly. Test for renaming in language injection added.
2018-07-13 10:46:32 +03:00
Semyon Proshev c0b63fdc4c Add support for bool literals in Py3+ (PY-29731) 2018-07-02 17:39:28 +03:00
Semyon Proshev 98582a7785 Check original parameter default value if stub one is ellipsis (PY-30335) 2018-06-29 20:59:12 +03:00
Semyon Proshev 48fd617336 Distinguish same number and string keys by quoting strings (PY-30423) 2018-06-18 20:03:36 +03:00
Semyon Proshev 5571702b32 Enable pathlib, io, itertools, ssl stubs (PY-30450, PY-29863, PY-27972, PY-28155, PY-15949, PY-22845) 2018-06-18 19:02:37 +03:00
Andrey Vlasovskikh 9c6480b7ec Moved former skeletons test for namedtuple() to regular tests 2018-06-18 15:14:02 +03:00
Elizaveta Shashkova 94c9f9b818 Add inspection for not awaited coroutines (PY-17292) 2018-06-07 20:17:02 +03:00
Elizaveta Shashkova 1ac30ed12d Fix unbound local variable after exception inside with statement (PY-13919)
Change control flow to make it more correct for with statement. Handle special case for Unbound local variable inspection and add tests
2018-05-29 19:54:26 +03:00
Semyon Proshev bf73dcef67 Simplify determining if class type attribute is writable (PY-27866)
Don't consider the following attribute as writable in Python 3+:

```
    class A:
        attr = "attr"
        __slots__ = ("attr")

    A().attr
```
2018-05-29 17:24:40 +03:00
Semyon Proshev bdca4ac85f Introduce PyClassType.attributeIsWritable to check if member could be created or updated (PY-27866) 2018-05-29 17:24:39 +03:00
Semyon Proshev 2588b3f8a0 Add tests about matching __slots__ against structural type (PY-29233) 2018-05-29 17:24:38 +03:00
Semyon Proshev ae91878f13 Improve processing __slots__ in PyUnresolvedReferencesInspection (PY-29229)
Fix false positive when accessed attribute is declared in ancestor `__slots__`
2018-05-29 17:24:36 +03:00
Semyon Proshev e3735015e4 Fix return type for dataclass callable type (PY-28442) 2018-05-29 16:50:04 +03:00
Semyon Proshev 4f61b599d7 Support attr.ib(factory=...) in inspection and stub (PY-26354) 2018-05-29 16:50:03 +03:00
Semyon Proshev 95fabba2a8 Support attr.fields_dict in inspection (PY-26354) 2018-05-29 16:50:03 +03:00
Semyon Proshev ace12e93d4 Error about attrs default through multiple decorators (PY-26354) 2018-05-29 16:50:03 +03:00
Semyon Proshev 574a485508 Highlight attrs attributes lacking type annotation (PY-26354) 2018-05-29 16:50:02 +03:00
Semyon Proshev 35dffdcbc3 Highlight __hash__ when attrs cmp and frozen parameters are set (PY-26354) 2018-05-29 16:50:02 +03:00
Semyon Proshev 2b54af3829 Support attr.NOTHING and dataclasses.MISSING as no default value (PY-26354, PY-27398) 2018-05-29 16:50:01 +03:00
Semyon Proshev 06e2412069 Check attrs initializers and validators signatures (PY-26354) 2018-05-29 16:50:01 +03:00
Semyon Proshev cef122333c Highlight useless __eq__ for attrs with default cmp parameter (PY-26354) 2018-05-29 16:49:59 +03:00
Semyon Proshev 9d5f0435c0 Update reporting error about invalid fields order (PY-26354)
Support initializing attribute via decorated method
2018-05-29 16:49:59 +03:00
Semyon Proshev 40a498f207 Simplify processing useless dataclass parameters (PY-26354) 2018-05-29 16:49:58 +03:00
Semyon Proshev b59c65cd76 Highlight useless init (PY-26354) 2018-05-29 16:49:58 +03:00
Semyon Proshev d1b092e25c Highlight useless methods in attrs (PY-26354) 2018-05-29 16:49:57 +03:00
Semyon Proshev 6101784ec2 Error about attrs default through keyword and decorator (PY-26354) 2018-05-29 16:49:57 +03:00
Semyon Proshev 71a052e157 Highlight useless and wrong __attrs_post_init__ (PY-26354) 2018-05-29 16:49:55 +03:00
Semyon Proshev b5790bac0a Check that object passed to attrs helpers is attrs (PY-26354) 2018-05-29 16:49:54 +03:00
Semyon Proshev 9d7e586f06 Error about invalid comparison operations (PY-26354) 2018-05-29 16:49:54 +03:00
Semyon Proshev 7e825f0264 Error about invalid fields order (PY-26354) 2018-05-29 16:49:53 +03:00
Semyon Proshev 952919a5c0 Error about assignments to frozen attrs and its fields removal (PY-26354) 2018-05-29 16:49:53 +03:00
Semyon Proshev d57422a982 Fix test data after syncing with typeshed 2018-05-17 18:02:13 +03:00
Semyon Proshev 3d233e9f52 Highlight plain Protocol in instance and class checks (PY-28249)
Improve processing `runtime` and `Protocol` from typing-extensions.
Improve processing decorators when one of them could be resolved to some of known decorators.
2018-04-27 19:57:17 +03:00
Semyon Proshev c1abea5187 Provide special type for typing.TypeVar as a callee (PY-28127) 2018-04-27 19:57:14 +03:00
Andrei-Silviu DRAGNEA (24887)andValentina Kiryushkina 2a37853de1 [PY-27601] Updated fix for "Too few arguments for format string"
There are two important changes:

Based on the implementation at https://github.com/python/cpython/blob/master/Objects/stringlib/unicode_format.h#L82 I have added two new warning messages to PyStringFormatInspection, which detect changes between manual and automatic field numbering.

I have also fixed the way PySubstitutionChunkReference uses myPosition
field to refer to the correct positional argument. It uses the explicitly specified position, if present, or the auto-numbered one otherwise. I have tried to fix all the visible regressions introduced by this change.
2018-04-24 19:12:36 +03:00
Andrei-Silviu DRAGNEA (24887)andValentina Kiryushkina 9a52af5553 [PY-27710] Fix for erroneous "Too few arguments for format string" 2018-04-24 19:12:36 +03:00
Semyon Proshev 5aa26dd020 Match protocol usage against definition to get correct substitutions (PY-13750) 2018-04-23 19:40:17 +03:00