Skip to content

Commit

Permalink
Dropping max-complexity argument
Browse files Browse the repository at this point in the history
  • Loading branch information
iluvcapra committed Jan 5, 2025
1 parent 2be779f commit 7ed423d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --max-complexity=10 --max-line-length=79 --statistics
flake8 . --count --max-line-length=79 --statistics
- name: Test with pytest
run: |
pytest
51 changes: 25 additions & 26 deletions pycmx/parse_cmx_statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,33 +61,32 @@ def _parse_cmx3600_line(line: str, line_number: int) -> object:
long_event_num_p = re.compile("^[0-9]{6} ")
short_event_num_p = re.compile("^[0-9]{3} ")

if isinstance(line, str):
if line.startswith("TITLE:"):
return _parse_title(line, line_number)
elif line.startswith("FCM:"):
return _parse_fcm(line, line_number)
elif long_event_num_p.match(line) is not None:
length_file_128 = sum(_edl_column_widths(6, 128))
if len(line) < length_file_128:
return _parse_long_standard_form(line, 32, line_number)
else:
return _parse_long_standard_form(line, 128, line_number)
elif short_event_num_p.match(line) is not None:
return _parse_standard_form(line, line_number)
elif line.startswith("AUD"):
return _parse_extended_audio_channels(line, line_number)
elif line.startswith("*"):
return _parse_remark(line[1:].strip(), line_number)
elif line.startswith(">>> SOURCE"):
return _parse_source_umid_statement(line, line_number)
elif line.startswith("EFFECTS NAME IS"):
return _parse_effects_name(line, line_number)
elif line.startswith("SPLIT:"):
return _parse_split(line, line_number)
elif line.startswith("M2"):
return _parse_motion_memory(line, line_number)
if line.startswith("TITLE:"):
return _parse_title(line, line_number)
elif line.startswith("FCM:"):
return _parse_fcm(line, line_number)
elif long_event_num_p.match(line) is not None:
length_file_128 = sum(_edl_column_widths(6, 128))
if len(line) < length_file_128:
return _parse_long_standard_form(line, 32, line_number)
else:
return _parse_unrecognized(line, line_number)
return _parse_long_standard_form(line, 128, line_number)
elif short_event_num_p.match(line) is not None:
return _parse_standard_form(line, line_number)
elif line.startswith("AUD"):
return _parse_extended_audio_channels(line, line_number)
elif line.startswith("*"):
return _parse_remark(line[1:].strip(), line_number)
elif line.startswith(">>> SOURCE"):
return _parse_source_umid_statement(line, line_number)
elif line.startswith("EFFECTS NAME IS"):
return _parse_effects_name(line, line_number)
elif line.startswith("SPLIT:"):
return _parse_split(line, line_number)
elif line.startswith("M2"):
return _parse_motion_memory(line, line_number)
else:
return _parse_unrecognized(line, line_number)


def _parse_title(line, line_num) -> StmtTitle:
Expand Down

0 comments on commit 7ed423d

Please sign in to comment.