Commit Graph

7878 Commits

Author SHA1 Message Date
Dave Halter
1d1c0ec3af Better debugging output for is_sub_class_of 2020-06-14 17:55:53 +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
089a4713e3 Fix a small extract_variable issue, fixes #1611 2020-06-13 01:35:58 +02:00
Dave Halter
3a0a484fcb Try to get get the tests for Python 3.9 passing, fixes #1608 2020-06-10 09:54:32 +02:00
Dave Halter
df7dd026d2 Make it possible to use inheritance on generics without always specifying type vars, see also discussion in #1593 2020-06-10 09:54:32 +02:00
yuan
cf923ec6de Update MANIFEST.in 2020-06-07 12:01:56 +02:00
Dave Halter
3870253b56 Make sure that scopes can only be exact values, see #1590 2020-06-05 23:04:39 +02:00
Dave Halter
21a380f7cb Merge pull request #1590 from muffinmad/references-scope
Get references in the current module only
2020-06-05 19:21:34 +02:00
muffinmad
404661f361 Replace Script by timedelta in the test 2020-06-05 17:44:59 +03:00
muffinmad
1e58f9a15c Test both named params are found 2020-06-05 15:28:22 +03:00
Dave Halter
24236be3ce Fix a small issue with doctest completions, fixes #1585 2020-06-05 13:35:36 +02:00
muffinmad
8705149619 Use pytest.mark.parametrize 2020-06-03 17:20:23 +03:00
muffinmad
782dedd439 Get references in the current module only 2020-06-03 16:35:28 +03:00
muffinmad
f9bbccbc13 Pycodestyle configuration section moved to setup.cfg 2020-06-03 15:24:37 +03:00
Michał Górny
cecdaa98ae Exclude more Linux constants in test_import
The list of differences have grown again in Python 3.9.  Instead of
increasing the allowed count let's filter out more Linux-specific
constants.  This probably makes it possible to reduce allowed
len(difference) too.
2020-06-02 23:04:50 +02:00
Dave Halter
9980f760b1 Merge pull request #1601 from yuan-xy/patch_3
add test case to fix code example in doc
2020-05-31 11:14:58 +02:00
yuan
5946a5cd8c Refactoring about checking \r\n (#1603) 2020-05-31 11:13:30 +02:00
yuan_xy
32687474db add test case to fix code example in doc 2020-05-31 11:00:15 +08:00
yuan
98a8b6c76c fix typo (#1602) 2020-05-30 12:04:15 +02:00
yuan
ca08365a81 fix typo 2020-05-28 21:29:34 +02:00
Dave Halter
8239328e42 Merge pull request #1599 from isidentical/py38-plus-setuppy
Upgrade setup.py's version parsing for 3.8+
2020-05-28 21:18:51 +02:00
Batuhan Taskaya
b9131c6070 Upgrade setup.py's version parsing for 3.8+ 2020-05-28 15:26:48 +03:00
muffinmad
1c342d36e5 Don't goto while building found_names for the current file
But goto for all non_matching_reference_maps items later
2020-05-24 22:58:04 +03:00
Dave Halter
2d672d2f28 Merge pull request #1595 from PeterJCLaw/operator-not-in
Explicitly handle `a not in b` operator comparison
2020-05-23 14:48:40 +02:00
Peter Law
c62cbd6654 Explicitly handle a not in b operator comparison
This avoids a `KeyError` from operator_to_magic_method lookup for
this case. Jedi probably could check for `__contains__` here, however
as it doesn't do so for `in` checks I'm following that lead for now.

Fixes https://github.com/davidhalter/jedi/issues/1594.
2020-05-23 12:49:53 +01:00
muffinmad
7459d67fee Test local references in some other cases 2020-05-22 13:24:39 +03:00
muffinmad
741097827d Get references in the current module only 2020-05-21 19:51:13 +03:00
muffinmad
4ceca54138 Specify max-line-length for pycodestyle
According to CONTRIBUTING.md it can be 100
2020-05-21 17:31:44 +03:00
Christopher Cave-Ayland
860d5e8889 Import FileNotFoundError from jedi._compatibility 2020-05-21 11:45:52 +02:00
Dave Halter
64d131060c Merge pull request #1586 from PeterJCLaw/django-more-fields
Support more Django model fields
2020-05-19 00:39:27 +02:00
Peter Law
b7cdec427e Support OneToOneFields 2020-05-18 22:19:20 +01:00
Peter Law
df66b35444 Support UUIDFields 2020-05-18 22:11:31 +01:00
Peter Law
cd9f2f31ea Support URLFields 2020-05-18 22:10:48 +01:00
Peter Law
b54d7433c7 Support GenericIPAddressFields 2020-05-18 22:10:09 +01:00
Dave Halter
855fb5a936 Fix potential AttributeError in get_defintion_start_position/get_defintion_end_position, see #1584 2020-05-18 19:21:04 +02:00
Dave Halter
8fdf16b316 Fix an error of get_definition_end_pos, see #1584 2020-05-18 01:44:51 +02:00
Dave Halter
fa6194c0a9 Refactor test_definition_start_end_position to use parametrize 2020-05-18 01:41:07 +02:00
Dave Halter
2d17b81313 definition_end_position -> get_definition_end_position, same for start, see #1584 2020-05-18 01:18:22 +02:00
Dave Halter
cb1730f628 Merge pull request #1584 from pappasam/get_definition_position
Add BaseName.definition_[start,end]_position
2020-05-18 01:14:00 +02:00
Sam Roeca
d848047012 Add unit tests for definition_[start,end]_position 2020-05-17 11:48:28 -04:00
Sam Roeca
716beae455 Add BaseName.definition_[start,end]_position
Provides two public (property) methods getting the (row, column) of the
start / end of the definition range. Rows start with 1, columns start
with 0.

:rtype: Tuple[int, int]
2020-05-16 15:08:36 -04:00
Dave Halter
d16355fcf2 Fix tests in Python 2 2020-05-16 17:47:33 +02:00
Dave Halter
cd3d40a3b8 Fix a small issue 2020-05-16 15:42:15 +02:00
Dave Halter
b3fc10a6e4 Magic methods fixes for reverse methods 2020-05-16 15:39:48 +02:00
Dave Halter
09dbbc6361 lists and tuples should not be added 2020-05-16 15:10:47 +02:00
Dave Halter
f5ad561c51 Use __truediv__ instead of __div__
This ignores Python 2, but that shouldn't be an issue, since we are going to drop it anyway.
2020-05-16 14:57:57 +02:00
Dave Halter
0db50b521d Fix an issue with Tuple generics 2020-05-16 14:55:59 +02:00
Dave Halter
9942a3d44c A few class renames 2020-05-16 14:35:15 +02:00
Dave Halter
47637c147c Better debugging 2020-05-16 14:31:31 +02:00
Dave Halter
2fb072532a Skip another non-important Python 2 test that fails on Windows 2020-05-16 01:25:15 +02:00