Fix B082 (no explicit stacklevel for warnings)

Signed-off-by: Aarni Koskela <akx@iki.fi>
This commit is contained in:
Aarni Koskela 2023-05-11 16:20:27 +03:00
parent 09f12f2046
commit cc76c9c20d
2 changed files with 4 additions and 2 deletions

View File

@ -20,7 +20,8 @@ class Store:
self.environment = environment self.environment = environment
if self.exe is None: if self.exe is None:
warnings.warn( warnings.warn(
f'{self.program} not installed or not available in PATH' f'{self.program} not installed or not available in PATH',
stacklevel=1,
) )
def get(self, server): def get(self, server):

View File

@ -456,7 +456,8 @@ class ImageCollection(Collection):
if 'stream' in kwargs: if 'stream' in kwargs:
warnings.warn( warnings.warn(
'`stream` is not a valid parameter for this method' '`stream` is not a valid parameter for this method'
' and will be overridden' ' and will be overridden',
stacklevel=1,
) )
del kwargs['stream'] del kwargs['stream']