➜ SUEPCoffea_dask git:(master) ✗ pre-commit run --all-files
check for added large files..............................................Passed
check for case conflicts.................................................Passed
check for merge conflicts................................................Passed
check for broken symlinks............................(no files to check)Skipped
check yaml...............................................................Passed
debug statements (python)................................................Passed
fix end of files.........................................................Passed
mixed line ending........................................................Passed
python tests naming..................................(no files to check)Skipped
fix requirements.txt.................................(no files to check)Skipped
trim trailing whitespace.................................................Passed
black....................................................................Passed
pycln....................................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1
workflows/ML_coffea.py:19:1: E402 module level import not at top of file
workflows/ML_coffea.py:20:1: E402 module level import not at top of file
workflows/ML_coffea.py:21:1: E402 module level import not at top of file
workflows/ML_coffea.py:62:9: F841 local variable 'dataset' is assigned to but never used
workflows/ML_coffea.py:132:9: F841 local variable 'columns' is assigned to but never used
workflows/ML_coffea.py:175:9: F841 local variable 'ISR_cand_CL' is assigned to but never used
plotting/multithread.py:85:52: E741 ambiguous variable name 'l'
plotting/CMS_corrections/track_killing.py:19:5: F841 local variable 'sys' is assigned to but never used
workflows/ZH_utils.py:4:46: B006 Do not use mutable data structures for argument defaults. They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.
workflows/ZH_utils.py:5:5: E265 block comment should start with '# '
workflows/ZH_utils.py:29:5: E266 too many leading '#' for block comment
workflows/ZH_utils.py:30:5: E266 too many leading '#' for block comment
workflows/ZH_utils.py:31:5: E266 too many leading '#' for block comment
workflows/ZH_utils.py:48:5: E266 too many leading '#' for block comment
workflows/ZH_utils.py:53:5: E266 too many leading '#' for block comment
workflows/ZH_utils.py:88:9: E266 too many leading '#' for block comment
additional_tools/lxplus_run.py:65:1: C901 'main' is too complex (15)
workflows/ML_utils.py:9:1: E402 module level import not at top of file
workflows/ML_utils.py:10:1: E402 module level import not at top of file
workflows/ML_utils.py:11:1: E402 module level import not at top of file
workflows/ML_utils.py:12:1: E402 module level import not at top of file
workflows/ML_utils.py:14:1: E402 module level import not at top of file
workflows/ML_utils.py:42:31: F821 undefined name 'inf_cands'
workflows/ML_utils.py:43:42: F821 undefined name 'inf_cands'
workflows/ML_utils.py:44:39: F821 undefined name 'inf_cands'
workflows/ML_utils.py:45:21: F821 undefined name 'inf_cands'
workflows/ML_utils.py:333:25: F821 undefined name 'self'
condor_SUEP_cutflow.py:49:23: F821 undefined name 'processor'
workflows/SUEP_coffea.py:17:1: E402 module level import not at top of file
workflows/SUEP_coffea.py:20:1: E402 module level import not at top of file
workflows/SUEP_coffea.py:21:1: E402 module level import not at top of file
workflows/SUEP_coffea.py:24:1: E402 module level import not at top of file
workflows/SUEP_coffea.py:25:1: E402 module level import not at top of file
workflows/SUEP_coffea.py:26:1: E402 module level import not at top of file
workflows/SUEP_coffea.py:27:1: E402 module level import not at top of file
workflows/SUEP_coffea.py:223:13: F841 local variable 'jets_jec_JESDown' is assigned to but never used
workflows/SUEP_coffea.py:418:9: F841 local variable 'dataset' is assigned to but never used
resubmit.py:86:1: C901 'Loop 86' is too complex (15)
workflows/SUEP_coffea_cutflow.py:18:1: E402 module level import not at top of file
workflows/SUEP_coffea_cutflow.py:21:1: E402 module level import not at top of file
workflows/SUEP_coffea_cutflow.py:22:1: E402 module level import not at top of file
workflows/SUEP_coffea_cutflow.py:204:16: F821 undefined name 'sphericity'
plotting/make_plots.py:12:1: F401 'pandas as pd' imported but unused
plotting/make_plots.py:161:17: E265 block comment should start with '# '
plotting/make_plots.py:169:1: C901 'create_output_file' is too complex (15)
plotting/make_plots.py:169:1: E302 expected 2 blank lines, found 1
plotting/make_plots.py:276:28: E741 ambiguous variable name 'l'
plotting/make_plots.py:623:1: E266 too many leading '#' for block comment
plotting/make_plots.py:624:1: C901 'Loop 624' is too complex (21)
plotting/make_plots.py:694:9: F402 import 'sys' from line 8 shadowed by loop variable
plotting/make_plots.py:733:22: F821 undefined name 'apply_scaling_weights'
plotting/make_plots.py:782:1: E266 too many leading '#' for block comment
condor_ML.py:48:23: F821 undefined name 'processor'
dask/runner.py:17:5: B001 Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer `except Exception:`. If you're sure what you're doing, be explicit and write `except BaseException:`.
dask/runner.py:29:5: B001 Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer `except Exception:`. If you're sure what you're doing, be explicit and write `except BaseException:`.
dask/runner.py:161:1: C901 'If 161' is too complex (36)
dask/runner.py:243:9: F901 'raise NotImplemented' should be 'raise NotImplementedError'
dask/runner.py:257:29: E741 ambiguous variable name 'l'
dask/runner.py:263:13: B001 Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer `except Exception:`. If you're sure what you're doing, be explicit and write `except BaseException:`.
dask/runner.py:264:17: B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling. See https://docs.python.org/3/tutorial/errors.html#exception-chaining for details.
dask/runner.py:423:21: E265 block comment should start with '# '
dask/runner.py:477:21: E265 block comment should start with '# '
plotting/CMS_corrections/GNN_syst.py:5:1: F401 'hist' imported but unused
plotting/CMS_corrections/GNN_syst.py:8:1: E402 module level import not at top of file
workflows/CMS_corrections/track_killing_utils.py:21:5: F841 local variable 'block0_indices' is assigned to but never used
kraken_run.py:81:1: C901 'main' is too complex (17)
workflows/CMS_corrections/jetmet_utils.py:8:1: C901 'apply_jecs' is too complex (24)
workflows/CMS_corrections/jetmet_utils.py:77:17: E265 block comment should start with '# '
workflows/CMS_corrections/jetmet_utils.py:78:17: E265 block comment should start with '# '
workflows/CMS_corrections/jetmet_utils.py:79:17: E265 block comment should start with '# '
workflows/CMS_corrections/jetmet_utils.py:105:17: E265 block comment should start with '# '
workflows/CMS_corrections/jetmet_utils.py:106:17: E265 block comment should start with '# '
workflows/CMS_corrections/jetmet_utils.py:107:17: E265 block comment should start with '# '
condor_SUEP_WS.py:48:23: F821 undefined name 'processor'
workflows/pandas_utils.py:49:13: F841 local variable 'store_fin' is assigned to but never used
workflows/pandas_utils.py:72:13: B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling. See https://docs.python.org/3/tutorial/errors.html#exception-chaining for details.
workflows/SUEP_utils.py:4:1: F401 'pandas as pd' imported but unused
workflows/SUEP_utils.py:105:9: F841 local variable 'deltaR' is assigned to but never used
workflows/SUEP_utils.py:172:9: F841 local variable 'deltaR' is assigned to but never used
condor_Scouting.py:42:1: F821 undefined name 'processor'
condor_Scouting.py:51:23: F821 undefined name 'processor'
plotting/plot_utils.py:13:1: F401 'pandas as pd' imported but unused
plotting/plot_utils.py:14:1: F401 'sympy' imported but unused
plotting/plot_utils.py:53:1: C901 'loader' is too complex (24)
plotting/plot_utils.py:53:1: E302 expected 2 blank lines, found 1
plotting/plot_utils.py:141:47: B006 Do not use mutable data structures for argument defaults. They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.
plotting/plot_utils.py:277:12: F841 local variable 'elist' is assigned to but never used
plotting/plot_utils.py:278:9: E741 ambiguous variable name 'l'
plotting/plot_utils.py:298:57: F821 undefined name 'matplotlib'
plotting/plot_utils.py:303:5: F821 undefined name 'fig'
plotting/plot_utils.py:353:22: F821 undefined name 'x1'
plotting/plot_utils.py:358:22: F821 undefined name 'x1'
plotting/plot_utils.py:396:22: F821 undefined name 'h1'
plotting/plot_utils.py:428:9: F841 local variable 'xmax1' is assigned to but never used
plotting/plot_utils.py:531:13: B007 Loop control variable 'x' not used within the loop body. If this is intended, start the name with an underscore.
monitor.py:16:13: F841 local variable 'data' is assigned to but never used
monitor.py:18:5: B001 Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer `except Exception:`. If you're sure what you're doing, be explicit and write `except BaseException:`.
monitor.py:22:1: C901 'main' is too complex (23)
monitor.py:97:75: E712 comparison to True should be 'if cond is not True:' or 'if not cond:'
plotting/merge_plots.py:9:1: F403 'from plot_utils import *' used; unable to detect undefined names
plotting/merge_plots.py:44:1: E302 expected 2 blank lines, found 1
plotting/merge_plots.py:55:5: F841 local variable 'returncode' is assigned to but never used
plotting/merge_plots.py:97:5: B007 Loop control variable 'ifile' not used within the loop body. If this is intended, start the name with an underscore.
plotting/merge_plots.py:111:20: F405 'h5load' may be undefined, or defined from star imports: plot_utils
plotting/merge_plots.py:117:5: E266 too many leading '#' for block comment
plotting/merge_plots.py:133:5: E266 too many leading '#' for block comment
workflows/root_rewrite.py:28:5: F841 local variable 'f_new' is assigned to but never used
plotting/fill_utils.py:6:1: F401 'boost_histogram as bh' imported but unused
plotting/fill_utils.py:7:1: F401 'hist' imported but unused
plotting/fill_utils.py:24:5: B001 Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer `except Exception:`. If you're sure what you're doing, be explicit and write `except BaseException:`.
plotting/fill_utils.py:38:13: B001 Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer `except Exception:`. If you're sure what you're doing, be explicit and write `except BaseException:`.
plotting/fill_utils.py:48:13: B001 Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer `except Exception:`. If you're sure what you're doing, be explicit and write `except BaseException:`.
plotting/fill_utils.py:96:9: F821 undefined name 'sys'
plotting/fill_utils.py:117:21: F821 undefined name 'abcd'
plotting/fill_utils.py:118:21: F821 undefined name 'abcd'
plotting/fill_utils.py:134:20: F821 undefined name 'weights'
plotting/fill_utils.py:135:22: F821 undefined name 'weights'
plotting/fill_utils.py:183:1: C901 'auto_fill' is too complex (16)
plotting/fill_utils.py:270:25: F821 undefined name 'sys'
plotting/fill_utils.py:306:20: B007 Loop control variable 'config_out' not used within the loop body. If this is intended, start the name with an underscore.
plotting/fill_utils.py:328:24: B007 Loop control variable 'config_out' not used within the loop body. If this is intended, start the name with an underscore.
plotting/fill_utils.py:346:9: F821 undefined name 'sys'
plotting/fill_utils.py:347:13: F821 undefined name 'label_out'
workflows/merger.py:29:5: B001 Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer `except Exception:`. If you're sure what you're doing, be explicit and write `except BaseException:`.
workflows/merger.py:42:9: B007 Loop control variable 'ifile' not used within the loop body. If this is intended, start the name with an underscore.
workflows/merger.py:46:9: E266 too many leading '#' for block comment
workflows/merger.py:51:9: E266 too many leading '#' for block comment
workflows/merger.py:61:9: E266 too many leading '#' for block comment
workflows/merger.py:93:9: B007 Loop control variable 'ifile' not used within the loop body. If this is intended, start the name with an underscore.
isort....................................................................Passed
pyupgrade................................................................Passed
codespell................................................................Passed
check blanket noqa.......................................................Passed
check blanket type ignore................................................Passed
use logger.warning(......................................................Passed
type annotations not comments............................................Passed
rst ``code`` is two backticks........................(no files to check)Skipped
rst directives end with two colons...................(no files to check)Skipped
rst ``inline code`` next to normal text..............(no files to check)Skipped
shellcheck...........................................(no files to check)Skipped
prettier.................................................................Passed