Skip to content

types-PyYAML 6.0.12.20250915

Version history | Download JSON

  • PyPI https://pypi.org/project/types-PyYAML/
    Repository https://github.com/python/typeshed

  • py.typed
    stubs-only typeshed

  • Coverage


    %%{init: {"pie": {"textPosition": 0.85}, "theme": "neutral", "themeVariables": {"pieStrokeWidth": "1px"}}}%%
    pie title
        "Typed" : 568
        "Any" : 143
        "Untyped" : 416
    • 63.1% coverage
    • 50.4% coverage (strict)
    • 1127 typable
      • 568 typed
      • 416 untyped
      • 143 Any
  • Typables


    %%{init: {"pie": {"textPosition": 0.85}, "theme": "neutral", "themeVariables": {"pieStrokeWidth": "1px"}}}%%
    pie title
        "functions" : 163
        "classes" : 764
        "other" : 2
    • 26 functions (+16 overloads)
      • 137 parameters
    • 84 classes
      • 326 methods (+0 overloads)
        • 438 parameters
      • 0 properties
    • 17 modules
      • 2 attrs

Modules

Module Coverage Coverage (strict) Typables Ignores
PyYAML 84.4% 78.8% 179 0
PyYAML.composer 100.0% 100.0% 15 0
PyYAML.constructor 33.5% 28.5% 179 4
PyYAML.cyaml 80.0% 80.0% 40 0
PyYAML.dumper 100.0% 100.0% 45 0
PyYAML.emitter 99.2% 99.2% 130 0
PyYAML.error 100.0% 100.0% 27 0
PyYAML.events 55.4% 10.8% 65 0
PyYAML.loader 100.0% 100.0% 10 0
PyYAML.nodes 88.5% 84.6% 26 0
PyYAML.parser 18.2% 2.3% 44 0
PyYAML.reader 52.5% 10.0% 40 0
PyYAML.representer 87.5% 87.5% 80 0
PyYAML.resolver 26.7% 3.3% 30 0
PyYAML.scanner 9.5% 0.9% 116 0
PyYAML.serializer 53.6% 17.9% 28 0
PyYAML.tokens 68.5% 9.6% 73 0

Incomplete Annotations

PyYAML (28 missing, 10 any)

Symbol Typable Typed Any
func yaml.serialize_all 14 12 0
func yaml.scan 3 1 0
func yaml.compose_all 3 1 0
func yaml.dump_all 17 16 0
meth YAMLObjectMetaclass.init 4 1 0
func yaml.load 3 3 1
func yaml.full_load 2 2 1
func yaml.emit 9 6 0
func yaml.warnings 2 0 0
func yaml.serialize 14 12 0
func yaml.compose 3 1 0
meth YAMLObject.from_yaml 3 0 0
meth YAMLObject.to_yaml 3 0 0
attr YAMLObject.yaml_loader 1 1 1
attr YAMLObject.yaml_dumper 1 1 1
attr YAMLObject.yaml_tag 1 1 1
attr YAMLObject.yaml_flow_style 1 1 1
func yaml.safe_dump 16 16 1
func yaml.safe_load 2 2 1
func yaml.parse 3 1 0
func yaml.unsafe_load 2 2 1
func yaml.dump 17 16 1

PyYAML.constructor (119 missing, 9 any)

Symbol Typable Typed Any
meth FullConstructor.construct_python_str 2 0 0
meth FullConstructor.construct_python_unicode 2 0 0
meth FullConstructor.construct_python_bytes 2 0 0
meth FullConstructor.construct_python_long 2 0 0
meth FullConstructor.construct_python_complex 2 0 0
meth FullConstructor.construct_python_tuple 2 0 0
meth FullConstructor.find_python_module 4 2 0
meth FullConstructor.find_python_name 4 2 0
meth FullConstructor.construct_python_name 3 0 0
meth FullConstructor.construct_python_module 3 0 0
meth FullConstructor.make_python_instance 7 2 0
meth FullConstructor.set_python_instance_state 4 3 1
meth FullConstructor.construct_python_object 3 0 0
meth FullConstructor.construct_python_object_apply 4 0 0
meth FullConstructor.construct_python_object_new 3 0 0
meth BaseConstructor.check_data 1 0 0
meth BaseConstructor.get_data 1 0 0
meth BaseConstructor.get_single_data 1 1 1
meth BaseConstructor.construct_document 2 0 0
meth BaseConstructor.construct_object 3 0 0
meth BaseConstructor.construct_pairs 3 0 0
meth BaseConstructor.add_multi_constructor 3 0 0
attr BaseConstructor.yaml_constructors 1 1 1
attr BaseConstructor.yaml_multi_constructors 1 1 1
attr BaseConstructor.constructed_objects 1 1 1
attr BaseConstructor.recursive_objects 1 1 1
attr BaseConstructor.state_generators 1 1 1
attr BaseConstructor.deep_construct 1 1 1
meth UnsafeConstructor.find_python_module 3 1 0
meth UnsafeConstructor.find_python_name 3 1 0
meth UnsafeConstructor.make_python_instance 6 2 0
meth UnsafeConstructor.set_python_instance_state 3 1 1
meth SafeConstructor.construct_yaml_omap 2 0 0
meth SafeConstructor.construct_yaml_pairs 2 0 0
meth SafeConstructor.construct_yaml_set 2 0 0
meth SafeConstructor.construct_yaml_str 2 0 0
meth SafeConstructor.construct_yaml_seq 2 0 0
meth SafeConstructor.construct_yaml_map 2 0 0
meth SafeConstructor.construct_yaml_object 3 0 0
meth SafeConstructor.construct_undefined 2 0 0
meth Constructor.construct_python_str 2 0 0
meth Constructor.construct_python_unicode 2 0 0
meth Constructor.construct_python_long 2 0 0
meth Constructor.construct_python_complex 2 0 0
meth Constructor.construct_python_tuple 2 0 0
meth Constructor.find_python_module 3 0 0
meth Constructor.find_python_name 3 0 0
meth Constructor.construct_python_name 3 0 0
meth Constructor.construct_python_module 3 0 0
meth Constructor.make_python_instance 6 0 0
meth Constructor.set_python_instance_state 3 0 0
meth Constructor.construct_python_object 3 0 0
meth Constructor.construct_python_object_apply 4 0 0
meth Constructor.construct_python_object_new 3 0 0

PyYAML.cyaml (8 missing, 0 any)

Symbol Typable Typed Any
meth CBaseDumper.init 15 11 0
meth CDumper.init 15 11 0

PyYAML.emitter (1 missing, 0 any)

Symbol Typable Typed Any
meth Emitter.prepare_version 2 1 0

PyYAML.events (29 missing, 29 any)

Symbol Typable Typed Any
meth ScalarEvent.init 8 1 0
attr ScalarEvent.anchor 1 1 1
attr ScalarEvent.tag 1 1 1
attr ScalarEvent.implicit 1 1 1
attr ScalarEvent.value 1 1 1
attr ScalarEvent.start_mark 1 1 1
attr ScalarEvent.end_mark 1 1 1
attr ScalarEvent.style 1 1 1
meth CollectionStartEvent.init 7 1 0
attr CollectionStartEvent.anchor 1 1 1
attr CollectionStartEvent.tag 1 1 1
attr CollectionStartEvent.implicit 1 1 1
attr CollectionStartEvent.start_mark 1 1 1
attr CollectionStartEvent.end_mark 1 1 1
attr CollectionStartEvent.flow_style 1 1 1
meth StreamStartEvent.init 4 1 0
attr StreamStartEvent.start_mark 1 1 1
attr StreamStartEvent.end_mark 1 1 1
attr StreamStartEvent.encoding 1 1 1
meth NodeEvent.init 4 1 0
attr NodeEvent.anchor 1 1 1
attr NodeEvent.start_mark 1 1 1
attr NodeEvent.end_mark 1 1 1
meth DocumentStartEvent.init 6 1 0
attr DocumentStartEvent.start_mark 1 1 1
attr DocumentStartEvent.end_mark 1 1 1
attr DocumentStartEvent.explicit 1 1 1
attr DocumentStartEvent.version 1 1 1
attr DocumentStartEvent.tags 1 1 1
meth DocumentEndEvent.init 4 1 0
attr DocumentEndEvent.start_mark 1 1 1
attr DocumentEndEvent.end_mark 1 1 1
attr DocumentEndEvent.explicit 1 1 1
meth Event.init 3 1 0
attr Event.start_mark 1 1 1
attr Event.end_mark 1 1 1

PyYAML.nodes (3 missing, 1 any)

Symbol Typable Typed Any
meth ScalarNode.init 6 5 0
meth CollectionNode.init 6 5 0
meth Node.init 5 4 0
attr Node.value 1 1 1

PyYAML.parser (36 missing, 7 any)

Symbol Typable Typed Any
meth Parser.dispose 1 0 0
meth Parser.check_event 2 0 0
meth Parser.peek_event 1 0 0
meth Parser.get_event 1 0 0
meth Parser.parse_stream_start 1 0 0
meth Parser.parse_implicit_document_start 1 0 0
meth Parser.parse_document_start 1 0 0
meth Parser.parse_document_end 1 0 0
meth Parser.parse_document_content 1 0 0
meth Parser.process_directives 1 0 0
meth Parser.parse_block_node 1 0 0
meth Parser.parse_flow_node 1 0 0
meth Parser.parse_block_node_or_indentless_sequence 1 0 0
meth Parser.parse_node 3 0 0
meth Parser.parse_block_sequence_first_entry 1 0 0
meth Parser.parse_block_sequence_entry 1 0 0
meth Parser.parse_indentless_sequence_entry 1 0 0
meth Parser.parse_block_mapping_first_key 1 0 0
meth Parser.parse_block_mapping_key 1 0 0
meth Parser.parse_block_mapping_value 1 0 0
meth Parser.parse_flow_sequence_first_entry 1 0 0
meth Parser.parse_flow_sequence_entry 2 0 0
meth Parser.parse_flow_sequence_entry_mapping_key 1 0 0
meth Parser.parse_flow_sequence_entry_mapping_value 1 0 0
meth Parser.parse_flow_sequence_entry_mapping_end 1 0 0
meth Parser.parse_flow_mapping_first_key 1 0 0
meth Parser.parse_flow_mapping_key 2 0 0
meth Parser.parse_flow_mapping_value 1 0 0
meth Parser.parse_flow_mapping_empty_value 1 0 0
meth Parser.process_empty_scalar 2 0 0
attr Parser.DEFAULT_TAGS 1 1 1
attr Parser.current_event 1 1 1
attr Parser.yaml_version 1 1 1
attr Parser.tag_handles 1 1 1
attr Parser.states 1 1 1
attr Parser.marks 1 1 1
attr Parser.state 1 1 1

PyYAML.reader (19 missing, 17 any)

Symbol Typable Typed Any
meth ReaderError.init 6 1 0
attr ReaderError.name 1 1 1
attr ReaderError.character 1 1 1
attr ReaderError.position 1 1 1
attr ReaderError.encoding 1 1 1
attr ReaderError.reason 1 1 1
meth Reader.peek 2 0 0
meth Reader.prefix 2 0 0
meth Reader.forward 2 0 0
meth Reader.get_mark 1 0 0
meth Reader.determine_encoding 1 0 0
meth Reader.check_printable 2 0 0
meth Reader.update 2 0 0
meth Reader.update_raw 2 0 0
attr Reader.name 1 1 1
attr Reader.stream_pointer 1 1 1
attr Reader.eof 1 1 1
attr Reader.buffer 1 1 1
attr Reader.pointer 1 1 1
attr Reader.raw_buffer 1 1 1
attr Reader.raw_decode 1 1 1
attr Reader.encoding 1 1 1
attr Reader.index 1 1 1
attr Reader.line 1 1 1
attr Reader.column 1 1 1
attr Reader.NON_PRINTABLE 1 1 1

PyYAML.representer (10 missing, 0 any)

Symbol Typable Typed Any
meth Representer.represent_object 2 1 0
meth BaseRepresenter.represent 2 1 0
meth BaseRepresenter.represent_data 2 1 0
meth BaseRepresenter.represent_scalar 4 3 0
meth BaseRepresenter.ignore_aliases 2 1 0
meth SafeRepresenter.ignore_aliases 2 1 0
meth SafeRepresenter.represent_none 2 1 0
meth SafeRepresenter.represent_yaml_object 5 3 0
meth SafeRepresenter.represent_undefined 2 1 0

PyYAML.resolver (22 missing, 7 any)

Symbol Typable Typed Any
meth BaseResolver.add_implicit_resolver 4 0 0
meth BaseResolver.add_path_resolver 4 0 0
meth BaseResolver.descend_resolver 3 0 0
meth BaseResolver.ascend_resolver 1 0 0
meth BaseResolver.check_resolver_prefix 6 0 0
meth BaseResolver.resolve 4 0 0
attr BaseResolver.DEFAULT_SCALAR_TAG 1 1 1
attr BaseResolver.DEFAULT_SEQUENCE_TAG 1 1 1
attr BaseResolver.DEFAULT_MAPPING_TAG 1 1 1
attr BaseResolver.yaml_implicit_resolvers 1 1 1
attr BaseResolver.yaml_path_resolvers 1 1 1
attr BaseResolver.resolver_exact_paths 1 1 1
attr BaseResolver.resolver_prefix_paths 1 1 1

PyYAML.scanner (105 missing, 10 any)

Symbol Typable Typed Any
meth Scanner.check_token 2 0 0
meth Scanner.peek_token 1 0 0
meth Scanner.get_token 1 0 0
meth Scanner.need_more_tokens 1 0 0
meth Scanner.fetch_more_tokens 1 0 0
meth Scanner.next_possible_simple_key 1 0 0
meth Scanner.stale_possible_simple_keys 1 0 0
meth Scanner.save_possible_simple_key 1 0 0
meth Scanner.remove_possible_simple_key 1 0 0
meth Scanner.unwind_indent 2 0 0
meth Scanner.add_indent 2 0 0
meth Scanner.fetch_stream_start 1 0 0
meth Scanner.fetch_stream_end 1 0 0
meth Scanner.fetch_directive 1 0 0
meth Scanner.fetch_document_start 1 0 0
meth Scanner.fetch_document_end 1 0 0
meth Scanner.fetch_document_indicator 2 0 0
meth Scanner.fetch_flow_sequence_start 1 0 0
meth Scanner.fetch_flow_mapping_start 1 0 0
meth Scanner.fetch_flow_collection_start 2 0 0
meth Scanner.fetch_flow_sequence_end 1 0 0
meth Scanner.fetch_flow_mapping_end 1 0 0
meth Scanner.fetch_flow_collection_end 2 0 0
meth Scanner.fetch_flow_entry 1 0 0
meth Scanner.fetch_block_entry 1 0 0
meth Scanner.fetch_key 1 0 0
meth Scanner.fetch_value 1 0 0
meth Scanner.fetch_alias 1 0 0
meth Scanner.fetch_anchor 1 0 0
meth Scanner.fetch_tag 1 0 0
meth Scanner.fetch_literal 1 0 0
meth Scanner.fetch_folded 1 0 0
meth Scanner.fetch_block_scalar 2 0 0
meth Scanner.fetch_single 1 0 0
meth Scanner.fetch_double 1 0 0
meth Scanner.fetch_flow_scalar 2 0 0
meth Scanner.fetch_plain 1 0 0
meth Scanner.check_directive 1 0 0
meth Scanner.check_document_start 1 0 0
meth Scanner.check_document_end 1 0 0
meth Scanner.check_block_entry 1 0 0
meth Scanner.check_key 1 0 0
meth Scanner.check_value 1 0 0
meth Scanner.check_plain 1 0 0
meth Scanner.scan_to_next_token 1 0 0
meth Scanner.scan_directive 1 0 0
meth Scanner.scan_directive_name 2 0 0
meth Scanner.scan_yaml_directive_value 2 0 0
meth Scanner.scan_yaml_directive_number 2 0 0
meth Scanner.scan_tag_directive_value 2 0 0
meth Scanner.scan_tag_directive_handle 2 0 0
meth Scanner.scan_tag_directive_prefix 2 0 0
meth Scanner.scan_directive_ignored_line 2 0 0
meth Scanner.scan_anchor 2 0 0
meth Scanner.scan_tag 1 0 0
meth Scanner.scan_block_scalar 2 0 0
meth Scanner.scan_block_scalar_indicators 2 0 0
meth Scanner.scan_block_scalar_ignored_line 2 0 0
meth Scanner.scan_block_scalar_indentation 1 0 0
meth Scanner.scan_block_scalar_breaks 2 0 0
meth Scanner.scan_flow_scalar 2 0 0
meth Scanner.scan_flow_scalar_non_spaces 3 0 0
meth Scanner.scan_flow_scalar_spaces 3 0 0
meth Scanner.scan_flow_scalar_breaks 3 0 0
meth Scanner.scan_plain 1 0 0
meth Scanner.scan_plain_spaces 3 0 0
meth Scanner.scan_tag_handle 3 0 0
meth Scanner.scan_tag_uri 3 0 0
meth Scanner.scan_uri_escapes 3 0 0
meth Scanner.scan_line_break 1 0 0
attr Scanner.done 1 1 1
attr Scanner.flow_level 1 1 1
attr Scanner.tokens 1 1 1
attr Scanner.tokens_taken 1 1 1
attr Scanner.indent 1 1 1
attr Scanner.indents 1 1 1
attr Scanner.allow_simple_key 1 1 1
attr Scanner.possible_simple_keys 1 1 1
attr Scanner.ESCAPE_REPLACEMENTS 1 1 1
attr Scanner.ESCAPE_CODES 1 1 1

PyYAML.serializer (13 missing, 10 any)

Symbol Typable Typed Any
meth Serializer.init 6 1 0
meth Serializer.anchor_node 2 0 0
meth Serializer.generate_anchor 2 0 0
meth Serializer.serialize_node 4 0 0
attr Serializer.ANCHOR_TEMPLATE 1 1 1
attr Serializer.use_encoding 1 1 1
attr Serializer.use_explicit_start 1 1 1
attr Serializer.use_explicit_end 1 1 1
attr Serializer.use_version 1 1 1
attr Serializer.use_tags 1 1 1
attr Serializer.serialized_nodes 1 1 1
attr Serializer.anchors 1 1 1
attr Serializer.last_anchor_id 1 1 1
attr Serializer.closed 1 1 1

PyYAML.tokens (23 missing, 43 any)

Symbol Typable Typed Any
attr FlowMappingStartToken.id 1 1 1
meth TagToken.init 4 1 0
attr TagToken.id 1 1 1
attr TagToken.value 1 1 1
attr TagToken.start_mark 1 1 1
attr TagToken.end_mark 1 1 1
attr BlockMappingStartToken.id 1 1 1
meth Token.init 3 1 0
attr Token.start_mark 1 1 1
attr Token.end_mark 1 1 1
attr KeyToken.id 1 1 1
attr FlowSequenceEndToken.id 1 1 1
meth AliasToken.init 4 1 0
attr AliasToken.id 1 1 1
attr AliasToken.value 1 1 1
attr AliasToken.start_mark 1 1 1
attr AliasToken.end_mark 1 1 1
attr FlowSequenceStartToken.id 1 1 1
attr BlockEntryToken.id 1 1 1
attr FlowEntryToken.id 1 1 1
attr DocumentStartToken.id 1 1 1
attr ValueToken.id 1 1 1
attr DocumentEndToken.id 1 1 1
attr StreamEndToken.id 1 1 1
attr BlockEndToken.id 1 1 1
meth StreamStartToken.init 4 1 0
attr StreamStartToken.id 1 1 1
attr StreamStartToken.start_mark 1 1 1
attr StreamStartToken.end_mark 1 1 1
attr StreamStartToken.encoding 1 1 1
meth DirectiveToken.init 5 1 0
attr DirectiveToken.id 1 1 1
attr DirectiveToken.name 1 1 1
attr DirectiveToken.value 1 1 1
attr DirectiveToken.start_mark 1 1 1
attr DirectiveToken.end_mark 1 1 1
meth AnchorToken.init 4 1 0
attr AnchorToken.id 1 1 1
attr AnchorToken.value 1 1 1
attr AnchorToken.start_mark 1 1 1
attr AnchorToken.end_mark 1 1 1
meth ScalarToken.init 6 1 0
attr ScalarToken.id 1 1 1
attr ScalarToken.value 1 1 1
attr ScalarToken.plain 1 1 1
attr ScalarToken.start_mark 1 1 1
attr ScalarToken.end_mark 1 1 1
attr ScalarToken.style 1 1 1
attr BlockSequenceStartToken.id 1 1 1
attr FlowMappingEndToken.id 1 1 1

Type-Ignore Comments

Flavor Count
type: ignore[override] 4