Skip to content

Commit

Permalink
fixed type typo
Browse files Browse the repository at this point in the history
  • Loading branch information
hugsy committed Nov 2, 2024
1 parent 854912b commit f47f51e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ def update_gef(argv: list[str]) -> int:

__registered_commands__ : set[Type["GenericCommand"]] = set()
__registered_functions__ : set[Type["GenericFunction"]] = set()
__registered_architectures__ : dict["Elf.Abi" | str, Type["Architecture"]] = {}
__registered_file_formats__ : set[ Type["FileFormat"] ] = set()
__registered_architectures__ : dict["Elf.Abi | str", Type["Architecture"]] = {}
__registered_file_formats__ : set[ Type["FileFormat"] ] = set()

GefMemoryMapProvider = Callable[[], Generator["Section", None, None]]

Expand Down Expand Up @@ -2337,7 +2337,7 @@ def register_architecture(cls: Type["Architecture"]) -> Type["Architecture"]:

class ArchitectureBase:
"""Class decorator for declaring an architecture to GEF."""
aliases: tuple[()] | tuple[str | Elf.Abi | ...] = ()
aliases: tuple[str | Elf.Abi, ...]

def __init_subclass__(cls: Type["ArchitectureBase"], **kwargs):
global __registered_architectures__
Expand Down Expand Up @@ -8895,15 +8895,15 @@ class VMMapCommand(GenericCommand):

@only_if_gdb_running
@parse_arguments({"unknown_types": [""]}, {("--addr", "-a"): [""], ("--name", "-n"): [""]})
def do_invoke(self, _: List[str], **kwargs: Any) -> None:
def do_invoke(self, _: list[str], **kwargs: Any) -> None:
args : argparse.Namespace = kwargs["arguments"]
vmmap = gef.memory.maps
if not vmmap:
err("No address mapping information found")
return

addrs: Dict[str, int] = {x: parse_address(x) for x in args.addr}
names: List[str] = [x for x in args.name]
addrs: dict[str, int] = {x: parse_address(x) for x in args.addr}
names: list[str] = [x for x in args.name]

for arg in args.unknown_types:
if not arg:
Expand Down

0 comments on commit f47f51e

Please sign in to comment.