Eric Masseran
027e29ec50
Support base class and metaclass mode
2025-02-15 20:12:53 +01:00
Eric Masseran
d866ec0f80
Add support for dataclass_transform decorator
2025-02-14 17:05:28 +01:00
Peter Law
68e435cc66
Update 'next' signature in Python 3.13 where it's been fixed
2024-07-02 21:37:34 +01:00
Peter Law
57e7b83455
Add missing import
...
I suspect this got lost in a merge somewhere, probably the
combination of 7e533ca7e1 and the
Python 3.12 work in a60fdba1d4 .
2023-09-22 21:29:31 +01:00
Dave Halter
0770372857
Merge pull request #1956 from PeterJCLaw/python-3.12
...
Support Python 3.12
2023-09-17 19:25:45 +00:00
Peter Law
7e533ca7e1
Drop redundant conditional skips for unsupported Python versions
2023-09-17 18:38:12 +01:00
Peter Law
a60fdba1d4
Adjust for change to documention change of next in Python 3.12
...
The signature of the builtin isn't actually changing in Python 3.12,
however its documentation has changed.
2023-09-17 18:27:53 +01:00
Peter Law
3dbcd2c6de
Whitespace
2023-05-27 00:10:00 +01:00
Alex Ford
4d1e00c3ab
Skip if attrs not in target environment.
...
Add check for attrs in test environment and skip if not installed.
This is patterned off the existing django tests.
2022-10-13 00:43:29 -07:00
Alex Ford
e15f51ecc1
Remove mutable from attrs signature tests
2022-10-11 17:55:57 -07: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
Peter Law
6787719c28
Ensure *args, **kwargs lookthrough works at module scope too
...
This means that passthrough signatures will be found for top level
functions, which is useful both where they're wrappered by
`functools.wraps` or not.
Fixes https://github.com/davidhalter/jedi/issues/1791 .
2021-07-24 16:58:34 +01:00
Peter Law
bb40390225
Add identifiers to these test strings
...
This makes it easier to work out which one fails when pytest
reports a failure. Mostly useful when introducing failing tests,
which I'm about to do.
2021-07-24 16:15:41 +01:00
Peter Law
0d15347210
Remove confusing comment
...
I'm assuming that this is incorrect given that there _are_ arguments
where the comment suggests there aren't any.
2021-07-24 16:14:20 +01:00
Dave Halter
85f45771f1
Fix typing.NewType signature
2021-01-01 04:22:52 +01:00
Dave Halter
30e702de11
Generics don't have signatures
2021-01-01 04:09:49 +01:00
Dave Halter
778442a972
Type aliases should not have a signature
2021-01-01 03:59:28 +01:00
Dave Halter
4f34712858
Fix signatures for TypeVar and cast, fixes #1709
2021-01-01 03:59:12 +01:00
Dave Halter
d821451a64
Upgrade typeshed
2021-01-01 03:18:49 +01:00
Dave Halter
5d2aed34f4
Fix signatures if a decorator has no signatures, fixes #1705
2020-12-28 00:47:10 +01:00
Dave Halter
e671a0cb6d
Fix an error with enums, fixes #1675
2020-10-23 20:25:00 +02:00
Dave Halter
7e295d05a1
Remove some more Python 2/3.5 references
2020-07-02 00:25:00 +02:00
Dave Halter
50b85153ce
Remove a lot of test references to Python 2/3.5
2020-07-02 00:17:21 +02:00
Dave Halter
0888dd468f
Fix partialmethod issues
2020-03-14 01:22:46 +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
8cc836e816
find_signatures -> get_signatures, see #1476
2020-01-22 01:10:38 +01:00
Dave Halter
9c4cd40b7e
Fix signatures when used for Generic classes, fixes #1468
2020-01-06 09:40:57 +01:00
Dave Halter
74fc29be9a
Make sure that kwargs are not repeated when they are inferred
2020-01-05 01:48:10 +01:00
Dave Halter
8e2bfdc07e
Add a test for #1465
2020-01-01 14:03:42 +01:00
Dave Halter
5fc308f1f8
call signature -> signature
2019-12-20 19:41:57 +01:00
Dave Halter
d7d9c9642a
Don't use goto_definitions anymore, use infer
2019-12-20 19:06:24 +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
0474371f23
Make sure overload signatures work, see #1417
2019-12-07 00:30:37 +01:00
Dave Halter
c582545628
Shorten a line to < 100 chars
2019-12-06 16:41:47 +01:00
Dave Halter
15c13c1386
Fix the pow test for Python 3.8
2019-11-27 20:12:50 +01:00
Dave Halter
ae79919eb4
Skip some param resolving tests in Python 2/3.4
2019-09-05 18:27:37 +02:00
Dave Halter
fbe58306c3
Add a few tests for a previous assertion failure
2019-09-05 10:57:04 +02:00
Dave Halter
ad4f546aca
context -> value
2019-08-15 01:23:06 +02:00
Dave Halter
3b4f292464
Move the evaluate package to inference
2019-08-15 00:14:26 +02:00
Dave Halter
e4d1e5455f
test_evaluate -> test_inference
2019-08-14 23:56:44 +02:00