Fix linter types issues (#1996)

pull/1997/head
Niko 2 years ago committed by GitHub
parent e77f309f97
commit bef93ac56a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,6 +2,8 @@ from __future__ import annotations
import argparse
import re
from typing import Any
from typing import Dict
import pwndbg.color.message as message
import pwndbg.gdblib.dynamic
@ -133,7 +135,7 @@ def got_report(soname=".*", writable=False, fnname=".*"):
)
print()
per_object = {}
per_object: Dict[Any, Any] = {}
for _, (tracker, patcher) in pwndbg.gdblib.got.all_tracked_entries():
objname = tracker.link_map_entry.name()
if objname == b"":

@ -30,7 +30,7 @@ def print_exception(exception_msg):
except ImportError:
_rich_console = ...
if not isinstance(_rich_console, type(Ellipsis)): # type: ignore[arg-type]
if not isinstance(_rich_console, type(Ellipsis)):
_rich_console.print_exception()
else:
print(exception_msg)

@ -12,6 +12,9 @@ that may have a somewhat obtuse beahvior, due to limitations in GDB. See
from __future__ import annotations
from typing import Any
from typing import Dict
import gdb
import pwndbg.color.message as message
@ -315,7 +318,7 @@ class DynamicSegment:
# Map the tags we want to find to their respective entires. We don't
# allow for repeats on most tags as they should only appear once in a
# well-formed dynamic segment.
sections = {}
sections: Dict[Any, Any] = {}
for i in range(self.entries):
tag = self.dyn_array_read(i, "d_tag")
if tag in sections:

Loading…
Cancel
Save