ruff: enable B warnings (mainly suppressed exceptions and unused variables)

This commit is contained in:
Dima Gerasimov 2024-08-28 01:13:18 +01:00 committed by karlicoss
parent d0df8e8f2d
commit 72cc8ff3ac
30 changed files with 83 additions and 67 deletions

View file

@ -2,7 +2,6 @@ from .internal import assert_subpackage; assert_subpackage(__name__)
import logging
import sys
import warnings
from contextlib import contextmanager
from pathlib import Path
from typing import (
@ -20,6 +19,9 @@ from typing import (
import appdirs # type: ignore[import-untyped]
from . import warnings
PathIsh = Union[str, Path] # avoid circular import from .common
@ -116,7 +118,7 @@ def _mcachew_impl(cache_path=_cache_path_dflt, **kwargs):
try:
import cachew
except ModuleNotFoundError:
warnings.warn('cachew library not found. You might want to install it to speed things up. See https://github.com/karlicoss/cachew')
warnings.high('cachew library not found. You might want to install it to speed things up. See https://github.com/karlicoss/cachew')
return lambda orig_func: orig_func
else:
kwargs['cache_path'] = cache_path