scripts: Fix twisterlib for ruff - UP004
This fixes ruff linting error UP004, where a redundant `object` inheritance is present. Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This commit is contained in:
parent
c273419864
commit
52cd7d673f
4 changed files with 3 additions and 8 deletions
|
@ -800,7 +800,6 @@
|
||||||
"./scripts/pylib/twister/twisterlib/hardwaremap.py" = [
|
"./scripts/pylib/twister/twisterlib/hardwaremap.py" = [
|
||||||
"B006", # https://docs.astral.sh/ruff/rules/mutable-argument-default
|
"B006", # https://docs.astral.sh/ruff/rules/mutable-argument-default
|
||||||
"E501", # https://docs.astral.sh/ruff/rules/line-too-long
|
"E501", # https://docs.astral.sh/ruff/rules/line-too-long
|
||||||
"UP004", # https://docs.astral.sh/ruff/rules/useless-object-inheritance
|
|
||||||
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
|
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
|
||||||
"UP031", # https://docs.astral.sh/ruff/rules/printf-string-formatting
|
"UP031", # https://docs.astral.sh/ruff/rules/printf-string-formatting
|
||||||
]
|
]
|
||||||
|
@ -816,9 +815,6 @@
|
||||||
"UP031", # https://docs.astral.sh/ruff/rules/printf-string-formatting
|
"UP031", # https://docs.astral.sh/ruff/rules/printf-string-formatting
|
||||||
"UP032", # https://docs.astral.sh/ruff/rules/f-string
|
"UP032", # https://docs.astral.sh/ruff/rules/f-string
|
||||||
]
|
]
|
||||||
"./scripts/pylib/twister/twisterlib/mixins.py" = [
|
|
||||||
"UP004", # https://docs.astral.sh/ruff/rules/useless-object-inheritance
|
|
||||||
]
|
|
||||||
"./scripts/pylib/twister/twisterlib/package.py" = [
|
"./scripts/pylib/twister/twisterlib/package.py" = [
|
||||||
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
|
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
|
||||||
]
|
]
|
||||||
|
@ -845,7 +841,6 @@
|
||||||
"F541", # https://docs.astral.sh/ruff/rules/f-string-missing-placeholders
|
"F541", # https://docs.astral.sh/ruff/rules/f-string-missing-placeholders
|
||||||
"SIM102", # https://docs.astral.sh/ruff/rules/collapsible-if
|
"SIM102", # https://docs.astral.sh/ruff/rules/collapsible-if
|
||||||
"SIM115", # https://docs.astral.sh/ruff/rules/open-file-with-context-handler
|
"SIM115", # https://docs.astral.sh/ruff/rules/open-file-with-context-handler
|
||||||
"UP004", # https://docs.astral.sh/ruff/rules/useless-object-inheritance
|
|
||||||
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
|
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
|
||||||
"UP022", # https://docs.astral.sh/ruff/rules/replace-stdout-stderr
|
"UP022", # https://docs.astral.sh/ruff/rules/replace-stdout-stderr
|
||||||
"UP031", # https://docs.astral.sh/ruff/rules/printf-string-formatting
|
"UP031", # https://docs.astral.sh/ruff/rules/printf-string-formatting
|
||||||
|
|
|
@ -33,7 +33,7 @@ logger = logging.getLogger('twister')
|
||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
|
|
||||||
class DUT(object):
|
class DUT:
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
id=None,
|
id=None,
|
||||||
serial=None,
|
serial=None,
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
|
||||||
class DisablePyTestCollectionMixin(object):
|
class DisablePyTestCollectionMixin:
|
||||||
__test__ = False
|
__test__ = False
|
||||||
|
|
|
@ -59,7 +59,7 @@ logger = logging.getLogger('twister')
|
||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
|
|
||||||
class ExecutionCounter(object):
|
class ExecutionCounter:
|
||||||
def __init__(self, total=0):
|
def __init__(self, total=0):
|
||||||
'''
|
'''
|
||||||
Most of the stats are at test instance level
|
Most of the stats are at test instance level
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue