Skip to content

Conversation

@pkage
Copy link

@pkage pkage commented May 4, 2025

Pretty much what it says on the tin. Adds loader support for XML if the [xml] extra is installed. If the extra is not installed, a ModuleNotFound error is thrown. Uses xmltodict under the hood for the xml conversion. A simple example:

<section>
	<key>value</key>
</section>

transforms to

{
	"section": {
		"key": "value"
	}
}

All tests pass (100% coverage) across all supported pythohn versions (via ds dev-all). I had to do fiddling about with pyright to get it to actually accept line-level ignore comments—i suspect that may be due to the particular pyright version? Happy to remove for merge.

as good a use as any of a sunday afternoon

pkage added 3 commits May 4, 2025 15:38
works around apparent bug in pyright where reportMissingImports cannot
be silenced with a line-level magic comment, the option must be set at
the file level
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