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

@ -456,9 +456,9 @@ def _locate_functions_or_prompt(qualified_names: List[str], *, prompt: bool = Tr
# user to select a 'data provider' like function
try:
mod = importlib.import_module(qualname)
except Exception:
except Exception as ie:
eprint(f"During fallback, importing '{qualname}' as module failed")
raise qr_err
raise qr_err from ie
# find data providers in this module
data_providers = [f for _, f in inspect.getmembers(mod, inspect.isfunction) if is_data_provider(f)]