forked from VimPlug/jedi
Remove redundant parentheses
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
class Cls():
|
||||
class Cls:
|
||||
class_attr = ''
|
||||
def __init__(self, input):
|
||||
self.instance_attr = 3
|
||||
@@ -77,7 +77,7 @@ return_one(''.undefined_attribute)
|
||||
[r for r in [1, 2]]
|
||||
|
||||
# some random error that showed up
|
||||
class NotCalled():
|
||||
class NotCalled:
|
||||
def match_something(self, param):
|
||||
seems_to_need_an_assignment = param
|
||||
return [value.match_something() for value in []]
|
||||
|
||||
@@ -8,7 +8,7 @@ Jedi issues warnings for possible errors if ``__getattr__``,
|
||||
# -----------------
|
||||
|
||||
|
||||
class Cls():
|
||||
class Cls:
|
||||
def __getattr__(self, name):
|
||||
return getattr(str, name)
|
||||
|
||||
@@ -32,7 +32,7 @@ Inherited().undefined
|
||||
# -----------------
|
||||
|
||||
|
||||
class SetattrCls():
|
||||
class SetattrCls:
|
||||
def __init__(self, dct):
|
||||
# Jedi doesn't even try to understand such code
|
||||
for k, v in dct.items():
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Base(object):
|
||||
class Nested():
|
||||
class Nested:
|
||||
def foo():
|
||||
pass
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# classmethod
|
||||
class TarFile():
|
||||
class TarFile:
|
||||
@classmethod
|
||||
def open(cls, name, **kwargs):
|
||||
return cls.taropen(name, **kwargs)
|
||||
|
||||
@@ -60,7 +60,7 @@ default(x=1)
|
||||
# class arguments
|
||||
# -----------------
|
||||
|
||||
class Instance():
|
||||
class Instance:
|
||||
def __init__(self, foo):
|
||||
self.foo = foo
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ mixed2(3, b=5)
|
||||
simple(1, **[])
|
||||
#! 12 type-error-star-star
|
||||
simple(1, **1)
|
||||
class A(): pass
|
||||
class A: pass
|
||||
#! 12 type-error-star-star
|
||||
simple(1, **A())
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ except (TypeError, NotImplementedError): pass
|
||||
# -----------------
|
||||
try:
|
||||
str.not_existing
|
||||
except ((AttributeError)): pass
|
||||
except (AttributeError): pass
|
||||
try:
|
||||
#! 4 attribute-error
|
||||
str.not_existing
|
||||
|
||||
Reference in New Issue
Block a user