Skip to content

Remove artificial defaults from text nodes#1210

Open
tefra wants to merge 1 commit intomainfrom
avoid-generating-default-values-for-text-nodes
Open

Remove artificial defaults from text nodes#1210
tefra wants to merge 1 commit intomainfrom
avoid-generating-default-values-for-text-nodes

Conversation

@tefra
Copy link
Copy Markdown
Owner

@tefra tefra commented Feb 24, 2026

📒 Description

Due to the silly python 3.9 restrictions, it was impossible to handle empty text nodes and we had to invent artificial default values for them. It works but often we generated things like this, which is wrong and odd

     value: str = field(
         default="",
         metadata={
             "pattern": r"0x[0-9a-z]*",
        }
     )

Now we are going to follow the standard of xml binding libraries that handle this properly on the binding layer, It might add a bit more work for people but the models and the parsing will be more accurate.

🔗 What I've Done

Write a description of the steps taken to resolve the issue

💬 Comments

A place to write any comments to the reviewer.

🛫 Checklist

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7a82d77) to head (24b5d08).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1210   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          116       116           
  Lines         9376      9381    +5     
  Branches      1439      1439           
=========================================
+ Hits          9376      9381    +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tefra tefra force-pushed the avoid-generating-default-values-for-text-nodes branch from 2b71e9a to 5528337 Compare February 24, 2026 10:06
@tefra tefra force-pushed the avoid-generating-default-values-for-text-nodes branch from 5528337 to 24b5d08 Compare March 8, 2026 09:45
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 8, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant