Skip to content

Extract use_alias from converter by default #660

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

Merged
merged 10 commits into from
Jun 26, 2025

Conversation

AdrianSosic
Copy link
Contributor

Based on the discussion in #596, adds a use_alias argument to Converter (similar to `forbid_extra_keys') whose value is taken as default when structuring/unstructuring without specifying the corresponding argument to the method calls.

@AdrianSosic AdrianSosic marked this pull request as draft June 24, 2025 06:37
@AdrianSosic AdrianSosic force-pushed the feature/use_alias_config branch from 3515bf7 to df95f3e Compare June 24, 2025 07:03
@AdrianSosic AdrianSosic force-pushed the feature/use_alias_config branch from df95f3e to 29f6adb Compare June 24, 2025 07:15
@AdrianSosic AdrianSosic marked this pull request as ready for review June 24, 2025 07:31
@Tinche
Copy link
Member

Tinche commented Jun 24, 2025

Looks good, don't forget the changelog entry.

Copy link
Member

@Tinche Tinche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will also need a small test that tests the value is actually taken from the converter. Maybe in test_converters?

@Tinche
Copy link
Member

Tinche commented Jun 25, 2025

Changelog looks good, I always set it to unreleased too.

@Tinche Tinche self-requested a review June 25, 2025 20:45
@Tinche
Copy link
Member

Tinche commented Jun 26, 2025

Great job, thanks!

@Tinche Tinche merged commit 0c226c2 into python-attrs:main Jun 26, 2025
11 checks passed
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.

2 participants