module helpers.code_helper
¶
Functions¶
function |
truncated documentation |
---|---|
Counts groups extracted from source file. We assume all selected files can be opened as text files encoded in utf-8 … |
Documentation¶
Helpers about code.
-
ensae_teaching_cs.helpers.code_helper.
enumerate_inspect_source_code
(folder, file_pattern='.*[.]((py)|(ipynb))$', neg_pattern='.*(([-]checkpoint)|(_todo)|(_temp)).*', line_patterns='from sklearn[_0-9a-zA-Z.]* import ([_a-zA-Z0-9]+);;import sklearn[.]([_a-z]+)', fullname=False)¶ Counts groups extracted from source file. We assume all selected files can be opened as text files encoded in utf-8 character set.
- Paramètres
folder – folder to dig into
file_pattern – files to consider
neg_pattern – negative patterns for filenames
line_patterns – patterns to look into, separated by
;;
fullname – if True, include the subfolder while checking the regex
- Renvoie
list of dictionaries