Skip to content

MAINT: Replace Path.parent.parent with Path.parents[N] in tests#12257

Merged
hoechenberger merged 2 commits intomne-tools:mainfrom
ctrltz:12183-path-parents
Dec 5, 2023
Merged

MAINT: Replace Path.parent.parent with Path.parents[N] in tests#12257
hoechenberger merged 2 commits intomne-tools:mainfrom
ctrltz:12183-path-parents

Conversation

@ctrltz
Copy link
Copy Markdown
Contributor

@ctrltz ctrltz commented Dec 3, 2023

Reference issue

Fixes #12183.

What does this implement/fix?

This PR replaces all Path.parent.parent and Path.parent.parent.parent calls in test files with Path.parents[1] and Path.parents[2], respectively.

Additional information

I hope that it's fine that I did not ask whether the issue is still up for grabs (found no PR addressing it already).

Copy link
Copy Markdown
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.

Failures are unrelated and should be fixed by #12258, which I'll merge in here once it's in.

Copy link
Copy Markdown
Member

@hoechenberger hoechenberger left a comment

Choose a reason for hiding this comment

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

Very nice! 👍

@hoechenberger hoechenberger merged commit ac55693 into mne-tools:main Dec 5, 2023
larsoner added a commit to hoechenberger/mne-python that referenced this pull request Dec 5, 2023
* upstream/main:
  MRG: Use ruff-format instead of Black (mne-tools#12261)
  MAINT: Make selenium optional and use on CircleCI (mne-tools#12263)
  MAINT: Post-release deprecations (mne-tools#12265)
  MAINT: Replace `Path.parent.parent` with `Path.parents[N]` in tests (mne-tools#12257)
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.

MAINT: Replace Path.parent.parent with Path.parents

3 participants