Skip to content

Commit 4f93500

Browse files
committed
pre-commit black formatting
1 parent 28837ee commit 4f93500

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

nodescraper/plugins/inband/cmdline/analyzer_args.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828

2929
class CmdlineAnalyzerArgs(BaseModel):
30-
required_cmdline: str | list = Field(default_factory=list)
31-
banned_cmdline: str | list = Field(default_factory=list)
30+
required_cmdline: list = Field(default_factory=list)
31+
banned_cmdline: list = Field(default_factory=list)
3232

3333
model_config = {"extra": "forbid"}
3434

nodescraper/plugins/inband/cmdline/cmdline_analyzer.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# SOFTWARE.
2424
#
2525
###############################################################################
26-
from typing import Any, Optional
26+
from typing import Optional
2727

2828
from nodescraper.enums import EventCategory, EventPriority, ExecutionStatus
2929
from nodescraper.interfaces import DataAnalyzer
@@ -38,15 +38,13 @@ class CmdlineAnalyzer(DataAnalyzer[CmdlineDataModel, CmdlineAnalyzerArgs]):
3838

3939
DATA_MODEL = CmdlineDataModel
4040

41-
def _compare_cmdline(
42-
self, cmdline: str, required_cmdline: str | list[Any], banned_cmdline: str | list[Any]
43-
) -> bool:
41+
def _compare_cmdline(self, cmdline: str, required_cmdline: list, banned_cmdline: list) -> bool:
4442
"""Compare the kernel cmdline against required and banned cmdline arguments.
4543
4644
Args:
4745
cmdline (str): Kernel command line arguments as a string.
48-
required_cmdline (str) | (list): required kernel cmdline arguments that must be present.
49-
banned_cmdline (str) | (list): banned kernel cmdline arguments that must not be present.
46+
required_cmdline (list): required kernel cmdline arguments that must be present.
47+
banned_cmdline (list): banned kernel cmdline arguments that must not be present.
5048
5149
Returns:
5250
bool: True if the cmdline matches the required arguments and does not contain banned arguments,

0 commit comments

Comments
 (0)