Fix a large number of typing issues.

There are several instances where mypy didn't detect

if blah is not None:
    blah = thing

and so were rewritten as:

blah = blah or thing
This commit is contained in:
Mike Auty
2018-06-04 01:25:02 +01:00
parent d3782c0519
commit 7a52ac9deb
22 changed files with 70 additions and 61 deletions
+3 -4
View File
@@ -1,13 +1,12 @@
"""Objects are the core of volatility, and provide pythonic access to interpreted values of data from a layer.
"""
import collections
import collections.abc
import logging
import typing
from abc import ABCMeta, abstractmethod
import collections
import collections.abc
from volatility.framework import constants, validity, interfaces
from volatility.framework.interfaces import context as interfaces_context
@@ -109,7 +108,7 @@ class ObjectInterface(validity.ValidityRoutines, metaclass = ABCMeta):
Raises InvalidDataException on failure to validate the data correctly.
"""
def get_symbol_table(self) -> 'interfaces.symbols.SymbolTableInterface':
def get_symbol_table(self) -> typing.Optional['interfaces.symbols.SymbolTableInterface']:
"""Returns the symbol table for this particular object
Returns none if the symbol table cannot be identified.