Dropping max-complexity argument

This commit is contained in:
Jamie Hardt
2025-01-05 12:19:22 -08:00
parent 2be779fe53
commit 7ed423deaf
2 changed files with 26 additions and 27 deletions

View File

@@ -32,7 +32,7 @@ jobs:
run: | run: |
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics 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 - name: Test with pytest
run: | run: |
pytest pytest

View File

@@ -61,33 +61,32 @@ def _parse_cmx3600_line(line: str, line_number: int) -> object:
long_event_num_p = re.compile("^[0-9]{6} ") long_event_num_p = re.compile("^[0-9]{6} ")
short_event_num_p = re.compile("^[0-9]{3} ") short_event_num_p = re.compile("^[0-9]{3} ")
if isinstance(line, str): if line.startswith("TITLE:"):
if line.startswith("TITLE:"): return _parse_title(line, line_number)
return _parse_title(line, line_number) elif line.startswith("FCM:"):
elif line.startswith("FCM:"): return _parse_fcm(line, line_number)
return _parse_fcm(line, line_number) elif long_event_num_p.match(line) is not None:
elif long_event_num_p.match(line) is not None: length_file_128 = sum(_edl_column_widths(6, 128))
length_file_128 = sum(_edl_column_widths(6, 128)) if len(line) < length_file_128:
if len(line) < length_file_128: return _parse_long_standard_form(line, 32, line_number)
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)
else: 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: def _parse_title(line, line_num) -> StmtTitle: