• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

omry / omegaconf
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Repo Added 03 Sep 2018 08:45PM UTC
Files 20
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH pr1272
branch: pr1272
CHANGE BRANCH
x
Reset
  • pr1272
  • #174
  • 1.4.0
  • 1.4.0_branch
  • 1.4_branch
  • 127
  • 164
  • 184
  • 185
  • 2.0.0.rc3
  • 2.0.0rc3
  • 2.0.0rc4
  • 2.0.0rc5
  • 2.0.0rc6
  • 2.0.1
  • 2.0.4
  • 2.0_branch
  • 2.1.0
  • 2.1.0.rc1
  • 2.1_branch
  • 2.2_branch
  • 2.3_branch
  • 2.4_branch
  • 241
  • 246
  • 253
  • 260
  • 304-setdefault
  • 305-missing-list-merge
  • 336-list-merge-none-error
  • 343
  • 350
  • 363
  • 37
  • 39
  • 418
  • 425
  • 442
  • 461-flags-root
  • 461_annotated_dicts_are_open
  • 481-feedback
  • 541-oc.select
  • 589-nested-flag-override
  • 601-list-copy
  • 601-update
  • 67
  • 674-select-with-default
  • 697
  • 7iW-merge-dont-overwrite-structured-value
  • EnumNode.__eq__
  • Jasha10-patch-1
  • _get_node_throw_on_missing
  • allow_non_primitive
  • allow_objects_failure_case
  • allow_objects_with_non_copyable
  • antlr
  • arisliang-master
  • attribute_error
  • auto-expand
  • benchmark_and_fixes
  • bugpass
  • bye_27
  • code_config
  • codex/fix-missing-keys-interpolations
  • codex/listconfig-negative-indexing-slicing
  • commit_hook
  • compact
  • configurable_default_flow_style
  • contains
  • copy
  • coverage
  • create
  • create_bug
  • dc
  • debug
  • del
  • deprecated
  • deprecated_auto_expand
  • detect-interpolation-cycles
  • dict-fixes
  • docs
  • docs2
  • dotlist
  • double_error
  • ducks
  • ec.env-default-non-str
  • empty-file
  • enum
  • enum_str
  • env
  • eq
  • error_msg_on_non_structured_config
  • error_newline
  • errors
  • exception
  • fix-ci-coverage
  • fix_examples
  • fixes
  • flags_override
  • frozen
  • i945
  • improve-error-actionability
  • in
  • indirect_interpolation
  • inter-tests
  • interpolation_missing
  • interpolation_missing_merge
  • interpolation_with_@
  • is_missing
  • isort
  • isort5
  • items()
  • jasha-fix-readthedocs-build-os
  • list-iter
  • list_in
  • list_iter3
  • list_iterate
  • literal
  • main
  • mask
  • master
  • merge_allow_objects
  • merge_element_type
  • merge_into_custom_resolver
  • merge_into_missing_dict
  • merge_into_none_list_backport
  • merged_type
  • minor
  • misc
  • missing
  • missing-not-overrwriting
  • missing_bug
  • missing_literal
  • news
  • no_pickle_flags_cache
  • non-primitive-pass2
  • oc.deprecated
  • omry-patch-1
  • open_dict_bug
  • parent_bug
  • pc
  • pickle-bc
  • pop
  • pr1244
  • pr1245
  • pr1246
  • pr1247
  • pr1248
  • pr1249
  • pr1250
  • pr1252
  • pr1253
  • pr1254
  • pr1257
  • pr1258
  • pr1259
  • pr1260
  • pr1262
  • pr1264
  • pr1265
  • pr1268
  • pr1269
  • pr1270
  • pr1273
  • pr1277
  • pr1278
  • pr1279
  • pr1281
  • pr1283
  • pr1284
  • pr1285
  • pr1286
  • pr1287
  • pr1289
  • pr1296
  • pr1303
  • pr1304
  • pr1313
  • pr1316
  • pr1317
  • pr1318
  • pr1319
  • pr1320
  • pr1321
  • pr1322
  • pre-commit
  • pretty_deprecation
  • py.typed
  • py3.13
  • pydev-plugin
  • pytest_mypy
  • python-compat
  • pyyaml-dep
  • rc28
  • readonly-merge
  • ref_type_3
  • refactor-resolvers
  • relative
  • relative-inter-doc
  • relative_fix
  • remove-deprecated
  • remove_dot_warning
  • resolve_updates
  • revert
  • revert-154-merged_type
  • rsokl/deployment
  • sapling-pr-archive-omry
  • sc_ref_type_clean
  • select
  • select_nested_is_relative
  • select_relative
  • serialize-doc
  • sort_keys
  • str_inter_with_ro_parent
  • struct
  • struct_assign
  • struct_del_pop
  • structured-assignment
  • structured_bugs
  • structured_missing
  • subclass_assignment
  • sync_news_readme_2.2
  • temporary_backlog_atlas_install_pr
  • test_dict_re_assign_value
  • test_imports
  • to_container
  • to_container_2
  • to_primitive_container
  • tuple
  • type_hints
  • type_str
  • typed_dict
  • types
  • union_error
  • unsafe_merge
  • update
  • update-merge
  • update_force_add
  • val_error_msg
  • warn_dot
  • warning
  • wtf

24 Apr 2026 12:12PM UTC coverage: 100.0%. Remained the same
6acef475-5d65-416d-b549-a144aadd13bd

Pull #1272

circleci

omry
Add support for typing.Literal annotations

Supersedes #1228

Implements LiteralNode to support Literal type hints as an alternative
to Enum in structured configs. Validates value and type equality using
type identity (not isinstance) to keep bool and int distinct.

- Add LiteralNode class with validation for Literal types
- Support Literal inside containers: List[Literal[...]], Dict[K, Literal[...]]
- Fix ordering bug where Literal[1, True] would incorrectly reject True
  depending on element position, by replacing the two-pass check with a
  single-pass type-and-value loop
- Add test data classes (LiteralConfig, LiteralContainers) for dataclasses and attrs
- Add tests for validation, equality (including cross-ref_type and cross-type),
  bool/int cross-matching, and YAML round-trip
- Document Literal types in structured_config.rst

Fixes #422
Closes #865

Co-Authored-By: jordan-schneider <jordan-schneider@users.noreply.github.com>
Co-Authored-By: rachtsingh <rachtsingh@users.noreply.github.com>
Co-Authored-By: Omry Yadan <omry@yadan.net>
Pull Request #1272: Add support for typing.Literal annotations

25 of 25 new or added lines in 3 files covered. (100.0%)

3522 of 3522 relevant lines covered (100.0%)

1.0 hits per line

Relevant lines Covered
Build:
Build:
3522 RELEVANT LINES 3522 COVERED LINES
1.0 HITS PER LINE
Source Files on pr1272
  • Tree
  • List 19
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
6acef475... pr1272 Add support for typing.Literal annotations Supersedes #1228 Implements LiteralNode to support Literal type hints as an alternative to Enum in structured configs. Validates value and type equality using type identity (not isinstance) to keep bool... Pull #1272 24 Apr 2026 12:15PM UTC omry circleci
100.0
See All Builds (2724)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc