-
Notifications
You must be signed in to change notification settings - Fork 92
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
[MRG] Fix copyfile_eeglab type conflicts #1126
[MRG] Fix copyfile_eeglab type conflicts #1126
Conversation
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴🏽♂️ |
78c014f
to
5e6efd4
Compare
5e6efd4
to
75b6e7e
Compare
Codecov Report
@@ Coverage Diff @@
## main #1126 +/- ##
==========================================
- Coverage 95.29% 95.23% -0.06%
==========================================
Files 40 40
Lines 8670 8671 +1
==========================================
- Hits 8262 8258 -4
- Misses 408 413 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
We saw it in mne-connectivity too: mne-tools/mne-connectivity#129 (comment) |
3df063b
to
ce70f52
Compare
oldstyle = False | ||
if 'EEG' in eeg: | ||
eeg = eeg['EEG'] | ||
oldstyle = True | ||
|
||
has_fdt_link = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to revert this change, as it makes the program flow less obvious
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the current implementation, there is some potential cases where has_fdt_link
will not be set and an error thrown. It happened to me during testing so that's how I tried to fix that. Would you prefer an else case instead?
try:
# If the data field is a string, it points to a .fdt file in src dir
if isinstance(eeg['data'][0, 0][0], str):
has_fdt_link = True
else:
has_fdt_link = False
except IndexError:
has_fdt_link = False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me both ways are fine. Thanks for figuring out that there is one potential flow that previously lead to an error!
and here, just behind Moritz, please: Line 154 in 0b1a61d
|
🎉 Congrats on merging your first pull request! 🥳 Looking forward to seeing more from you in the future! 💪 |
Thanks @laemtl 🚀 |
PR Description
Fix #1122
Merge checklist
Maintainer, please confirm the following before merging.
If applicable: