`genericpath` is an internal Python module and shouldn't be imported according to core Python devs. (see [this](https://bugs.python.org/msg358136) comment) (#29903)
For a reason unknown to me, @exxamalte introduced this in https://github.com/home-assistant/home-assistant/pull/14342. The problem is that Linux and macOS implement `os.path` differently, one imports from [`ntpath.py`](https://github.com/python/cpython/blob/master/Lib/ntpath.py) and the other one from [`posixpath.py`](https://github.com/python/cpython/blob/master/Lib/posixpath.py), and both these files use `genericpath.py`. Somehow, `isort` on macOS will see `genericpath` as a third party library and sort it accordingly. Other Unix-based OSes will correctly treat `genericpath` as an internal library. This problem led to a sorting sequence in the following commits: -pull/29906/headca0fad2cbb
-f5d4878992
-7d68e88d31
-1fee400dcd
This supersedes https://github.com/home-assistant/home-assistant/pull/29893.
parent
5b32ee566c
commit
c59bf0bff6
|
@ -1,8 +1,8 @@
|
|||
"""The tests for the feedreader component."""
|
||||
from datetime import timedelta
|
||||
from genericpath import exists
|
||||
from logging import getLogger
|
||||
from os import remove
|
||||
from os.path import exists
|
||||
import time
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
|
Loading…
Reference in New Issue