1
0
forked from drath/libratbag

lint: enable flake8-simplify

This commit is contained in:
Yaroslav Chvanov
2023-03-02 05:01:13 +03:00
parent 27d74ae0f0
commit 40fb7430db
2 changed files with 6 additions and 5 deletions

View File

@@ -21,13 +21,14 @@ select = [
# `Error` suffix on exception names.
"N818",
# flake8-simplify
# Use 'key in dict' instead of 'key in dict.keys()'.
"SIM118",
# Use 'a != b' instead of 'not a == b'.
"SIM201",
"SIM",
]
ignore = [
# Line too long.
# We have some places where it's just impossible to make it fit.
"E501",
# Use 'contextlib.suppress(...)' instead of try-except-pass.
# I think it's better to use integrated language constructs instead
# of libraries.
"SIM105",
]

View File

@@ -168,7 +168,7 @@ class Ratbagd:
v = libratbag.ratbag_log_get_priority(self._ratbag)
if v == libratbag.RATBAG_LOG_PRIORITY_RAW:
return 3
elif v == libratbag.RATBAG_LOG_PRIORITY_DEBUG:
elif v == libratbag.RATBAG_LOG_PRIORITY_DEBUG: # noqa: SIM114
# to match with setter action, we return 1 instead of 2
return 1
elif v == libratbag.RATBAG_LOG_PRIORITY_INFO: