[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
commit 3eac9214b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 144 additions and 144 deletions

View file

@ -79,7 +79,7 @@ def _dict_to_xmlstring_spaces(d, space=' '):
o += space
o += li + '\n'
if li.startswith('<') and not cm:
if not '<%s' % ('/') in li:
if '<%s' % ('/') not in li:
c += 1
cm = False
return o
@ -671,7 +671,7 @@ def _dobsdict_to_xmlstring_spaces(d, space=' '):
o += space
o += li + '\n'
if li.startswith('<') and not cm:
if not '<%s' % ('/') in li:
if '<%s' % ('/') not in li:
c += 1
cm = False
return o