From 8e007a55c3ed8db1a72dfee4988a91b6938a2d27 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sat, 27 Dec 2025 13:19:22 +0000 Subject: [PATCH] Fix black and typing error --- volatility3/framework/automagic/symbol_cache.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/volatility3/framework/automagic/symbol_cache.py b/volatility3/framework/automagic/symbol_cache.py index 4ac07f0e3..3f399a777 100644 --- a/volatility3/framework/automagic/symbol_cache.py +++ b/volatility3/framework/automagic/symbol_cache.py @@ -243,7 +243,7 @@ class SqliteCache(CacheManagerInterface): yield row["location"] def is_url_local( - self, url: str, prefix: Optional[Union[str, tuple[str, ...]]] = None + self, url: str, prefix: Optional[Union[str, Tuple[str, ...]]] = None ) -> bool: """Determines whether an url is local or not (and whether it begins with a specific prefix if specified)""" parsed = urllib.parse.urlparse(url) @@ -312,12 +312,9 @@ class SqliteCache(CacheManagerInterface): non_existant_missing: list[str] = [] for missing_location in missing_locations: parsed_url = urllib.parse(missing_location) - if ( - self.is_url_local(missing_location) - and parsed_url.startswith( - tuple(constants.SYMBOL_BASEPATHS) - ) # Only remove entries that are within the specified basepath - ): + if self.is_url_local(missing_location) and parsed_url.startswith( + tuple(constants.SYMBOL_BASEPATHS) + ): # Only remove entries that are within the specified basepath non_existant_missing.append(missing_location) self._database.cursor().execute( f"DELETE FROM cache WHERE location IN ({','.join(['?'] * len(non_existant_missing))})",