gootsaud / bike-riding

Exception caught is very general PYL-W0703
Anti-pattern
Major
2 years ago2 years old
Catching too general exception Exception
170    try:
171        len(value)
172        value.__getitem__
173    except Exception:174        return False
175
176    return True
Catching too general exception Exception
305            if isinstance(argument, str):
306                try:
307                    attr = str(argument)
308                except Exception:309                    pass
310                else:
311                    try:
Catching too general exception Exception
117            return native_concat(
118                [n async for n in self.root_render_func(ctx)]  # type: ignore
119            )
120        except Exception:121            return self.environment.handle_exception()
122
123
Catching too general exception Exception
102
103        try:
104            return native_concat(self.root_render_func(ctx))  # type: ignore
105        except Exception:106            return self.environment.handle_exception()
107
108    async def render_async(self, *args: t.Any, **kwargs: t.Any) -> t.Any:
Catching too general exception Exception
 457            if isinstance(argument, str):
 458                try:
 459                    attr = str(argument)
 460                except Exception: 461                    pass
 462                else:
 463                    try: