mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
lint: enable flake8-simplify
This commit is contained in:
@@ -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",
|
||||
]
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user