cell_parsers

Module containing parsers for notebook cells.

This also includes parsers for the cell and inline tags. It heavily utilizes the mutability of lists.

Functions

Summary

extract_flake8_inline_tags

Extract flake8-tags which were used as comment in a cell.

extract_flake8_tags

Extract all tag that start with 'flake8-noqa-' from a cell.

extract_inline_flake8_noqa

Extract flake8 noqa rules from normal flake8 comments .

flake8_tag_to_rules_dict

Parse a flake8 tag to a rules_dict.

generate_rules_list

Generate a List of rules from rules_dict.

get_flake8_rules_dict

Parse all flake8 tags of a cell to a rules_dict.

notebook_cell_to_intermediate_dict

Parse notebook_cell to a dict.

update_inline_flake8_noqa

Update source_line with flake8 noqa comments.

update_rules_dict

Update the rules dict total_rules_dict with new_rules_dict.

Exceptions

Exception Summary

InvalidFlake8TagWarning

Warning thrown when a tag is badly formatted.