Skip to content

Commit

Permalink
fix pylint W0235 (#3486)
Browse files Browse the repository at this point in the history
Co-authored-by: Bob Cao <bobcaocheng@gmail.com>
  • Loading branch information
tssujt and bobcao3 committed Nov 14, 2021
1 parent a4281a1 commit d78a69e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
exit 0
fi
# Make sure pylint doesn't regress
pylint python/taichi/ --disable=all --enable=C0121,C0415,W0101,W0401,W0611,W0202,R0205,R0402,R1703,R1705,R1732,C0200,R0201,W0108
pylint python/taichi/ --disable=all --enable=C0121,C0415,W0101,W0401,W0611,W0202,W0235,R0205,R0402,R1703,R1705,R1732,C0200,R0201,W0108
if [ $? -eq 0 ]
then
echo "PASSED: pylint is happy"
Expand Down
3 changes: 0 additions & 3 deletions python/taichi/lang/_ndarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,6 @@ class ScalarNdarray(Ndarray):
dtype (DataType): Data type of each value.
shape (Tuple[int]): Shape of the ndarray.
"""
def __init__(self, dtype, shape):
super().__init__(dtype, shape)

@property
def shape(self):
return tuple(self.arr.shape)
Expand Down
3 changes: 1 addition & 2 deletions python/taichi/lang/exception.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class TaichiSyntaxError(Exception):
def __init__(self, *args):
super().__init__(*args)
pass


class InvalidOperationError(Exception):
Expand Down
3 changes: 1 addition & 2 deletions python/taichi/lang/kernel_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,7 @@ def lookup(self, args):


class KernelDefError(Exception):
def __init__(self, msg):
super().__init__(msg)
pass


class KernelArgError(Exception):
Expand Down
8 changes: 1 addition & 7 deletions python/taichi/ui/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ def gen_normals(vertices, indices):
class Scene(_ti_core.PyScene):
"""A 3D scene, which can contain meshes and particles, and can be rendered on a canvas
"""
def __init__(self):
super().__init__()

def set_camera(self, camera):
super().set_camera(camera.ptr)

Expand Down Expand Up @@ -133,8 +130,5 @@ def particles(self,
vbo_info = get_field_info(vbo)
super().particles(vbo_info, has_per_vertex_color, color, radius)

def point_light(self, pos, color):
def point_light(self, pos, color): # pylint: disable=W0235
super().point_light(pos, color)

def ambient_light(self, color):
super().ambient_light(color)

0 comments on commit d78a69e

Please sign in to comment.