Skip to content

Commit

Permalink
Corrected doc strings to match style guide
Browse files Browse the repository at this point in the history
  • Loading branch information
rick authored and joachimmetz committed Apr 9, 2024
1 parent a49b3bd commit 44aa5d5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
10 changes: 6 additions & 4 deletions plaso/parsers/ips_plugins/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ def _ParseTimestampValue(self, parser_mediator, timestamp_text):
return time_element_object

def CheckRequiredKeys(self, ips_file):
"""Checks if the ips file's header and content have the keys required by
the plugin.
"""Checks if the ips file's header and content have the keys required by the
plugin.
Args:
ips_file (IPSFile): the file for which the structure is checked.
Returns:
Expand Down Expand Up @@ -114,8 +115,9 @@ def CheckRequiredKeys(self, ips_file):
# pylint: disable=arguments-differ
@abc.abstractmethod
def Process(self, parser_mediator, ips_file=None, **unused_kwargs):
"""Extracts information from an ips log file.
This is the main method that an ips plugin needs to implement.
"""Extracts information from an ips log file. This is the main method that
an ips plugin needs to implement.
Args:
parser_mediator (ParserMediator): parser mediator.
ips_file (Optional[IPSFile]): database.
Expand Down
5 changes: 3 additions & 2 deletions plaso/parsers/ips_plugins/recovery_logd.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ class AppleRecoveryLogdIPSPlugin(interface.IPSPlugin):

# pylint: disable=unused-argument
def Process(self, parser_mediator, ips_file=None, **unused_kwargs):
"""Extracts information from an IPS log file.
This is the main method that an IPS plugin needs to implement.
"""Extracts information from an IPS log file. This is the main method that
an IPS plugin needs to implement.
Args:
parser_mediator (ParserMediator): parser mediator.
ips_file (Optional[IpsFile]): database.
Expand Down
5 changes: 3 additions & 2 deletions plaso/parsers/ips_plugins/stacks_ips.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ class AppleStacksIPSPlugin(interface.IPSPlugin):

# pylint: disable=unused-argument
def Process(self, parser_mediator, ips_file=None, **unused_kwargs):
"""Extracts information from an IPS log file.
This is the main method that an IPS plugin needs to implement.
"""Extracts information from an IPS log file. This is the main method that
an IPS plugin needs to implement.
Args:
parser_mediator (ParserMediator): parser mediator.
ips_file (Optional[IpsFile]): database.
Expand Down
9 changes: 5 additions & 4 deletions tests/parsers/ips_plugins/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ class TestIPSPlugin(interface.IPSPlugin):
REQUIRED_CONTENT_KEYS = ['procName', 'parentPid']

def __int__(self):
"""Initializes"""
"""Initializes."""
super(TestIPSPlugin, self).__init__()

# pylint: disable=arguments-differ
@abc.abstractmethod
def Process(self, parser_mediator, ips_file=None, **unused_kwargs):
"""Extracts information from an IPS log file.
This is the main method that an IPS plugin needs to implement.
"""Extracts information from an IPS log file. This is the main method that
an IPS plugin needs to implement.
Args:
parser_mediator (ParserMediator): parser mediator.
ips_file (Optional[IPSFile]): database.
Expand All @@ -36,7 +37,7 @@ def Process(self, parser_mediator, ips_file=None, **unused_kwargs):


class IPSInterfaceTest(test_lib.IPSPluginTestCase):
"""Tests for the IPS plugin interface"""
"""Tests for the IPS plugin interface."""

def testCheckRequiredKeys(self):
"""Tests the CheckRequiredKeys function."""
Expand Down
2 changes: 1 addition & 1 deletion tests/parsers/ips_plugins/stacks_ips.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class AppleRecoveryLogdIPSPluginTest(test_lib.IPSPluginTestCase):
"""Tests for the Apple stacks crash IPS file parser"""
"""Tests for the Apple stacks crash IPS file parser."""

def testProcess(self):
"""Tests for the Process function."""
Expand Down

0 comments on commit 44aa5d5

Please sign in to comment.