Dave Halter
57aefed6ea
Allow unsafe custom __getitem__ executions when allow unsafe executions is on
2023-07-29 00:33:09 +02:00
Dave Halter
8a4b079d0f
allow_descriptor_getattr -> allow_unsafe_interpreter_executions
2023-07-29 00:06:55 +02:00
Dave Halter
d8420d0f72
Add a note to the changelog
2023-07-28 22:59:03 +02:00
Dave Halter
886279fb6d
Try to use the return annotations of properties, if available, fixes #1933
2023-07-28 22:35:15 +02:00
Dave Halter
ff3a7f367f
Avoid evaluating properties just for the api type, improves #1933
2023-07-28 22:11:15 +02:00
Dave Halter
1f70e3301e
Revert "Avoid one layer of caching that is probably useless"
...
This reverts commit a34c348a55 .
2023-07-28 16:10:30 +02:00
Dave Halter
a34c348a55
Avoid one layer of caching that is probably useless
2023-07-28 16:05:56 +02:00
Dave Halter
972123c9c9
Introduce the property return annotation
2023-07-28 15:54:54 +02:00
Dave Halter
6455a14841
Avoid multiple getattrs instead of a single one, see also #1933
2023-07-28 15:10:37 +02:00
Dave Halter
8d9e3ab3a7
Simplify
2023-07-28 13:10:26 +02:00
Dave Halter
048173e467
Remove a piece of unimportant code, see discussion in #1933
2023-07-28 10:15:28 +02:00
Peter Law
c137eb6918
Modernise importlib usage
...
`find_module` is deprecated in all supported version of Python and
is slated for removal in the upcoming 3.12. Happily it seems we
can move to the related `find_spec` and just hoist the loader from
the spec which that returns. (This is mostly what current `find_module`
implementations do anyway).
2023-05-27 22:03:51 +01:00
Peter Law
ca36fcfa4b
Fix typo in comment
2023-05-26 21:38:42 +01:00
Peter Law
664b10a5c6
Update mypy to the latest
...
This includes updating the ignore comments for things which mypy
now knows about or now complains about, as well as pulling in some
typeshed packages for things outside the standard library.
2023-02-13 19:40:16 +00:00
Andrew Ammerlaan
0a6ad1010c
inference/compiled/subprocess/functions.py: Skip python3.11's frozen imports
...
Bug: https://github.com/davidhalter/jedi/issues/1858
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org >
2022-10-19 16:53:17 +02:00
Tim Gates
c28b337278
docs: Fix a few typos
...
There are small typos in:
- jedi/api/exceptions.py
- jedi/inference/base_value.py
- jedi/inference/compiled/mixed.py
- jedi/inference/value/dynamic_arrays.py
Fixes:
- Should read `usually` rather than `ususally`.
- Should read `modifications` rather than `modfications`.
- Should read `interpreters` rather than `interpreteters`.
- Should read `inferred` rather than `inferrined`.
- Should read `completable` rather than `completeable`.
Signed-off-by: Tim Gates <tim.gates@iress.com >
2022-07-15 17:29:02 +10:00
Lumír 'Frenzy' Balhar
eab1b8be8b
inspect now raises OSError for objects without source file
...
CPython issue: https://bugs.python.org/issue44648
2021-09-01 20:50:54 +02:00
Peter Law
aa265a44e1
Have all py__file__ methods return a Path
2021-07-24 17:14:25 +01:00
Peter Law
6ad62e18d2
deque is in collections, not queue
...
Though it seems that the queue module does use it internally, which
is why this was working.
2021-07-24 17:12:34 +01:00
Joseph Birkner
a340fe077e
Fixed ZIP completion.
2021-04-29 09:52:08 +02:00
Dave Halter
0eb6720c11
Some Python objects suck, fixes #1755
2021-02-26 21:58:47 +01:00
Dave Halter
387d73990b
Fix issues with getitem on compiled objects that have annotations, see #1719
2021-01-17 13:48:22 +01:00
Dave Halter
7555dc0d45
Get rid of cast_path
2021-01-14 01:39:51 +01:00
Dave Halter
e6f18df1d2
unsafe -> not safe
2021-01-03 01:13:17 +01:00
Dave Halter
a4f45993f8
Simplify some things, so something like #1678 does not happen again
2020-10-23 21:38:39 +02:00
Dave Halter
cb55b45d47
Catch an OSError on Windows
2020-09-19 22:13:45 +02:00
Dave Halter
e3fedb52f1
Remove an unused import
2020-09-19 21:40:01 +02:00
Dave Halter
76c0c373da
Merge pull request #1642 from PeterJCLaw/mypy
...
Add an initial mypy config
2020-08-05 01:09:49 +02:00
Dave Halter
f12ed2088a
Use pathlib for file ios, because the new parso is out
2020-08-05 00:52:50 +02:00
Matthias Bussonnier
a9e2cd5a74
Reformat and move imports to top level.
2020-08-03 08:24:24 -07:00
Matthias Bussonnier
20be4f02c8
Turn print into warning to simplify silencing them.
2020-07-27 11:28:05 -07:00
Peter Law
b892c07841
Merge branch 'master' into mypy
2020-07-26 12:25:19 +01:00
Peter Law
cefc363f64
Configure mypy and flake8 for our re-export files
...
This removes the need to use __all__ in these files, while also
allowing us to have strictness elsewhere in the codebase.
2020-07-26 12:20:08 +01:00
Dave Halter
9d1587a41d
Don't need to inherit from object anymore
2020-07-26 00:11:57 +02:00
Peter Law
6315709fea
Inherit from base class to placate mypy
2020-07-24 20:25:55 +01:00
Peter Law
69be26b16e
Change subclass to function wrapper
...
This avoids mypy complaining that we need to provide a generic
argument to Popen, which we cannot acctually do as the implementation
of Popen does not inherit from typing.Generic.
2020-07-24 20:25:55 +01:00
Peter Law
35c2d660cb
Fix most import related mypy errors
2020-07-24 16:10:34 +01:00
Dave Halter
9957565b37
Try to use yield from instead of yield, if possible
2020-07-19 13:34:58 +02:00
Dave Halter
1ece7698c2
Merge branch 'master' into python3
2020-07-17 16:07:54 +02:00
Dave Halter
7851dff915
Properly negate with Interpreter, fixes #1636
2020-07-17 15:57:32 +02:00
Ryan Clary
b0f664ec94
* reflect default Popen behavior by inheriting os.environ
...
* without passing env_vars to create_environment, GeneralizedPopen behavior is same as before fix to issue #1540 (803c3cb271 )
* env_vars allows explicit environment variables, per PR #1619 (f9183bbf64 )
2020-07-16 19:04:33 -07:00
Dave Halter
9957374508
Fix dict completions for inherited dicts, fixes #1631
2020-07-14 17:50:12 +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
db0e90763b
Start using pathlib.Path instead of all the os.path functions
2020-07-10 17:30:36 +02:00
Dave Halter
92af043906
Fix some subprocess issues
2020-07-02 18:39:24 +02:00
Dave Halter
dac1fb0a06
Get rid of a few Python 2 things
2020-07-02 16:00:26 +02:00
Dave Halter
ec08506704
Remove getstate and setstate, because they are not needed anymore
2020-07-02 15:55:31 +02:00
Dave Halter
7bcb420a0a
Delete a weird comment
2020-07-02 12:33:19 +02:00
Dave Halter
a0de93a638
Remove super arguments
2020-07-02 10:59:59 +02:00
Dave Halter
216ce8726c
Move GeneralizedPopen
2020-07-02 10:54:32 +02:00