Skip to content

Commit

Permalink
Fix linting and formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschz committed Oct 27, 2024
1 parent 6f5a020 commit 4c4ac4d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ignored-modules=ghidra

# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
init-hook='import sys; sys.path.append("tools/isledecomp"); sys.path.append("tools/ghidra_scripts")'
init-hook='import sys; sys.path.append("reccmp/ghidra_scripts")'

# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
Expand Down
6 changes: 4 additions & 2 deletions reccmp/ghidra_scripts/lego_util/function_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ def build(api: FlatProgramAPI, func: PdbFunction, type_importer: "PdbTypeImporte
)

@abstractmethod
def matches_ghidra_function(self, ghidra_function: Function) -> bool: ...
def matches_ghidra_function(self, ghidra_function: Function) -> bool:
...

@abstractmethod
def overwrite_ghidra_function(self, ghidra_function: Function): ...
def overwrite_ghidra_function(self, ghidra_function: Function):
...


class ThunkPdbFunctionImport(PdbFunctionImporter):
Expand Down
2 changes: 1 addition & 1 deletion reccmp/ghidra_scripts/lego_util/ghidra_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
TypeNotFoundInGhidraError,
MultipleTypesFoundInGhidraError,
)
from lego_util.globals import GLOBALS, SupportedModules
from lego_util.globals import GLOBALS

# Disable spurious warnings in vscode / pylance
# pyright: reportMissingModuleSource=false
Expand Down
2 changes: 1 addition & 1 deletion reccmp/ghidra_scripts/lego_util/type_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# pylint: disable=too-many-return-statements # a `match` would be better, but for now we are stuck with Python 3.9
# pylint: disable=no-else-return # Not sure why this rule even is a thing, this is great for checking exhaustiveness

from reccmp.isledecomp.cvdump.types import VirtualBasePointer
from lego_util.exceptions import (
ClassOrNamespaceNotFoundInGhidraError,
TypeNotFoundError,
Expand Down Expand Up @@ -40,6 +39,7 @@
)
from ghidra.util.task import ConsoleTaskMonitor

from reccmp.isledecomp.cvdump.types import VirtualBasePointer

logger = logging.getLogger(__name__)

Expand Down
6 changes: 5 additions & 1 deletion reccmp/isledecomp/compare/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ def lookup(addr: int, size: int) -> Optional[bytes]:
class Compare:
# pylint: disable=too-many-instance-attributes
def __init__(
self, orig_bin: IsleBin, recomp_bin: IsleBin, pdb_file: Path | str, code_dir: Path | str
self,
orig_bin: IsleBin,
recomp_bin: IsleBin,
pdb_file: Path | str,
code_dir: Path | str,
):
self.orig_bin = orig_bin
self.recomp_bin = recomp_bin
Expand Down

0 comments on commit 4c4ac4d

Please sign in to comment.