Skip to content

Commit 8d94a8b

Browse files
Armando FerreiraJavagedes
authored andcommitted
Removed @classmethod decorators from methods intended to be overridden by subclasses
1 parent 1a5fa06 commit 8d94a8b

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

edk2toolext/environment/uefi_build.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -613,26 +613,23 @@ def FlashRomImage(self) -> int:
613613
# Methods that will be overridden by child class
614614
# -----------------------------------------------------------------------
615615

616-
@classmethod
617-
def PlatformPreBuild(self: "UefiBuilder") -> int:
616+
def PlatformPreBuild(self) -> int:
618617
"""Perform Platform PreBuild Steps.
619618
620619
Returns:
621620
(int): 0 on success, 1 on failure
622621
"""
623622
return 0
624623

625-
@classmethod
626-
def PlatformPostBuild(self: "UefiBuilder") -> int:
624+
def PlatformPostBuild(self) -> int:
627625
"""Perform Platform PostBuild Steps.
628626
629627
Returns:
630628
(int): 0 on success, 1 on failure
631629
"""
632630
return 0
633631

634-
@classmethod
635-
def SetPlatformEnv(self: "UefiBuilder") -> int:
632+
def SetPlatformEnv(self) -> int:
636633
"""Set and read Platform Env variables.
637634
638635
This is performed before platform files like the DSC and FDF have been parsed.
@@ -647,17 +644,15 @@ def SetPlatformEnv(self: "UefiBuilder") -> int:
647644
"""
648645
return 0
649646

650-
@classmethod
651-
def SetPlatformEnvAfterTarget(self: "UefiBuilder") -> int:
647+
def SetPlatformEnvAfterTarget(self) -> int:
652648
"""Set and read Platform Env variables after platform files have been parsed.
653649
654650
Returns:
655651
(int): 0 on success, 1 on failure
656652
"""
657653
return 0
658654

659-
@classmethod
660-
def SetPlatformDefaultEnv(self: "UefiBuilder") -> list[namedtuple]:
655+
def SetPlatformDefaultEnv(self) -> list[namedtuple]:
661656
"""Sets platform default environment variables by returning them as a list.
662657
663658
Variables returned from this method are printed to the command line when
@@ -674,8 +669,7 @@ def SetPlatformDefaultEnv(self: "UefiBuilder") -> list[namedtuple]:
674669
"""
675670
return []
676671

677-
@classmethod
678-
def PlatformBuildRom(self: "UefiBuilder") -> int:
672+
def PlatformBuildRom(self) -> int:
679673
"""Build the platform Rom.
680674
681675
!!! tip
@@ -684,17 +678,15 @@ def PlatformBuildRom(self: "UefiBuilder") -> int:
684678
"""
685679
return 0
686680

687-
@classmethod
688-
def PlatformFlashImage(self: "UefiBuilder") -> int:
681+
def PlatformFlashImage(self) -> int:
689682
"""Flashes the image to the system.
690683
691684
Returns:
692685
(int): 0 on success, 1 on failure
693686
"""
694687
return 0
695688

696-
@classmethod
697-
def PlatformGatedBuildShouldHappen(self: "UefiBuilder") -> bool:
689+
def PlatformGatedBuildShouldHappen(self) -> bool:
698690
"""Specifies if a gated build should happen.
699691
700692
Returns:

0 commit comments

Comments
 (0)