Enable more SIM ruff rules (#113015)

* SIM101 SIM103

* SIM107 SIM109

* SIM110

* SIM112 SIM113

* SIM115

* SIM116

* Fix

* Fix

* Fix
This commit is contained in:
Joost Lekkerkerker 2024-03-11 04:20:37 +01:00 committed by GitHub
parent e96ef4613c
commit cddce0ce0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 41 additions and 70 deletions

View file

@ -70,10 +70,7 @@ IGNORE_SUFFIXES = [
def contains_ignored_suffix(unique_id: str) -> bool:
"""Return true if the unique_id ends with an ignored suffix."""
for suffix in IGNORE_SUFFIXES:
if suffix.lower() in unique_id.lower():
return True
return False
return any(suffix.lower() in unique_id.lower() for suffix in IGNORE_SUFFIXES)
@patch(