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

Remove Python 2.7 leftovers #270

Merged
merged 6 commits into from
Jan 27, 2025
Merged

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Jan 18, 2025

Fixes #265.

@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as draft January 18, 2025 17:40
@skjerns
Copy link
Collaborator

skjerns commented Jan 20, 2025

I think #265 should also fall under this

@DimitriPapadopoulos
Copy link
Contributor Author

CI errors will be fixed by #266 / ab3c58c or #269 / 78ff00e.

@skjerns
Copy link
Collaborator

skjerns commented Jan 22, 2025

CI errors will be fixed by #266 / ab3c58c or #269 / 78ff00e.

sure! let me know when I can review

@DimitriPapadopoulos DimitriPapadopoulos force-pushed the py2 branch 8 times, most recently from b4b706c to 7eaa773 Compare January 26, 2025 16:35
@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented Jan 26, 2025

#265 should be fixed in its own PR. The current code needs to be cleaned up and it should be clarified whether header fields should be stored as str or byte. It's currently a messed up mix of both as far as I can understand.

@skjerns Ready for review.

@skjerns
Copy link
Collaborator

skjerns commented Jan 27, 2025

Looks good, I made some small adjustements

@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented Jan 27, 2025

See my comment #270 (comment) above about du() and u().

In short, it must be made clear whether the ASCII header fields are stored as bytes or str. Right now, both are possible as far as I can see, hence the functions cannot be removed.

@@ -753,7 +753,7 @@ def drop_channels(
if isinstance(ch,str):
ch_idx = ch_names.index(ch.lower())
to_keep[i] = ch_idx
load_channels = to_keep.copy()
load_channels = list(to_keep)
Copy link
Contributor Author

@DimitriPapadopoulos DimitriPapadopoulos Jan 27, 2025

Choose a reason for hiding this comment

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

to_keep is already a list, and to_keep.copy() is more readable. Why revert?

Copy link
Collaborator

Choose a reason for hiding this comment

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

could be a numpy array as well, so convert to list just to be safe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's supposed to be a list. Why would it be a Numpy array?

@skjerns skjerns merged commit f905d60 into holgern:master Jan 27, 2025
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.

Check if du() and u() are still necessary
2 participants