Skip to content

Commit

Permalink
Changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Onager committed Aug 26, 2018
1 parent 6fcee6d commit 7003f83
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions plaso/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def CreateSession(
"""Creates a session attribute container.
Args:
artifact_filter_names (Optional[list(str)]): names of artifact definitions
artifact_filter_names (Optional[list[str]]): names of artifact definitions
that are used for filtering file system and Windows Registry
key paths.
command_line_arguments (Optional[str]): the command line arguments.
Expand Down Expand Up @@ -299,7 +299,7 @@ def BuildFilterFindSpecs(
artifact_definitions_path (str): path to artifact definitions file.
custom_artifacts_path (str): path to custom artifact definitions file.
knowledge_base_object (KnowledgeBase): knowledge base.
artifact_filter_names (Optional[list(str)]): names of artifact
artifact_filter_names (Optional[list[str]]): names of artifact
definitions that are used for filtering file system and Windows
Registry key paths.
filter_file_path (Optional[str]): Path of filter file.
Expand Down
2 changes: 1 addition & 1 deletion plaso/output/mediator.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def GetFormatStringAttributeNames(self, event):
event (EventObject): event.
Returns:
list(str): list containing the attribute names. If no event formatter to
list[str]: list containing the attribute names. If no event formatter to
match the event can be found the function returns None.
"""
event_formatter = self.GetEventFormatter(event)
Expand Down
1 change: 0 additions & 1 deletion plaso/parsers/java_idx.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def ParseFileObject(self, parser_mediator, file_object, **kwargs):
and other components, such as storage and dfvfs.
file_object (dvfvs.FileIO): a file-like object to parse.
Raises:
UnableToParseFile: when the file cannot be parsed.
"""
Expand Down
5 changes: 3 additions & 2 deletions tests/analyzers/hashers/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ def GetStringDigest(self):
# Compliant with RFC 1149.4. See http://xkcd.com/221/.
return '4'

def Update(self, unused_data):
# pylint: disable=unused-argument
def Update(self, data):
"""Updates the current state of the hasher with a new block of data.
Repeated calls to update are equivalent to one single call with the
concatenation of the arguments.
Args:
unused_data (bytes): data with which to update the context of the hasher.
data (bytes): data with which to update the context of the hasher.
"""
return

Expand Down
8 changes: 6 additions & 2 deletions tests/multi_processing/base_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ class TestProcess(base_process.MultiProcessBaseProcess):
"""Implementation of the multi-processing base process for testing."""

def _GetStatus(self):
"""Returns status information."""
"""Returns status information.
Returns:
dict [str, object]: status attributes, indexed by name.
"""
# TODO: implement.
return
return {}

def _Main(self):
"""The process main loop.
Expand Down
2 changes: 1 addition & 1 deletion tests/output/xlsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _GetSheetRows(self, filename):
filename (str): The file path of the XLSX document to parse.
Returns:
list(list[str]): A list of lists representing the rows of the first sheet.
list[list[str]]: A list of lists representing the rows of the first sheet.
Raises:
ValueError: if the sheet cannot be found, or a string cannot be read.
Expand Down
4 changes: 2 additions & 2 deletions tests/parsers/dtfabric_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ErrorDataTypeMap(dtfabric_data_maps.DataTypeMap):

# pylint 1.9.3 wants a docstring for kwargs, but this is not useful to add.
# pylint: disable=missing-param-doc,unused-argument
def FoldByteStream(self, mapped_value, **unused_kwargs):
def FoldByteStream(self, mapped_value, **kwargs):
"""Folds the data type into a byte stream.
Args:
Expand All @@ -54,7 +54,7 @@ def FoldByteStream(self, mapped_value, **unused_kwargs):

# pylint 1.9.3 wants a docstring for kwargs, but this is not useful to add.
# pylint: disable=missing-param-doc
def MapByteStream(self, byte_stream, **unused_kwargs):
def MapByteStream(self, byte_stream, **kwargs):
"""Maps the data type on a byte stream.
Args:
Expand Down
2 changes: 1 addition & 1 deletion tests/parsers/winreg_plugins/appcompatcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, name):

def GetStat(self):
"""Retrieves the stat object."""
return
return None


class AppCompatCacheWindowsRegistryPluginTest(test_lib.RegistryPluginTestCase):
Expand Down

0 comments on commit 7003f83

Please sign in to comment.