screen_brightness_control.exceptions

 1import subprocess
 2
 3
 4def format_exc(e: Exception) -> str:
 5    return f'{type(e).__name__}: {e}'
 6
 7
 8class ScreenBrightnessError(Exception):
 9    '''
10    Generic error class designed to make catching errors under one umbrella easy.
11    '''
12    ...
13
14
15class EDIDParseError(ScreenBrightnessError):
16    ...
17
18
19class NoValidDisplayError(ScreenBrightnessError, LookupError):
20    ...
21
22
23class I2CValidationError(ScreenBrightnessError):
24    ...
25
26
27class MaxRetriesExceededError(ScreenBrightnessError, subprocess.CalledProcessError):
28    ...

def format_exc(e: Exception) -> str:
5def format_exc(e: Exception) -> str:
6    return f'{type(e).__name__}: {e}'
class ScreenBrightnessError(builtins.Exception):
 9class ScreenBrightnessError(Exception):
10    '''
11    Generic error class designed to make catching errors under one umbrella easy.
12    '''
13    ...

Generic error class designed to make catching errors under one umbrella easy.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
class EDIDParseError(ScreenBrightnessError):
16class EDIDParseError(ScreenBrightnessError):
17    ...

Generic error class designed to make catching errors under one umbrella easy.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
class NoValidDisplayError(ScreenBrightnessError, builtins.LookupError):
20class NoValidDisplayError(ScreenBrightnessError, LookupError):
21    ...

Generic error class designed to make catching errors under one umbrella easy.

Inherited Members
builtins.LookupError
LookupError
builtins.BaseException
with_traceback
class I2CValidationError(ScreenBrightnessError):
24class I2CValidationError(ScreenBrightnessError):
25    ...

Generic error class designed to make catching errors under one umbrella easy.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
class MaxRetriesExceededError(ScreenBrightnessError, subprocess.CalledProcessError):
28class MaxRetriesExceededError(ScreenBrightnessError, subprocess.CalledProcessError):
29    ...

Generic error class designed to make catching errors under one umbrella easy.

Inherited Members
subprocess.CalledProcessError
CalledProcessError
stdout
builtins.BaseException
with_traceback