👌 Add parse_conditions configuration for link types#1684
Conversation
Co-authored-by: chrisjsewell <2997570+chrisjsewell@users.noreply.github.com>
parse_conditions configuration for link types
parse_conditions configuration for link typesparse_conditions configuration for link types
|
@copilot add to tests/doc_test/doc_link_conditions to test this new config in an end to end way |
Co-authored-by: chrisjsewell <2997570+chrisjsewell@users.noreply.github.com>
Added in 5bfa2fe. The e2e test adds a |
|
@copilot fix FAILED tests/test_basic_doc.py::test_build_needs[test_app0] - AssertionError: assert [+ received] == [- snapshot] |
…inkSchema Co-authored-by: chrisjsewell <2997570+chrisjsewell@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1684 +/- ##
==========================================
+ Coverage 86.87% 89.04% +2.16%
==========================================
Files 56 71 +15
Lines 6532 10178 +3646
==========================================
+ Hits 5675 9063 +3388
- Misses 857 1115 +258
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds a
parse_conditionsoption to link types, allowing users to disable[condition]bracket parsing per link type. Follows the existing pattern ofparse_dynamic_functionsandparse_variants. Defaults toTruefor backward compatibility.Changes
need_item.py: Addparse_conditions: bool = Truekwarg toNeedLink.from_stringandfrom_string_with_warnings; whenFalse, skip bracket parsing and pass the raw string toparse_addressconfig.py: Addparse_conditions: NotRequired[bool]toNeedLinksConfigneeds_schema.py: Add field toLinkSchemawith validation; thread it throughconvert_directive_option,convert_or_type_check, and_split_link_listneeds.py: Readparse_conditionsfrom link config increate_schema()docs/configuration.rst: Document the option in bothneeds_linksandneeds_schema_definitionssectionsparse_conditions=FalseinNeedLink.from_stringand_split_link_listraw_linkslink type withparse_conditions: Falsetotests/doc_test/doc_link_conditions, with a dedicatedtest_parse_conditions_disabledtest verifying brackets are treated as literal ID text in a full Sphinx buildUsage
Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.