Skip to content

Commit

Permalink
fixing linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wangmot committed Dec 2, 2024
1 parent 59559fd commit 8b74a71
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions surfactant/infoextractors/native_lib_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def load_pattern_db():
# Load regex patterns into database var
try:
with open(native_lib_patterns, "r") as regex:
database = json.load(regex)
return database
emba_patterns = json.load(regex)
return emba_patterns
except FileNotFoundError:
logger.warning(f"File not found for native library detection: {native_lib_patterns}")
return None
Expand Down Expand Up @@ -84,9 +84,9 @@ def extract_native_lib_info(filename):
return native_lib_info


def match_by_attribute(attribute: str, content: str, database: Dict) -> List[Dict]:
def match_by_attribute(attribute: str, content: str, patterns_database: Dict) -> List[Dict]:
libs = []
for name, library in database.items():
for name, library in patterns_database.items():
if attribute in library:
for pattern in library[attribute]:
if attribute == "filename":
Expand Down

0 comments on commit 8b74a71

Please sign in to comment.