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

Sort imports #12097

Merged
merged 7 commits into from
Oct 11, 2023
Merged

Sort imports #12097

merged 7 commits into from
Oct 11, 2023

Conversation

cbrnr
Copy link
Contributor

@cbrnr cbrnr commented Oct 10, 2023

Fixes #12088.

@hoechenberger
Copy link
Member

image

😳

I guess .... LGTM if green!! 😅😅😅😅

@cbrnr
Copy link
Contributor Author

cbrnr commented Oct 10, 2023

Nested import hierarchy test is failing: https://dev.azure.com/mne-tools/mne-python/_build/results?j=c1ec3add-0fcd-52ea-530a-328457bbfb2e&t=370d4985-0b6a-5123-801e-618bab9d7575

Is this real and caused by this PR?

@cbrnr
Copy link
Contributor Author

cbrnr commented Oct 10, 2023

@hoechenberger did you not manually check every change?

@larsoner
Copy link
Member

Is this real and caused by this PR?

See test code that will need to be adjusted:

ignores = (
# File, statement, kind (omit line number because this can change)
("mne/utils/docs.py", " import mne", "non-relative mne import"),
(
"mne/io/_read_raw.py",
" from . import read_raw_edf, read_raw_bdf, read_raw_gdf, read_raw_brainvision, read_raw_fif, read_raw_eeglab, read_raw_cnt, read_raw_egi, read_raw_eximia, read_raw_nirx, read_raw_fieldtrip, read_raw_artemis123, read_raw_nicolet, read_raw_kit, read_raw_ctf, read_raw_boxy, read_raw_snirf, read_raw_fil, read_raw_nihon, read_raw_curry, read_raw_nedf", # noqa: E501
"non-explicit relative import",
),
(
"mne/datasets/utils.py",
" from . import eegbci, sleep_physionet, limo, fetch_fsaverage, fetch_infant_template, fetch_hcp_mmp_parcellation, fetch_phantom", # noqa: E501
"non-explicit relative import",
),

@hoechenberger
Copy link
Member

@hoechenberger did you not manually check every change?

Almost done 🤠🤡

@cbrnr
Copy link
Contributor Author

cbrnr commented Oct 10, 2023

Docs fail to build: https://app.circleci.com/pipelines/github/mne-tools/mne-python/21327/workflows/4e4ee041-9cab-4be1-bec2-bceb73e0d8d5/jobs/60319?invite=true#step-140-5569_85 (ImportError: Failed to import any of the following Qt binding modules: PyQt5, PySide2).

@larsoner
Copy link
Member

larsoner commented Oct 10, 2023

Oddly enoughI think it's actually due to a change in import order, specifically in mne/viz/backends/_qt.py having the matplotlib import before the PyVistaQt (which uses qtpy) breaks stuff. I'll push a commit that I think should fix it

@larsoner
Copy link
Member

... and there will be a pip-pre failure until #12095 is merged

@hoechenberger
Copy link
Member

Oddly enoughI think it's actually due to a change in import order

Ha! This is crazy 🤠

@larsoner
Copy link
Member

larsoner commented Oct 11, 2023

Okay in it goes, I'll follow up with a quick PR to add to .git-revs-ignore. Thanks @cbrnr !

@larsoner larsoner merged commit d6d2f8c into mne-tools:main Oct 11, 2023
28 checks passed
snwnde pushed a commit to snwnde/mne-python that referenced this pull request Mar 20, 2024
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.

Sort imports?
3 participants