Skip to content

Conversation

@cbrnr
Copy link
Contributor

@cbrnr cbrnr commented Feb 10, 2026

Fixes #13637.

In this PR, I have

  • extended the keep_his parameter to accept True, False, and the strings "his_id", "sex", and "hand" (or a sequence of any combination of these strings),
  • fixed the docs to reflect the actual behavior, and
  • added new test cases (and adapted bits of existing tests).

Importantly, the default behavior doesn't change (keep_his=False), and keep_his=True keeps the three fields (also as previously, but this time I've documented it correctly).

@cbrnr
Copy link
Contributor Author

cbrnr commented Feb 10, 2026

In which category should I create the corresponding changelog entry?

@cbrnr cbrnr requested a review from larsoner February 10, 2026 16:05
@larsoner
Copy link
Member

I think it counts as an enhancement (better control/granularity, no behavior change or deprecation)

Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

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

Just two optional ideas other than needing a doc/changes/dev/13647.newfeature.rst

cbrnr and others added 3 commits February 10, 2026 19:33
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
@cbrnr
Copy link
Contributor Author

cbrnr commented Feb 10, 2026

Thanks @larsoner! Unless I messed up the rST in the changelog entry (chances are >50% 😃), this should be ready to merge!

@larsoner larsoner enabled auto-merge (squash) February 10, 2026 19:45
@larsoner larsoner merged commit 8f75a7d into mne-tools:main Feb 10, 2026
32 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.

Consider retaining sex in anonymize_info()

2 participants