Skip to content

Commit

Permalink
ci: upgrade pylint to "v2.11.1" in pre-commit check
Browse files Browse the repository at this point in the history
related pylint issues:
unsubscriptable-object: pylint-dev/pylint#5189
no-value-for-parameter:  pylint-dev/pylint#2778

PR Closed: Graviti-AI#1059
  • Loading branch information
zhen.chen committed Oct 25, 2021
1 parent a8865d9 commit 3fd0fd2
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 11 deletions.
1 change: 1 addition & 0 deletions docs/code/BSTLD.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# pylint: disable=pointless-string-statement
# pylint: disable=invalid-name
# pylint: disable=unused-import
# pylint: disable=unsubscriptable-object
# flake8: noqa: F401

"""This file includes the python code of BSTLD.rst and read_dataset_class.rst."""
Expand Down
1 change: 1 addition & 0 deletions docs/code/CADC.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# pylint: disable=import-error
# pylint: disable=pointless-string-statement
# pylint: disable=invalid-name
# pylint: disable=unsubscriptable-object

"""This file includes the python code of CADC.rst."""

Expand Down
1 change: 1 addition & 0 deletions docs/code/DogsVsCats.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# pylint: disable=pointless-string-statement
# pylint: disable=invalid-name
# pylint: disable=unused-import
# pylint: disable=unsubscriptable-object
# flake8: noqa: F401

"""This files includes the python code example in dogsvscats.rst."""
Expand Down
1 change: 1 addition & 0 deletions docs/code/LeedsSportsPose.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# pylint: disable=pointless-string-statement
# pylint: disable=invalid-name
# pylint: disable=unused-import
# pylint: disable=unsubscriptable-object
# flake8: noqa: F401

"""This file includes the python code of LeedsSportsPose.rst."""
Expand Down
1 change: 1 addition & 0 deletions docs/code/NeolixOD.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# pylint: disable=pointless-string-statement
# pylint: disable=invalid-name
# pylint: disable=unused-import
# pylint: disable=unsubscriptable-object
# flake8: noqa: F401

"""This file includes the python code of NeolixOD.rst."""
Expand Down
1 change: 1 addition & 0 deletions docs/code/Newsgroups20.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# pylint: disable=pointless-string-statement
# pylint: disable=invalid-name
# pylint: disable=unused-import
# pylint: disable=unsubscriptable-object
# flake8: noqa: F401

"""This file includes the python code of NewsGroups.rst and read_dataset_class.rst."""
Expand Down
1 change: 1 addition & 0 deletions docs/code/THCHS30.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# pylint: disable=pointless-string-statement
# pylint: disable=invalid-name
# pylint: disable=unused-import
# pylint: disable=unsubscriptable-object
# flake8: noqa: F401

"""This file includes the python code of THCHS.rst and read_dataset_class.rst."""
Expand Down
1 change: 1 addition & 0 deletions docs/code/VOC2012Segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# pylint: disable=pointless-string-statement
# pylint: disable=invalid-name
# pylint: disable=unused-import
# pylint: disable=unsubscriptable-object
# flake8: noqa: F401
# type: ignore[attr-defined]

Expand Down
3 changes: 3 additions & 0 deletions docs/code/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

# pylint: disable=wrong-import-position
# pylint: disable=pointless-string-statement
# pylint: disable=unsubscriptable-object
# pylint: disable=invalid-name
# pylint: disable=not-an-iterable
# type: ignore[arg-type]

"""This is the example code of using cache for online dataset."""
Expand Down
2 changes: 1 addition & 1 deletion docs/code/cloud_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# pylint: disable=wrong-import-position
# pylint: disable=wrong-import-order
# pylint: disable=pointless-string-statement

# pylint: disable=invalid-name
"""This file includes the python code of auth cloud storage import."""

"""Get cloud client"""
Expand Down
2 changes: 2 additions & 0 deletions docs/code/getting_started_with_tensorbay.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
# pylint: disable=ungrouped-imports
# pylint: disable=import-error
# pylint: disable=pointless-string-statement
# pylint: disable=not-an-iterable
# pylint: disable=invalid-name

"""This file includes the python code of getting_started_with_tensorbay.rst."""

Expand Down
1 change: 1 addition & 0 deletions docs/code/merge_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# pylint: disable=wrong-import-order
# pylint: disable=ungrouped-imports
# pylint: disable=pointless-string-statement
# pylint: disable=invalid-name


"""This file includes the python code of merged_dataset.rst."""
Expand Down
3 changes: 1 addition & 2 deletions requirements_linter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

# linter
pre-commit
pylint == 2.7.4
astroid == 2.5.2
pylint == 2.11.1
pytest == 6.2.2
mock == 2.0.0

Expand Down
2 changes: 1 addition & 1 deletion tensorbay/dataset/segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def _from_client(cls: Type[_FS], client: "FusionSegmentClient") -> _FS:
"""
# pylint: disable=protected-access
segment: _FS = object.__new__(cls)
super(cls, segment).__init__(client.name)
super(cls, segment).__init__(name=client.name) # pylint: disable=no-value-for-parameter
segment._client = client
segment._data = client.list_frames()
segment._repr_non_empty = True
Expand Down
2 changes: 1 addition & 1 deletion tensorbay/geometry/polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def area(self) -> float:
"""
area = 0.0
for i in range(len(self._data)):
for i in range(len(self._data)): # pylint: disable=consider-using-enumerate
# pylint: disable=invalid-name
x1, y1 = self._data[i - 1]
x2, y2 = self._data[i]
Expand Down
2 changes: 1 addition & 1 deletion tensorbay/geometry/polyline.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from tensorbay.utility import common_loads

if version_info >= (3, 8):
from math import dist as _dist
from math import dist as _dist # pylint: disable=no-name-in-module
else:
from math import hypot

Expand Down
2 changes: 1 addition & 1 deletion tensorbay/healthcheck/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Error:
"""Base class of healthcheck errors."""

def __str__(self) -> str:
...
return ""


class _ErrorContext:
Expand Down
1 change: 1 addition & 0 deletions tensorbay/opendataset/LeedsSportsPose/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#
# pylint: disable=invalid-name
# pylint: disable=missing-module-docstring
# pylint: disable=unsubscriptable-object

import os

Expand Down
5 changes: 1 addition & 4 deletions tensorbay/sensor/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@ class Sensor(NameMixin, TypeMixin[SensorType]):

extrinsics: Transform3D

def __new__(
cls: Type[_T],
name: str, # pylint: disable=unused-argument
) -> _T:
def __new__(cls: Type[_T], name: str) -> _T: # pylint: disable=unused-argument,arguments-differ
"""Create a new instance of Sensor.
Arguments:
Expand Down

0 comments on commit 3fd0fd2

Please sign in to comment.