mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-13 13:17:38 +02:00
Core: Fix LGTM recommendations
This is mostly unused imports and unused variables.
This commit is contained in:
@@ -11,27 +11,18 @@ import functools
|
||||
import logging
|
||||
import math
|
||||
import multiprocessing
|
||||
import multiprocessing.managers
|
||||
import threading
|
||||
import traceback
|
||||
import types
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from multiprocessing import managers
|
||||
from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Union
|
||||
|
||||
from volatility.framework import constants, exceptions, interfaces
|
||||
|
||||
vollog = logging.getLogger(__name__)
|
||||
|
||||
IMPORTED_MAGIC = False
|
||||
try:
|
||||
import magic
|
||||
|
||||
IMPORTED_MAGIC = True
|
||||
vollog.debug("Imported python-magic, autodetecting compressed files based on content")
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
ProgressValue = Union['DummyProgress', managers.ValueProxy]
|
||||
ProgressValue = Union['DummyProgress', multiprocessing.managers.ValueProxy]
|
||||
IteratorValue = Tuple[List[Tuple[str, int, int]], int]
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import abc
|
||||
import collections
|
||||
import collections.abc
|
||||
import logging
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from typing import Any, Dict, List, Mapping, Optional
|
||||
|
||||
from volatility.framework import constants, interfaces
|
||||
@@ -88,7 +87,7 @@ class ObjectInformation(ReadOnlyMapping):
|
||||
})
|
||||
|
||||
|
||||
class ObjectInterface(metaclass = ABCMeta):
|
||||
class ObjectInterface(metaclass = abc.ABCMeta):
|
||||
"""A base object required to be the ancestor of every object used in
|
||||
volatility."""
|
||||
|
||||
@@ -129,7 +128,7 @@ class ObjectInterface(metaclass = ABCMeta):
|
||||
# Wrap the outgoing vol in a read-only proxy
|
||||
return ReadOnlyMapping(self._vol)
|
||||
|
||||
@abstractmethod
|
||||
@abc.abstractmethod
|
||||
def write(self, value: Any):
|
||||
"""Writes the new value into the format at the offset the object
|
||||
currently resides at."""
|
||||
@@ -296,20 +295,20 @@ class Template:
|
||||
return []
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
@abc.abstractmethod
|
||||
def size(self) -> int:
|
||||
"""Returns the size of the template."""
|
||||
|
||||
@abstractmethod
|
||||
@abc.abstractmethod
|
||||
def relative_child_offset(self, child: str) -> int:
|
||||
"""Returns the relative offset of the `child` member from its parent
|
||||
offset."""
|
||||
|
||||
@abstractmethod
|
||||
@abc.abstractmethod
|
||||
def replace_child(self, old_child: 'Template', new_child: 'Template') -> None:
|
||||
"""Replaces `old_child` with `new_child` in the list of children."""
|
||||
|
||||
@abstractmethod
|
||||
@abc.abstractmethod
|
||||
def has_member(self, member_name: str) -> bool:
|
||||
"""Returns whether the object would contain a member called
|
||||
`member_name`"""
|
||||
|
||||
Reference in New Issue
Block a user