Peter Law
483e78993d
attrs' frozen decorator also acts like a dataclass
...
In 23.1.0 (specifically in 46053d703d )
the definition of the `frozen` decorator was tweaked slightly, such
that its type stub is separate from that for `define`. This means
that Jedi needs to be told about it as a separate member.
I've manually checked that this still works with the prior version
of `attrs`.
Fixes https://github.com/davidhalter/jedi/issues/1929
2023-05-27 00:13:55 +01:00
Alex Ford
40e1e3f560
Extend dataclass constructor hinting to attrs next-gen apis.
...
Trivially extends dataclass constructor hinting to attrs next-gen APIs.
This will stumble in cases where attrs extends beyond the standard
dataclasses API, such as complex use of defaults, converters, et al.
However, it likely covers the vast majority of cases which fall solidly
in the intersection of the two APIs.
Extension beyond these cases could use [PEP0681 dataclass_transforms],
however this is definitely a problem for another day.
[PEP0681 dataclass_transforms]: https://peps.python.org/pep-0681/
https://github.com/davidhalter/jedi/issues/1835
2022-10-11 17:40:31 -07:00
Dave Halter
e671a0cb6d
Fix an error with enums, fixes #1675
2020-10-23 20:25:00 +02:00
Mvdk
ff439039da
make contextualized_node an optional kwarg
...
In all other py__iter__ definitions that I found, this argument is optional. It also often seems to not be passed around. I'm not sure why it was deemed mandatory here despite not being used.
2020-09-14 10:27:19 -06:00
Dave Halter
784e965d3a
@property now returns Name.type == 'property', fixes muffinmad/anakin-language-server#15
2020-07-20 01:20:24 +02:00
Dave Halter
1ece7698c2
Merge branch 'master' into python3
2020-07-17 16:07:54 +02:00
Dave Halter
d1851c369c
Introduce py__next__ to have more clear way to use __next__
2020-07-17 15:57:32 +02:00
Dave Halter
24a1bbb3ca
Even more super deletions
2020-07-02 12:29:10 +02:00
Dave Halter
5ab351dc8f
Remove unicode literals from code base
2020-07-02 10:43:14 +02:00
Dave Halter
1fbe0d8d2e
Remove python_version_match from publish_method
2020-07-02 03:04:14 +02:00
Dave Halter
6e184bca97
Remove most version_info.major usages
2020-07-02 03:00:01 +02:00
Dave Halter
49e4b1a0f8
Remove force_unicode
2020-07-02 01:47:21 +02:00
Dave Halter
395f7fc59e
Remove inspect.Parameter compatibility
2020-07-02 00:44:25 +02:00
Dave Halter
9a54e583e7
Fix docstrings for method decorators, fixes #1621
2020-06-27 02:18:31 +02:00
Dave Halter
59ccd2da93
Make partial use the __doc__ of its function, fixes #1621
2020-06-27 02:18:31 +02:00
Dave Halter
364d33119c
Merge branch 'django'
2020-06-14 22:24:31 +02:00
Dave Halter
674e0114a5
Ignore runtime_checkable, because we don't really need it
2020-06-14 14:14:47 +02:00
Dave Halter
6d0d75c7d9
@publish_method should provide arguments
2020-06-09 22:37:50 +02:00
Dave Halter
9adcf3d233
Make sure meta class filters can distinguish between classes and instances
2020-06-07 14:54:26 +02:00
Dave Halter
34cc8e9ad7
Properly handle __get__ in properties/partials
2020-06-07 14:18:45 +02:00
Dave Halter
6dbc5e783e
Fix argument clinic unpacking, remove dynamic bullshit
2020-05-10 13:27:20 +02:00
Dave Halter
bdd4deedc1
Some code cleanups
2020-04-11 02:11:52 +02:00
Dave Halter
0888dd468f
Fix partialmethod issues
2020-03-14 01:22:46 +01:00
Dave Halter
661fdb2b26
Merge branch 'add-partialmethod' of https://github.com/ffe4/jedi
2020-03-14 00:28:06 +01:00
Daniel Lemm
2406e58386
Refactor stdlib PartialObject
...
Merges PartialObject and PartialMethodObject. Also adds more tests.
Some parts are still WIP, see: #1522 .
Fixes #1519
2020-03-13 23:47:48 +01:00
Daniel Lemm
fd6540a9e5
Fix PartialMethodObject (WIP)
...
Implemented feedback from PR #1522 .
Does not pass new tests in test/completion/stdlib.py
2020-03-13 21:40:58 +01:00
Daniel Lemm
96c969687a
Add partialmethod, fixes #1519
...
Returns correct method signature but test/completion/stdlib.py fails
2020-03-12 18:47:17 +01:00
Dave Halter
d574162da3
Fix namedtuple docstring/signature issues, fixes #1506
2020-03-10 20:07:10 +01:00
Dave Halter
47e2cf95d2
Change ModuleValue param order and add defaults
2020-01-01 17:07:19 +01:00
Dave Halter
3ec73f1da3
Fix namedtuple issues that were uncovered by the 'self' changes
2019-12-27 23:57:22 +01:00
Dave Halter
ed3fdf8876
Make sure classmethod signatures don't include cls, fixes #1455
2019-12-09 08:58:59 +01:00
Dave Halter
c77f33b73b
A small rename of a value that is actually a context
2019-12-01 00:31:22 +01:00
Dave Halter
c38e4fce70
Make sure py__get__ is defined on all values
...
Also define matches_signature on all signatures, there's definitely cases where that might be called
2019-11-29 15:04:04 +01:00
Dave Halter
02046d5333
Replace obj with value
2019-09-04 11:12:30 +02:00
Dave Halter
2faa8ade8b
Remove get_object, it's not needed anymore
2019-09-04 11:04:09 +02:00
Dave Halter
f9292ca8fa
Implement properties properly
2019-09-04 11:00:43 +02:00
Dave Halter
c79faa6b10
Implement super() properly
2019-09-03 14:53:40 +02:00
Dave Halter
4b10644100
Start using AnonymousMethodExecutionContext instead of the normal function execution context with arguments
2019-09-03 14:44:01 +02:00
Dave Halter
bdb01c7546
Make FunctionExecutionContext.arguments private
2019-09-02 21:24:21 +02:00
Dave Halter
06890203dd
var_args -> arguments
2019-09-02 19:48:17 +02:00
Dave Halter
473dbb0f69
Create separate classes for FakeSequence
2019-08-25 14:31:15 +02:00
Dave Halter
ee6331747f
Use a class_context instead of a class_value for MethodValue
2019-08-22 22:13:02 +02:00
Dave Halter
b97237f264
Rename the filter context argument to parent_context
2019-08-22 10:09:07 +02:00
Dave Halter
8a2b7f18cd
Get all tests working except usage tests
2019-08-21 00:50:34 +02:00
Dave Halter
14fc5ed289
Fix more issues with where contexts are used and where values are used
2019-08-20 09:59:10 +02:00
Dave Halter
8e60689bcf
valueualized_node -> contextualized_node
2019-08-18 00:58:33 +02:00
Dave Halter
4415de010d
ValueualizedName -> ContextualizedName
...
Basically a change back to an older version
2019-08-18 00:57:29 +02:00
Dave Halter
f61246bf13
Fix quite a few more tests. Only about a fifth failing now
2019-08-18 00:47:21 +02:00
Dave Halter
0c419a5094
Fix class tests
2019-08-17 23:52:52 +02:00
Dave Halter
680388a7e8
More fixes
2019-08-17 17:01:21 +02:00