[Fix] Ruff rules and more precise Excpetion types (#248)

* [Fix] Fix test for membership should be 'not in' (E713)

* [Fix] Fix module imported but unused (F401)

* [Fix] More precise Exception types in dirac, obs and correlator
This commit is contained in:
Fabian Joswig 2024-12-24 15:35:59 +01:00 committed by GitHub
parent d908508120
commit 3eac9214b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 143 additions and 143 deletions

View file

@ -47,7 +47,7 @@ def read_rwms(path, prefix, version='2.0', names=None, **kwargs):
Reweighting factors read
"""
known_oqcd_versions = ['1.4', '1.6', '2.0']
if not (version in known_oqcd_versions):
if version not in known_oqcd_versions:
raise Exception('Unknown openQCD version defined!')
print("Working with openQCD version " + version)
if 'postfix' in kwargs: