Skip to content

Commit

Permalink
fix flake8 whitespace errors on smbios.py
Browse files Browse the repository at this point in the history
No semantic change.  Fix:  E125, E252, E303, E305
  • Loading branch information
WilliamLeara authored and npmitche committed Oct 9, 2023
1 parent 5544c92 commit 87c71c5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions chipsec/hal/smbios.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@


class SMBIOS_2_x_ENTRY_POINT(namedtuple('SMBIOS_2_x_ENTRY_POINT', 'Anchor EntryCs EntryLen MajorVer MinorVer MaxSize EntryRev \
FormatArea0 FormatArea1 FormatArea2 FormatArea3 FormatArea4 IntAnchor IntCs TableLen TableAddr NumStructures BcdRev')):
FormatArea0 FormatArea1 FormatArea2 FormatArea3 FormatArea4 IntAnchor IntCs TableLen TableAddr NumStructures BcdRev')):
__slots__ = ()

def __str__(self) -> str:
Expand Down Expand Up @@ -74,7 +74,7 @@ def __str__(self) -> str:


class SMBIOS_3_x_ENTRY_POINT(namedtuple('SMBIOS_3_x_ENTRY_POINT', 'Anchor EntryCs EntryLen MajorVer MinorVer Docrev EntryRev \
Reserved MaxSize TableAddr')):
Reserved MaxSize TableAddr')):
__slots__ = ()

def __str__(self) -> str:
Expand Down Expand Up @@ -122,7 +122,7 @@ def __str__(self) -> str:


class SMBIOS_BIOS_INFO_2_0(namedtuple('SMBIOS_BIOS_INFO_2_0_ENTRY', 'type length handle vendor_str version_str segment \
release_str rom_sz bios_char strings')):
release_str rom_sz bios_char strings')):
__slots__ = ()

def __str__(self) -> str:
Expand Down Expand Up @@ -159,7 +159,7 @@ def __str__(self) -> str:


class SMBIOS_SYSTEM_INFO_2_0(namedtuple('SMBIOS_SYSTEM_INFO_2_0_ENTRY', 'type length handle manufacturer_str product_str \
version_str serial_str strings')):
version_str serial_str strings')):
__slots__ = ()

def __str__(self) -> str:
Expand Down Expand Up @@ -187,6 +187,7 @@ def __str__(self) -> str:
Serial Number : {ser_str:s}
"""


SmbiosInfo = Union[SMBIOS_BIOS_INFO_2_0, SMBIOS_SYSTEM_INFO_2_0]
StructDecode = Dict[str, Any] # TODO: Replace Any when TypeDict (PEP 589) supported

Expand All @@ -209,7 +210,6 @@ def __init__(self, cs):
self.smbios_3_ep = None
self.smbios_3_data = None


def __get_raw_struct(self, table: bytes, start_offset: int) -> Tuple[Optional[bytes], Optional[int]]:
"""
Returns a tuple including the raw data and the offset to the next entry. This allows the function
Expand Down Expand Up @@ -467,7 +467,7 @@ def get_string_list(self, raw_data: bytes) -> Optional[List[str]]:
logger().log_hal(f'+ Found {len(ret_val):d} strings')
return ret_val

def get_decoded_structs(self, struct_type: Optional[int] = None, force_32bit: bool =False) -> Optional[List[Type[SmbiosInfo]]]:
def get_decoded_structs(self, struct_type: Optional[int] = None, force_32bit: bool = False) -> Optional[List[Type[SmbiosInfo]]]:
ret_val = []

# Determine if the structure exists in the table
Expand Down

0 comments on commit 87c71c5

Please sign in to comment.