Skip to content

Commit

Permalink
fix: Remove disabling no-self-use lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfan committed Oct 19, 2024
1 parent 2d0eb10 commit 18ae74c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
5 changes: 0 additions & 5 deletions python/legion_linux/legion_linux/legion.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,9 @@ def _notify(self):
for func in self.callbacks:
func(self)

# pylint: disable=no-self-use
def exists(self):
return True

# pylint: disable=no-self-use
def get_values(self) -> List[NamedValue]:
return []

Expand Down Expand Up @@ -299,7 +297,6 @@ def _find_by_file_pattern(pattern):
return matches[0]
return None

# pylint: disable=no-self-use
def get_values(self) -> List[NamedValue]:
return []

Expand Down Expand Up @@ -667,7 +664,6 @@ def _exec_cmd(self, cmd, timeout=None) -> Tuple[str, int]:
def name(self):
return type(self).__name__

# pylint: disable=no-self-use
def get_values(self) -> List[NamedValue]:
return []

Expand Down Expand Up @@ -1050,7 +1046,6 @@ def get_settings(self) -> Settings:
settings.setting_entries[name] = value
return settings

# pylint: disable=no-self-use
def apply_settings(self, preset: Settings):
for name, value in preset.setting_entries.items():
log.error("Try seting %s from preset to %s", name, value)
Expand Down
4 changes: 0 additions & 4 deletions python/legion_linux/legion_linux/legion_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,15 @@ def command_disable_cli(self, **_) -> int:
return self.command_disable()
return -10

# pylint: disable=no-self-use
def exists(self) -> bool:
return False

# pylint: disable=no-self-use
def command_status(self, **_) -> int:
return 0

# pylint: disable=no-self-use
def command_enable(self, **_) -> int:
return -1

# pylint: disable=no-self-use
def command_disable(self, **_) -> int:
return -1

Expand Down
2 changes: 1 addition & 1 deletion python/legion_linux/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
init-hook='import sys; sys.path.append("python/legion_linux")'

[MESSAGES CONTROL]
disable=missing-docstring,no-self-use,too-many-arguments,too-many-locals, import-error, duplicate-code, missing-module-docstring, too-many-instance-attributes, too-many-public-methods, no-name-in-module
disable=missing-docstring,too-many-arguments,too-many-locals, import-error, duplicate-code, missing-module-docstring, too-many-instance-attributes, too-many-public-methods, no-name-in-module

[FORMAT]
max-line-length=120
2 changes: 1 addition & 1 deletion tests/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -ex
DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

pylint --ignore-patterns=legion_gui_qt6.py,legion_version.py --disable no-self-use --rcfile ${DIR}/../python/legion_linux/pylintrc ${DIR}/../python/legion_linux/legion_linux
pylint --ignore-patterns=legion_gui_qt6.py,legion_version.py --rcfile ${DIR}/../python/legion_linux/pylintrc ${DIR}/../python/legion_linux/legion_linux

0 comments on commit 18ae74c

Please sign in to comment.