MCPcopy Create free account

hub / github.com/marin-community/draccus / functions

Functions407 in github.com/marin-community/draccus

Methodhelp
(self)
draccus/wrappers/field_wrapper.py:273
Functioninclude_constructor
(loader, node)
draccus/parsers/yaml_loader.py:12
Functionis_bool
(t: Type)
draccus/utils.py:184
Methodis_bool
(self)
draccus/wrappers/field_wrapper.py:308
Functionis_generic_type
(cls: Type[Any])
draccus/parsers/decoding.py:121
Functionis_homogeneous_tuple_type
(t: Type[Tuple])
draccus/utils.py:213
Methodis_literal
Returns True if the field's type is a Literal type.
draccus/wrappers/field_wrapper.py:320
Methodis_optional
(self)
draccus/wrappers/field_wrapper.py:312
Functionis_optional_or_union_with_dataclass_type_arg
(t: Type)
draccus/utils.py:257
Methoditer_namespace
(ns_pkg)
draccus/choice_types.py:200
Functionkeep_keys
(d: Dict, keys_to_keep: Iterable[str])
draccus/utils.py:318
Functionload
Load a config from a file path, file object, or string. Args: t: The dataclass type to load into stream: Either a file path,
draccus/cfgparsing.py:82
Methodload_config
(stream)
draccus/parsers/config_parsers.py:46
Methodload_config
(stream)
draccus/parsers/config_parsers.py:71
Methodload_config
(stream)
draccus/parsers/config_parsers.py:97
Functionloads
Load a config from a string. Args: t: The dataclass type to load into s: The string containing the configuration Return
draccus/cfgparsing.py:108
Functionlogs_warning
(caplog)
tests/conftest.py:93
Methodname
(self)
draccus/wrappers/wrapper.py:51
Methodname
(self)
draccus/wrappers/dataclass_wrapper.py:87
Methodname
(self)
draccus/wrappers/field_wrapper.py:292
Methodname
(self)
draccus/wrappers/choice_wrapper.py:124
Methodname
(self)
draccus/wrappers/choice_wrapper.py:161
Methodnargs
(self)
draccus/wrappers/field_wrapper.py:202
Methodnesting_level
(self)
draccus/wrappers/wrapper.py:40
Functionno_op
Decoding function that gives back the value as-is.
draccus/parsers/decoding.py:496
Functionno_stdout
Asserts that no output was produced on stdout. Args: capsys (pytest.fixture): The capsys fixture
tests/conftest.py:59
Functionno_warnings
(caplog)
tests/conftest.py:75
Methodoption_strings
Generates the `option_strings` argument to the `add_argument` call. `parser.add_argument(*name_or_flags, **arg_options)` ## Notes:
draccus/wrappers/field_wrapper.py:172
Methodparent
(self)
draccus/wrappers/wrapper.py:56
Methodparent
(self)
draccus/wrappers/dataclass_wrapper.py:92
Methodparent
(self)
draccus/wrappers/field_wrapper.py:329
Methodparent
(self)
draccus/wrappers/choice_wrapper.py:48
Methodparent
(self)
draccus/wrappers/choice_wrapper.py:190
Functionparse_string
Parse a string into a dictionary using the current config type parser. Args: s: The string to parse Returns: A dictiona
draccus/cfgparsing.py:15
Methodparse_string
(s)
draccus/parsers/config_parsers.py:34
Methodparse_string
(s)
draccus/parsers/config_parsers.py:62
Methodparse_string
(s)
draccus/parsers/config_parsers.py:88
Methodprint_help
(self, file=None)
draccus/argparsing.py:148
Functionraises_expected_n_args
(n: int)
tests/testutils.py:58
Functionraises_missing_required_arg
()
tests/testutils.py:52
Functionraises_unrecognized_args
(*args: str)
tests/testutils.py:64
Functionregister
(cls, func=None, include_subclasses=False)
draccus/parsers/registry_utils.py:54
Methodregister_actions
(self, parser: argparse.ArgumentParser)
draccus/wrappers/dataclass_wrapper.py:70
Methodregister_actions
(self, parser: argparse.ArgumentParser)
draccus/wrappers/choice_wrapper.py:63
Functionremove_matching
(dict_a, dict_b)
draccus/utils.py:351
Methodrequired
(self)
draccus/wrappers/wrapper.py:61
Methodrequired
(self)
draccus/wrappers/dataclass_wrapper.py:149
Methodrequired
(self)
draccus/wrappers/field_wrapper.py:232
Methodrequired
(self)
draccus/wrappers/choice_wrapper.py:114
Methodrequired
(self)
draccus/wrappers/choice_wrapper.py:165
Methodsave_config
(d, stream=None, **kwargs)
draccus/parsers/config_parsers.py:54
Methodsave_config
(d, stream=None, **kwargs)
draccus/parsers/config_parsers.py:77
Methodsave_config
(d, stream=None, **kwargs)
draccus/parsers/config_parsers.py:103
Functionshould_equal
(expected: str, file_path: Optional[str] = None)
tests/conftest.py:51
Functionsilent
Test fixture that will make a tests fail if it prints anything to stdout or logs warnings
tests/conftest.py:84
Functionsimple_attribute
Test fixture that produces an tuple of (type, passed value, expected value)
tests/conftest.py:39
Functiontest_arg_value_is_set_when_args_are_provided
(some_type: Type, default_value: Any, arg_value: Any)
tests/test_base.py:64
Functiontest_argparse_with_custom_parsing
()
tests/test_base.py:197
Functiontest_basic_optional_argument
(simple_attribute, silent)
tests/test_base.py:43
Functiontest_basic_required_argument
(simple_attribute, silent)
tests/test_base.py:20
Functiontest_bool_attributes_work
()
tests/test_bools.py:24
Functiontest_bool_doesnt_parse_non_bools
()
tests/test_bools.py:36
Functiontest_calling_using_dataclasses
()
tests/test_calling_using_dataclass.py:19
Functiontest_choice_registry_argparse
()
tests/test_argparse_choice_types.py:34
Functiontest_choice_registry_decode
()
tests/test_choice_types.py:33
Functiontest_choice_registry_encode
()
tests/test_choice_types.py:54
Functiontest_choice_registry_examine_help
(snapshot)
tests/test_argparse_choice_types.py:60
Functiontest_choice_registry_examine_help
(snapshot)
tests/test_argparse_choice_types_plugin.py:50
Functiontest_collection_no_type
(item_type, type_hint, value, arg)
tests/test_lists.py:112
Functiontest_decode_union_with_dataclass_and_atomic
()
tests/test_union.py:109
Functiontest_deeply_nested_optional_parameter_groups
Same as above tests, but deeper hierarchy.
tests/test_optional.py:72
Functiontest_default_dataclass_argument
(simple_attribute, silent)
tests/test_default_args.py:27
Functiontest_default_help_inline
(snapshot)
tests/test_preferred_help.py:48
Functiontest_default_value
(ContainerClass)
tests/test_lists.py:70
Functiontest_dict_field
()
tests/test_utils.py:111
Functiontest_dict_field_with_keyword_args
()
tests/test_utils.py:125
Functiontest_dict_field_without_args
()
tests/test_utils.py:138
Functiontest_docstring_parsing_work_on_base
()
tests/test_docstrings.py:45
Functiontest_docstring_parsing_works_on_extended
()
tests/test_docstrings.py:62
Functiontest_docstring_works_with_field_function
()
tests/test_docstrings.py:89
Functiontest_dump_future_annotation_string_field
()
tests/test_future_annotations.py:41
Functiontest_dump_load
(simple_attribute, config_type, tmp_path)
tests/test_decoding.py:41
Functiontest_dump_load_context
()
tests/test_decoding.py:69
Functiontest_dump_load_dicts
(simple_attribute, tmp_path)
tests/test_decoding.py:89
Functiontest_dump_load_enum
(tmp_path)
tests/test_decoding.py:113
Functiontest_each_type_is_used_correctly
()
tests/test_tuples.py:42
Functiontest_empty_required_str
()
tests/test_base.py:208
Functiontest_encode_basic_types
()
tests/test_encoding.py:22
Functiontest_encode_choice_type
()
tests/test_encoding.py:140
Functiontest_encode_choice_type_in_generic
()
tests/test_encoding.py:155
Functiontest_encode_complex_nesting
()
tests/test_encoding.py:104
Functiontest_encode_dataclass
()
tests/test_encoding.py:57
Functiontest_encode_dataclass_type_parameters_error
()
tests/test_encoding.py:229
Functiontest_encode_dict
()
tests/test_encoding.py:50
Functiontest_encode_enum
()
tests/test_encoding.py:31
Functiontest_encode_enum_str
()
tests/test_encoding.py:217
Functiontest_encode_generic_dataclass
()
tests/test_encoding.py:89
Functiontest_encode_generic_union_member
()
tests/test_encoding.py:177
Functiontest_encode_list
()
tests/test_encoding.py:36
Functiontest_encode_literal_union_member
()
tests/test_encoding.py:189
← previousnext →201–300 of 407, ranked by callers