1
0
forked from VimPlug/jedi
Commit Graph

52 Commits

Author SHA1 Message Date
Mark Diekhans a89757a966 Handle object with __file__ attribute having a None value (issue #2082) 2025-12-20 17:24:25 -08:00
Dave Halter 57aefed6ea Allow unsafe custom __getitem__ executions when allow unsafe executions is on 2023-07-29 00:33:09 +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 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
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
Peter Law aa265a44e1 Have all py__file__ methods return a Path 2021-07-24 17:14:25 +01: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 e6f18df1d2 unsafe -> not safe 2021-01-03 01:13:17 +01: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
Dave Halter 9d1587a41d Don't need to inherit from object anymore 2020-07-26 00:11:57 +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 5ab351dc8f Remove unicode literals from code base 2020-07-02 10:43:14 +02:00
Dave Halter 7f67324210 Remove a lot more Python 2 mentions and todos 2020-07-02 10:30:58 +02:00
Dave Halter 8ee0c8593e Remove unicode usages 2020-07-02 03:26:22 +02:00
Dave Halter ef96c4c66b Remove __future__ usages 2020-07-02 03:15:07 +02:00
Dave Halter db28eee760 Remove py__version__ 2020-07-02 02:30:16 +02:00
Dave Halter 17343bb57c Remove some more Python 3.5 references 2020-07-02 02:18:16 +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
Dave Halter 23db298e2f Removed various 3.3/3.4/3.5 references 2020-07-02 00:34:27 +02:00
Vlad Serebrennikov e1c0d2c501 Reduce noise in signatures of compiled params (#1564)
* Remove "typing." prefix from compiled signature param

* Don't print default "None" for Optional params

* Don't remove 'typing.' prefix if symbol doesn't come from typing module

* Revert "Don't print default "None" for Optional params"

This reverts commit 8db334d9bb.

* Make sure "typing." doesn't appear in the middle

* Make sure only "typing." prefix is removed and not it's entries in the middle

* Use inspect.formatannotation() to create an annotation string

* Update AUTHORS.txt

* Add test for compiled param annotation string

* Replace Optional in test with other typing facilities

in order for test to be forward-compatible with 3.9

* Add an empty string fallback for Python 2

* Move _annotation_to_str back to original position
2020-05-10 13:33:36 +02:00
Dave Halter 10bc578bfe Merge branch 'master' into refactor 2020-03-13 23:53:09 +01:00
Dave Halter a892887b04 Remove Python 3.4 support 2020-02-27 02:04:03 +01:00
Lior Goldberg 1874e9be81 Remove the word 'class' from annotation_string
Currently, 'foo(x: int)' results with annotation_string="<class 'int'>".
Change this to 'int'.
2020-02-20 09:35:01 +01:00
Dave Halter 3388a9659b Catch an error with illegal class instances, fixes #1491 2020-02-03 22:27:48 +01:00
Dave Halter eb88c483fb Catch an error with illegal class instances, fixes #1491 2020-02-03 22:27:22 +01:00
Dave Halter 7c3dbef9c5 Remove dead code 2020-01-25 18:16:30 +01:00
Dave Halter da2a55c73f Fix issue with mixed objects, fixes #1480 2020-01-25 15:02:55 +01:00
Dave Halter 4f56ec5daf Make sure the latest changes work with Python 3.6/3.7 2020-01-10 15:14:22 +01:00
Dave Halter 3ba68b5bc6 Properly convert compiled values to generic classes 2020-01-10 15:09:16 +01:00
Dave Halter cac73f2d44 Make Union/Optional works with compiled objects 2020-01-10 13:34:10 +01:00
Dave Halter ba7776c0d9 Make sure that CompiledValue can deal with string annotations
Fixes #952
Inspired by #1461
2020-01-10 12:40:24 +01:00
Dave Halter e30385465c Make sure the repr of compiled access isn't huge 2020-01-04 13:10:46 +01:00
Dave Halter 83ce8b1162 Make the completions possible for Interpreter objects 2019-12-31 18:34:50 +01:00
Dave Halter 9fa4811425 Get dict completions mostly working 2019-12-30 03:34:18 +01:00
Dave Halter 0ce414eb94 Python 2 compatibility 2019-12-15 18:52:16 +01:00
Dave Halter 6e2a76feb9 Fix a goto case with nested pyi files 2019-12-15 17:37:24 +01:00
Dave Halter 35442eff81 Catch some cases were _sqlite3.Connection was misidentified as sqlite3.Connection 2019-12-15 16:15:55 +01:00
Dave Halter 923fcf95d9 Make sure that __getattr__ is always working with Interpreter
fixes #1378
2019-12-13 16:07:38 +01:00
Dave Halter 769b3556d2 Make sure warnings are not shown if a property is executed, fixes #1383 2019-12-13 01:48:56 +01:00
Endill 00b220516d Fix annotation string generated from wrong object 2019-10-26 13:58:15 +02:00
Dave Halter 2fb04db0ab Fix the weird py__path__ behavior 2019-08-21 23:08:42 +02:00
Dave Halter 03920502c4 infer_state -> inference_state 2019-08-16 11:44:30 +02:00
Dave Halter 600272366f parent_value -> parent_context 2019-08-15 09:36:46 +02:00
Dave Halter ad4f546aca context -> value 2019-08-15 01:23:06 +02:00