From 0744d8c30a20450dc4732f37cbff2ce91bdf0b7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oleg=20H=C3=B6fling?= Date: Sun, 13 Jun 2021 14:13:42 +0200 Subject: [PATCH] Add stubs for yaml.error (#5627) * type yaml.error --- stubs/PyYAML/yaml/error.pyi | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/stubs/PyYAML/yaml/error.pyi b/stubs/PyYAML/yaml/error.pyi index e567dd04e..4bb59d35d 100644 --- a/stubs/PyYAML/yaml/error.pyi +++ b/stubs/PyYAML/yaml/error.pyi @@ -1,21 +1,26 @@ -from typing import Any - class Mark: - name: Any - index: Any - line: Any - column: Any - buffer: Any - pointer: Any - def __init__(self, name, index, line, column, buffer, pointer) -> None: ... - def get_snippet(self, indent=..., max_length=...): ... + name: str + index: int + line: int + column: int + buffer: str | None + pointer: int + def __init__(self, name: str, index: int, line: int, column: int, buffer: str | None, pointer: int) -> None: ... + def get_snippet(self, indent: int = ..., max_length: int = ...) -> str | None: ... class YAMLError(Exception): ... class MarkedYAMLError(YAMLError): - context: Any - context_mark: Any - problem: Any - problem_mark: Any - note: Any - def __init__(self, context=..., context_mark=..., problem=..., problem_mark=..., note=...) -> None: ... + context: str | None + context_mark: Mark | None + problem: str | None + problem_mark: Mark | None + note: str | None + def __init__( + self, + context: str | None = ..., + context_mark: Mark | None = ..., + problem: str | None = ..., + problem_mark: Mark | None = ..., + note: str | None = ..., + ) -> None: ...