1
0
forked from drath/libratbag

tools: remove unnecessary pass statements

This commit is contained in:
Yaroslav Chvanov
2023-03-02 04:08:53 +03:00
parent ef2049643c
commit 7551bdaeff
3 changed files with 3 additions and 30 deletions

View File

@@ -15,6 +15,9 @@ select = [
# flake8-bugbear
# Find obvious bugs.
"B",
# flake8-pie
# Unnecessary `pass` statement.
"PIE790",
]
ignore = [
# Line too long.

View File

@@ -102,44 +102,30 @@ class RatbagDeviceType(IntEnum):
class RatbagdUnavailable(Exception):
"""Signals DBus is unavailable or the ratbagd daemon is not available."""
pass
class RatbagError(Exception):
"""A common base exception to catch any ratbag exception."""
pass
class RatbagErrorDevice(RatbagError):
"""An exception corresponding to RatbagErrorCode.DEVICE."""
pass
class RatbagErrorCapability(RatbagError):
"""An exception corresponding to RatbagErrorCode.CAPABILITY."""
pass
class RatbagErrorValue(RatbagError):
"""An exception corresponding to RatbagErrorCode.VALUE."""
pass
class RatbagErrorSystem(RatbagError):
"""An exception corresponding to RatbagErrorCode.SYSTEM."""
pass
class RatbagErrorImplementation(RatbagError):
"""An exception corresponding to RatbagErrorCode.IMPLEMENTATION."""
pass
"""A table mapping RatbagErrorCode values to RatbagError* exceptions."""
EXCEPTION_TABLE = {

View File

@@ -94,50 +94,34 @@ class RatbagdIncompatible(Exception):
class RatbagdUnavailable(Exception):
"""Signals DBus is unavailable or the ratbagd daemon is not available."""
pass
class RatbagdDBusTimeout(Exception):
"""Signals that a timeout occurred during a DBus method call."""
pass
class RatbagError(Exception):
"""A common base exception to catch any ratbag exception."""
pass
class RatbagErrorDevice(RatbagError):
"""An exception corresponding to RatbagErrorCode.DEVICE."""
pass
class RatbagErrorCapability(RatbagError):
"""An exception corresponding to RatbagErrorCode.CAPABILITY."""
pass
class RatbagErrorValue(RatbagError):
"""An exception corresponding to RatbagErrorCode.VALUE."""
pass
class RatbagErrorSystem(RatbagError):
"""An exception corresponding to RatbagErrorCode.SYSTEM."""
pass
class RatbagErrorImplementation(RatbagError):
"""An exception corresponding to RatbagErrorCode.IMPLEMENTATION."""
pass
"""A table mapping RatbagErrorCode values to RatbagError* exceptions."""
EXCEPTION_TABLE = {