Skip to content

Commit

Permalink
- improved docstrings;
Browse files Browse the repository at this point in the history
  • Loading branch information
jaltmayerpizzorno committed Aug 26, 2024
1 parent 3df3357 commit a239fd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/coverup/logreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def is_same_as_P(content, begin, end):
"""This attempts to detect 'C' (context) prompts that were only issued as context prompts
"""Attempts to detect 'C' (context) prompts that were only issued as context prompts
because their 'def' executed when their module was loaded to 'P' (initial) prompts,
which is what they should have been."""

Expand Down Expand Up @@ -82,6 +82,8 @@ def del_line_markup(s):


def parse_log(log_content: str, check_c_p_equivalence=False):
"""Parses a log file's contents, yielding events."""

for m in re.finditer('---- (?:(\S+) )?([\S+ ]+) ----\n\n?(.*?)(?=\n---- |\Z)',
log_content, re.DOTALL):
timestamp, event, content = m.groups()
Expand Down

0 comments on commit a239fd6

Please sign in to comment.