File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6262 pip install -e .
6363 flake8 libensemble
6464
65+ - name : Install mypy
66+ run : pip install mypy
67+
68+ - name : Run mypy (limited scope)
69+ run : mypy
70+
6571 - name : Remove various tests on newer pythons
6672 if : matrix.python-version == 'py311' || matrix.python-version == 'py312' || matrix.python-version == 'py313' || matrix.python-version == 'py314'
6773 run : |
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ def extract_H_ranges(Work: dict) -> str:
1818 else :
1919 # From https://stackoverflow.com/a/30336492
2020 ranges = []
21- for diff , group in groupby (enumerate (work_H_rows .tolist ()), lambda x : x [0 ] - x [1 ]):
22- group = list (map (itemgetter (1 ), group ))
21+ for diff , group_iter in groupby (enumerate (work_H_rows .tolist ()), lambda x : x [0 ] - x [1 ]):
22+ group = list (map (itemgetter (1 ), group_iter ))
2323 if len (group ) > 1 :
2424 ranges .append (str (group [0 ]) + "-" + str (group [- 1 ]))
2525 else :
Original file line number Diff line number Diff line change @@ -258,4 +258,15 @@ inpt = "inpt"
258258extend-exclude = [" *.bib" , " *.xml" , " docs/nitpicky" ]
259259
260260[tool .mypy ]
261+ # Initial, permissive mypy configuration for libensemble.
262+ # Allows incremental adoption. To be tightened in future releases.
263+ packages = [" libensemble.utils" ]
264+ exclude = '''
265+ libensemble/utils/(launcher|loc_stack|runners|pydantic|output_directory)\.py
266+ '''
261267disable_error_code = [" import-not-found" , " import-untyped" ]
268+ ignore_missing_imports = true
269+ follow_imports = " skip"
270+ check_untyped_defs = false
271+ disallow_untyped_defs = false
272+ warn_unused_ignores = false
You can’t perform that action at this time.
0 commit comments