1
0
forked from VimPlug/jedi
Commit Graph

162 Commits

Author SHA1 Message Date
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
Peter Law aae2a8e3ed Cope with Windows virtualenvs different casing 2023-02-13 20:25:31 +00:00
Dave Halter b0d5fc2bd0 Fix errors around docs of namespace packages, fixes #1890, fixes #1822 2022-11-13 19:50:08 +01:00
Dave Halter a6cf2c338a Remove part of a test that is annoying to develop 2022-11-11 17:44:49 +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
Joseph Birkner a340fe077e Fixed ZIP completion. 2021-04-29 09:52:08 +02:00
Dave Halter 8ef2ce232c Hopefully fix a Windows issue 2021-01-02 18:11:59 +01:00
Dave Halter 2ec3d72151 Use "namespace" as a Name.type 2021-01-02 12:14:28 +01:00
Dave Halter 7d160f96f6 Do not show signatures for properties, fixes #1695 2021-01-01 23:51:41 +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 52443daf12 Fix another Windows test on 3.8 2020-12-26 12:19:59 +01:00
Dave Halter 86d57edda4 Some Windows compatibility fixes 2020-12-26 11:52:47 +01:00
Dave Halter b89f9445c2 Merge pull request #1684 from davidhalter/relative-import
Relative imports should work even if they are not within the project
2020-12-22 23:18:46 +01:00
Dave Halter bc4f6ed9dd Merge branch 'master' into relative-import 2020-12-12 12:15:13 +01:00
Leo Ryu fd435a7bbb Check if string_names is None before returning string_names (#1708)
* Check if string is None before using string_names

* Add test asserting None string_names returns an empty list

* Remove whitespace to pass flake8

* Add name to authors.txt

Co-authored-by: Leo Ryu <leo@episci.com>
2020-12-12 12:13:31 +01:00
Matthias Bussonnier 06d6776422 Add tests for #1702, for a rare numpydoc syntax.
It looks like numpydoc, and things like masked array docstrings use a
syntax that make jedi crash:

    fill_value : {var}, optional
            Value used internally for the masked values.
            If ``fill_value`` is not None, it supersedes ``endwith``.

Here we add a test that we do not crash jedi.
2020-12-06 18:08:51 -08:00
Dave Halter a03a093e2c change the create_stub_module stuff a bit 2020-10-24 10:41:59 +02:00
Dave Halter 6094e7b39a Fix get_line_code for stubs 2020-10-24 10:12:32 +02:00
Dave Halter bf310c780c Fix a recursion on imports, fixes #1677 2020-10-23 21:04:36 +02:00
Dave Halter e671a0cb6d Fix an error with enums, fixes #1675 2020-10-23 20:25:00 +02:00
Dave Halter 5f2f4af851 Update test/test_inference/test_imports.py
Co-authored-by: Peter Law <PeterJCLaw@gmail.com>
2020-10-21 22:32:33 +02:00
Dave Halter 78e87d0ab8 Relative imports should work even if they are not within the project 2020-10-20 01:00:22 +02:00
Dave Halter f12ed2088a Use pathlib for file ios, because the new parso is out 2020-08-05 00:52:50 +02:00
Dave Halter 27603f9780 Reenable a test for nested imports 2020-07-19 13:57:52 +02:00
Dave Halter 829dda3ee9 Fix another windows issue 2020-07-12 11:18:35 +02:00
Dave Halter a16f52b9fb Fix some Windows related issues with absolute paths 2020-07-12 11:13:37 +02:00
Dave Halter 480a464179 Implement all remaining Path issues and use it instead of strings 2020-07-12 01:14:00 +02:00
Dave Halter 0c1ba1b305 Move the importing of modules out of compatibility 2020-07-02 10:51:49 +02:00
Dave Halter 5ab351dc8f Remove unicode literals from code base 2020-07-02 10:43:14 +02:00
Dave Halter 5a912de937 Remove a few unicode references in tests 2020-07-02 03:18:48 +02:00
Dave Halter ef96c4c66b Remove __future__ usages 2020-07-02 03:15:07 +02:00
Dave Halter 6e184bca97 Remove most version_info.major usages 2020-07-02 03:00:01 +02:00
Dave Halter 188fdcd34f Remove the skip_python2 fixture 2020-07-02 02:52:24 +02:00
Dave Halter f4e537fd72 Remove a lot of sys.version_info references 2020-07-02 02:49:35 +02:00
Dave Halter 49e4b1a0f8 Remove force_unicode 2020-07-02 01:47:21 +02:00
Dave Halter 227cf00638 Remove the __builtin__ compatibility 2020-07-02 01:15:29 +02:00