Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support bidict inputs? #289

Closed
goodboy opened this issue May 12, 2023 · 0 comments · Fixed by #296
Closed

Support bidict inputs? #289

goodboy opened this issue May 12, 2023 · 0 comments · Fixed by #296

Comments

@goodboy
Copy link

goodboy commented May 12, 2023

Similar to #288 but instead supporting the pretty popular bidict lib 😎

Seems like (again) it should be simple to match against a collections.abc.MutableMapping instead of a dict?

I'm probably going to put up a patch for both this and #288.

goodboy added a commit to pikers/piker that referenced this issue May 17, 2023
We still need to get some patches landed in order to resolve:
- python-poetry/tomlkit#288
- python-poetry/tomlkit#289
- python-poetry/tomlkit#290

But, this does work for style preservation and the inline-table style we
were previously hacking into the `toml` lib in `.accounting._toml`,
which we can pretty much just drop now B)

Relates to #496 (pretty much solves it near-term i think?)
goodboy added a commit to pikers/tomlkit that referenced this issue May 25, 2023
For `decimal.Decimal` we can just encode as a `String` and leave it up
to the user how to decode the value on load. For `dict` it's quite handy
to just render any type that quacks like a `MutableMapping` to a table.

Resolves python-poetry#288 and python-poetry#289 but still needs tests!
goodboy added a commit to pikers/tomlkit that referenced this issue May 25, 2023
For `decimal.Decimal` we can just encode as a `String` and leave it up
to the user how to decode the value on load. For `dict` it's quite handy
to just render any type that quacks like a `MutableMapping` to a table.

Resolves python-poetry#288 and python-poetry#289 but still needs tests!
@frostming frostming linked a pull request Jun 28, 2023 that will close this issue
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 a pull request may close this issue.

1 participant