mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 13:51:30 +08:00
Add C{Full,Unsafe}Loader and UnsafeConstructor (#5988)
This commit is contained in:
@@ -70,6 +70,12 @@ class FullConstructor(SafeConstructor):
|
||||
def construct_python_object_apply(self, suffix, node, newobj=...): ...
|
||||
def construct_python_object_new(self, suffix, node): ...
|
||||
|
||||
class UnsafeConstructor(FullConstructor):
|
||||
def find_python_module(self, name, mark): ...
|
||||
def find_python_name(self, name, mark): ...
|
||||
def make_python_instance(self, suffix, node, args=..., kwds=..., newobj=...): ...
|
||||
def set_python_instance_state(self, instance, state): ...
|
||||
|
||||
class Constructor(SafeConstructor):
|
||||
def construct_python_str(self, node): ...
|
||||
def construct_python_unicode(self, node): ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import SupportsRead
|
||||
from typing import IO, Any, Mapping, Sequence, Text, Union
|
||||
|
||||
from yaml.constructor import BaseConstructor, Constructor, SafeConstructor
|
||||
from yaml.constructor import BaseConstructor, Constructor, FullConstructor, SafeConstructor, UnsafeConstructor
|
||||
from yaml.events import Event
|
||||
from yaml.nodes import Node
|
||||
from yaml.representer import BaseRepresenter, Representer, SafeRepresenter
|
||||
@@ -33,6 +33,12 @@ class CLoader(CParser, SafeConstructor, Resolver):
|
||||
class CSafeLoader(CParser, SafeConstructor, Resolver):
|
||||
def __init__(self, stream: str | bytes | _Readable) -> None: ...
|
||||
|
||||
class CFullLoader(CParser, FullConstructor, Resolver):
|
||||
def __init__(self, stream: str | bytes | _Readable) -> None: ...
|
||||
|
||||
class CUnsafeLoader(CParser, UnsafeConstructor, Resolver):
|
||||
def __init__(self, stream: str | bytes | _Readable) -> None: ...
|
||||
|
||||
class CDangerLoader(CParser, Constructor, Resolver): ... # undocumented
|
||||
|
||||
class CEmitter(object):
|
||||
|
||||
Reference in New Issue
Block a user