mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +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:
|
||||
ignore: "E501"
|
||||
exclude: "pyerrors/__init__.py"
|
||||
exclude: "pyerrors/input/__init__.py"
|
||||
path: "pyerrors"
|
||||
|
|
|
@ -32,8 +32,10 @@ def read_meson_hd5(path, filestem, ens_id, meson='meson_0', tree='meson'):
|
|||
if not files:
|
||||
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
|
||||
get_cnfg_number = lambda x: int(x[len(filestem) + 1:-3])
|
||||
files.sort(key=get_cnfg_number)
|
||||
|
||||
# Check that configurations are evenly spaced
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue