Skip to content

Commit

Permalink
Changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Onager committed Jul 31, 2018
1 parent 4920467 commit c6ff5f5
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 41 deletions.
10 changes: 5 additions & 5 deletions tests/analysis/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def CompileReport(self, unused_mediator):
can be assembled.
Args:
mediator (AnalysisMediator): mediates interactions between analysis
plugins and other components, such as storage and dfvfs.
unused_mediator (AnalysisMediator): mediates interactions between
analysis plugins and other components, such as storage and dfvfs.
Returns:
AnalysisReport: analysis report.
Expand All @@ -38,9 +38,9 @@ def ExamineEvent(self, unused_mediator, unused_event, **unused_kwargs):
"""Analyzes an event object.
Args:
mediator (AnalysisMediator): mediates interactions between analysis
plugins and other components, such as storage and dfvfs.
event (EventObject): event.
unused_mediator (AnalysisMediator): mediates interactions between
analysis plugins and other components, such as storage and dfvfs.
unused_event (EventObject): event.
"""
return

Expand Down
2 changes: 1 addition & 1 deletion tests/analyzers/hashers/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def Update(self, unused_data):
concatenation of the arguments.
Args:
data: a string of data with which to update the context of the hasher.
unused_data (bytes): data with which to update the context of the hasher.
"""
return

Expand Down
2 changes: 1 addition & 1 deletion tests/cli/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def Write(self, unused_output_writer):
"""Writes the table to the output writer.
Args:
output_writer: the output writer (instance of OutputWriter).
unused_output_writer (OutputWriter): output writer.
"""
return

Expand Down
2 changes: 1 addition & 1 deletion tests/filters/test_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def CompileFilter(self, unused_filter_expression):
"""Compiles the filter expression.
Args:
filter_expression: string that contains the filter expression.
unused_filter_expression (str): filter expression.
Raises:
WrongPlugin: if the filter could not be compiled.
Expand Down
10 changes: 5 additions & 5 deletions tests/multi_processing/analysis_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def CompileReport(self, unused_mediator):
can be assembled.
Args:
mediator (AnalysisMediator): mediates interactions between analysis
plugins and other components, such as storage and dfvfs.
unused_mediator (AnalysisMediator): mediates interactions between
analysis plugins and other components, such as storage and dfvfs.
Returns:
AnalysisReport: analysis report.
Expand All @@ -41,9 +41,9 @@ def ExamineEvent(self, unused_mediator, unused_event, **unused_kwargs):
"""Analyzes an event.
Args:
mediator (AnalysisMediator): mediates interactions between analysis
plugins and other components, such as storage and dfvfs.
event (EventObject): event.
unused_mediator (AnalysisMediator): mediates interactions between
analysis plugins and other components, such as storage and dfvfs.
unused_event (EventObject): event.
"""
return

Expand Down
12 changes: 6 additions & 6 deletions tests/multi_processing/worker_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def ProcessPathSpec(self, unused_mediator, unused_path_spec):
"""Processes a path specification.
Args:
mediator (ParserMediator): mediates the interactions between
parsers and other components, such as storage and abort signals.
path_spec (dfvfs.PathSpec): path specification.
unused_mediator (ParserMediator): mediates interactions between
parsers and other components, such as storage and dfvfs.
unused_path_spec (dfvfs.PathSpec): path specification.
"""
pass

Expand All @@ -41,9 +41,9 @@ def ProcessPathSpec(self, unused_mediator, unused_path_spec):
"""Processes a path specification.
Args:
mediator (ParserMediator): mediates the interactions between
parsers and other components, such as storage and abort signals.
path_spec (dfvfs.PathSpec): path specification.
unused_mediator (ParserMediator): mediates interactions between
parsers and other components, such as storage and dfvfs.
unused_path_spec (dfvfs.PathSpec): path specification.
Raises:
dfvfs_errors.CacheFullError: cache full error.
Expand Down
10 changes: 5 additions & 5 deletions tests/output/fake_mysqldb.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def set_character_set(self, unused_character_set):
"""Sets the character set.
Args:
character_set (str): character set.
unused_character_set (str): character set.
"""
return

Expand Down Expand Up @@ -112,10 +112,10 @@ def connect(
"""Connects to the MySQL database server.
Args:
hostname (str): hostname of the server.
username (str): username to use to connect to the server.
password (str): password to use to connect to the server.
database_name (str): name of the database on the server.
unused_hostname (str): hostname of the server.
unused_username (str): username to use to connect to the server.
unused_password (str): password to use to connect to the server.
unused_database_name (str): name of the database on the server.
Returns:
FakeMySQLdbConnection: connection
Expand Down
2 changes: 1 addition & 1 deletion tests/output/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def WriteEventBody(self, unused_event_object):
"""Writes the body of an event object to the output.
Args:
event_object: the event object (instance of EventObject).
unused_event_object: the event object (instance of EventObject).
"""
pass

Expand Down
7 changes: 4 additions & 3 deletions tests/parsers/cookie_plugins/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ def GetEntries(
"""Extract and return EventObjects from the data structure.
Args:
parser_mediator: A parser mediator object (instance of ParserMediator).
cookie_data: Optional cookie data, as a byte string.
url: Optional URL or path where the cookie got set.
unused_parser_mediator (ParserMediator): mediates interactions between
parsers and other components, such as storage and dfvfs.
cookie_data (Optional[bytes]): cookie data, as a byte sequence.
url (Optional[str]): URL or path where the cookie was set.
"""
return

Expand Down
10 changes: 5 additions & 5 deletions tests/parsers/dsv_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def ParseRow(self, unused_parser_mediator, row_offset, row):
"""Parses a line of the log file and extract events.
Args:
parser_mediator (ParserMediator): mediates interactions between parsers
and other components, such as storage and dfvfs.
unused_parser_mediator (ParserMediator): mediates interactions between
parsers and other components, such as storage and dfvfs.
row_offset (int): offset of the row.
row (dict[str, str]): fields of a single row, as denoted in COLUMNS.
"""
Expand All @@ -45,9 +45,9 @@ def VerifyRow(self, unused_parser_mediator, unused_row):
"""Verifies if a line of the file corresponds with the expected format.
Args:
parser_mediator (ParserMediator): mediates interactions between parsers
and other components, such as storage and dfvfs.
row (dict[str, str]): fields of a single row, as denoted in COLUMNS.
unused_parser_mediator (ParserMediator): mediates interactions between
parsers and other components, such as storage and dfvfs.
unused_row (dict[str, str]): fields of a single row, as denoted in COLUMNS.
Returns:
bool: True if this is the correct parser, False otherwise.
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 @@ -45,7 +45,7 @@ def FoldByteStream(self, unused_mapped_value, **unused_kwargs):
"""Folds the data type into a byte stream.
Args:
mapped_value (object): mapped value.
unused_mapped_value (object): mapped value.
Returns:
bytes: byte stream.
Expand All @@ -61,7 +61,7 @@ def MapByteStream(self, unused_byte_stream, **unused_kwargs):
"""Maps the data type on a byte stream.
Args:
byte_stream (bytes): byte stream.
unused_byte_stream (bytes): byte stream.
Returns:
object: mapped value.
Expand Down
4 changes: 2 additions & 2 deletions tests/parsers/olecf_plugins/dtfabric_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def FoldByteStream(self, unused_mapped_value, **unused_kwargs):
"""Folds the data type into a byte stream.
Args:
mapped_value (object): mapped value.
unused_mapped_value (object): mapped value.
Returns:
bytes: byte stream.
Expand All @@ -61,7 +61,7 @@ def MapByteStream(self, unused_byte_stream, **unused_kwargs):
"""Maps the data type on a byte stream.
Args:
byte_stream (bytes): byte stream.
unused_byte_stream (bytes): byte stream.
Returns:
object: mapped value.
Expand Down
4 changes: 2 additions & 2 deletions tests/parsers/winreg_plugins/dtfabric_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def FoldByteStream(self, unused_mapped_value, **unused_kwargs):
"""Folds the data type into a byte stream.
Args:
mapped_value (object): mapped value.
unused_mapped_value (object): mapped value.
Returns:
bytes: byte stream.
Expand All @@ -61,7 +61,7 @@ def MapByteStream(self, unused_byte_stream, **unused_kwargs):
"""Maps the data type on a byte stream.
Args:
byte_stream (bytes): byte stream.
unused_byte_stream(bytes): byte stream.
Returns:
object: mapped value.
Expand Down
5 changes: 3 additions & 2 deletions tests/preprocessors/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ def ParseValueData(self, unused_knowledge_base, unused_value_data):
"""Parses artifact value data for a preprocessing attribute.
Args:
knowledge_base (KnowledgeBase): to fill with preprocessing information.
value_data (object): artifact value data.
unused_knowledge_base (KnowledgeBase): to fill with preprocessing
information.
unused_value_data (object): artifact value data.
"""
return

Expand Down

0 comments on commit c6ff5f5

Please sign in to comment.