mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-06-29 16:29:27 +02:00
formatting improvements
This commit is contained in:
parent
ba9ec24944
commit
ff1efd3096
3 changed files with 15 additions and 12 deletions
1
.github/workflows/flake8.yml
vendored
1
.github/workflows/flake8.yml
vendored
|
@ -18,4 +18,5 @@ jobs:
|
||||||
with:
|
with:
|
||||||
ignore: "E501"
|
ignore: "E501"
|
||||||
exclude: "pyerrors/__init__.py"
|
exclude: "pyerrors/__init__.py"
|
||||||
|
exclude: "pyerrors/input/__init__.py"
|
||||||
path: "pyerrors"
|
path: "pyerrors"
|
||||||
|
|
|
@ -32,8 +32,10 @@ def read_meson_hd5(path, filestem, ens_id, meson='meson_0', tree='meson'):
|
||||||
if not files:
|
if not files:
|
||||||
raise Exception('No files starting with', filestem, 'in folder', path)
|
raise Exception('No files starting with', filestem, 'in folder', path)
|
||||||
|
|
||||||
|
def get_cnfg_number(n):
|
||||||
|
return int(n[len(filestem) + 1:-3])
|
||||||
|
|
||||||
# Sort according to configuration number
|
# Sort according to configuration number
|
||||||
get_cnfg_number = lambda x: int(x[len(filestem) + 1:-3])
|
|
||||||
files.sort(key=get_cnfg_number)
|
files.sort(key=get_cnfg_number)
|
||||||
|
|
||||||
# Check that configurations are evenly spaced
|
# Check that configurations are evenly spaced
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue