Skip to content

Commit

Permalink
style: disable pylint too-few-public-methods
Browse files Browse the repository at this point in the history
I think this lint is not useful, and makes writing small classes more
difficult than it needs to be.

Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
  • Loading branch information
pb8o committed Dec 5, 2024
1 parent f8d8098 commit 35a1683
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 10 deletions.
2 changes: 0 additions & 2 deletions tests/framework/http_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

"""A simple HTTP client for the Firecracker API"""

# pylint:disable=too-few-public-methods

import urllib
from http import HTTPStatus

Expand Down
1 change: 0 additions & 1 deletion tests/framework/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# SPDX-License-Identifier: Apache-2.0

# pylint:disable=broad-except
# pylint:disable=too-few-public-methods

"""
Metadata we want to attach to tests for further analysis and troubleshooting
Expand Down
2 changes: 0 additions & 2 deletions tests/framework/state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"""Defines a stream based string matcher and a generic state object."""


# Too few public methods (1/2) (too-few-public-methods)
# pylint: disable=R0903
class MatchStaticString:
"""Match a static string versus input."""

Expand Down
1 change: 0 additions & 1 deletion tests/framework/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def __del__(self):
self.proc.kill()


# pylint: disable=too-few-public-methods
class CpuMap:
"""Cpu map from real cpu cores to containers visible cores.
Expand Down
6 changes: 3 additions & 3 deletions tests/integration_tests/functional/test_serial_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
PLATFORM = platform.machine()


class WaitTerminal(TestState): # pylint: disable=too-few-public-methods
class WaitTerminal(TestState):
"""Initial state when we wait for the login prompt."""

def handle_input(self, serial, input_char) -> TestState:
Expand All @@ -27,7 +27,7 @@ def handle_input(self, serial, input_char) -> TestState:
return self


class WaitIDResult(TestState): # pylint: disable=too-few-public-methods
class WaitIDResult(TestState):
"""Wait for the console to show the result of the 'id' shell command."""

def handle_input(self, unused_serial, input_char) -> TestState:
Expand All @@ -37,7 +37,7 @@ def handle_input(self, unused_serial, input_char) -> TestState:
return self


class TestFinished(TestState): # pylint: disable=too-few-public-methods
class TestFinished(TestState):
"""Test complete and successful."""

def handle_input(self, unused_serial, _) -> TestState:
Expand Down
3 changes: 2 additions & 1 deletion tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ disable = [
"line-too-long",
"redefined-outer-name",
"broad-exception-raised",
"duplicate-code"
"duplicate-code",
"too-few-public-methods",
]

0 comments on commit 35a1683

Please sign in to comment.