Exemplo n.º 1
0
async def _fail_or_warn_if_invalid_path(ctx: wire.Context, schema: PathSchema,
                                        path: List[int],
                                        path_name: str) -> None:
    if not schema.match(path):
        if safety_checks.is_strict():
            raise wire.DataError("Invalid %s" % path_name.lower())
        else:
            await show_warning_path(ctx, path, path_name)
Exemplo n.º 2
0
async def _fail_or_warn_if_invalid_path(ctx: wire.Context, schema: PathSchema,
                                        path: list[int],
                                        path_name: str) -> None:
    if not schema.match(path):
        await _fail_or_warn_path(ctx, path, path_name)
Exemplo n.º 3
0
 async def _fail_or_warn_if_invalid_path(self, schema: PathSchema,
                                         path: list[int],
                                         path_name: str) -> None:
     if not schema.match(path):
         await self._fail_or_warn_path(path, path_name)