mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
realizing that #241 is more of a feature than a bug, I disabled the corresponding test. This will be changed once the whole implementation of isinstance becomes more flexible and also allows checks on subclasses, so that no information is lost.
This commit is contained in:
@@ -34,11 +34,14 @@ if 2:
|
||||
# -----------------
|
||||
|
||||
import datetime
|
||||
|
||||
|
||||
def fooooo(obj):
|
||||
if isinstance(obj, datetime.datetime):
|
||||
#? datetime.datetime
|
||||
obj
|
||||
|
||||
|
||||
def fooooo2(obj):
|
||||
if isinstance(obj, datetime.datetime):
|
||||
return obj
|
||||
@@ -47,3 +50,20 @@ def fooooo2(obj):
|
||||
|
||||
#? int() datetime.datetime
|
||||
fooooo2('')
|
||||
|
||||
|
||||
# -----------------
|
||||
# Names with multiple indices.
|
||||
# -----------------
|
||||
|
||||
class Test():
|
||||
def __init__(self, testing):
|
||||
if isinstance(testing, str):
|
||||
self.testing = testing
|
||||
else:
|
||||
self.testing = 10
|
||||
|
||||
def boo(self):
|
||||
if isinstance(self.testing, str):
|
||||
##? str()
|
||||
self.testing
|
||||
|
||||
Reference in New Issue
Block a user