1
0
forked from VimPlug/jedi

Remove redundant parentheses

This commit is contained in:
Hugo
2018-01-04 16:32:52 +02:00
parent a7ac647498
commit 8cf708d0d4
41 changed files with 112 additions and 112 deletions

View File

@@ -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 []]

View File

@@ -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():

View File

@@ -1,5 +1,5 @@
class Base(object):
class Nested():
class Nested:
def foo():
pass

View File

@@ -1,5 +1,5 @@
# classmethod
class TarFile():
class TarFile:
@classmethod
def open(cls, name, **kwargs):
return cls.taropen(name, **kwargs)

View File

@@ -60,7 +60,7 @@ default(x=1)
# class arguments
# -----------------
class Instance():
class Instance:
def __init__(self, foo):
self.foo = foo

View File

@@ -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())

View File

@@ -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