The pathlib-style is changed on line 46-47 (#10849)
The pathlib-style is changed on line 46-47 (#10849)

* The pathlib-style is changed on line 46-47

* Bugs
----

 Update pathlib-style to handle file paths (:gh:`10814` by :newcontrib:`Hamid Mandi`)

- ...

* Some changes 

* flake8 tested 

* Apply suggestions from code review

Co-authored-by: Daniel McCloy <2591e5f46f28d303f9dc027d475a5c60d8dea17a@mccloy.info>
wmvanvliet/mne-python,olafhauk/mne-python,pravsripad/mne-python,Teekuningas/mne-python,Teekuningas/mne-python,kingjr/mne-python,drammock/mne-python,larsoner/mne-python,olafhauk/mne-python,pravsripad/mne-python,Teekuningas/mne-python,mne-tools/mne-python,pravsripad/mne-python,wmvanvliet/mne-python,mne-tools/mne-python,olafhauk/mne-python,wmvanvliet/mne-python,kingjr/mne-python,drammock/mne-python,mne-tools/mne-python,larsoner/mne-python,drammock/mne-python,kingjr/mne-python,larsoner/mne-python