PyCQA / isort

A Python utility / library to sort imports.
https://pycqa.github.io/isort/
MIT License
6.49k stars 580 forks source link

Isort change of behaviour ordering monorepo after adding setup.py #1916

Open Bluenix2 opened 2 years ago

Bluenix2 commented 2 years ago

Hello!

My project wumpyproject/wumpy is currently using isort to order all imports. Recently the tool started ordering the other subpackages in the monorepo differently.

Previously, they were ordered as installed packages but it has since started to order them as local modules.

The CI I have setup is able to reproduce this along with me, see this older successful run and the newest successful action I could find... and here is a diff: 9be9099...18e8fb2.

Although I don't expect you to spend too much time understanding the changes, the important part is looking at the imports. I did add a setup.py file yes. Does isort read from it? I tried it just now, by removing it, and it formatted the code differently but didn't earlier when I tried it (could have been me not saving or some similar human error).

How do I change this behaviour? The setup.py is only meant for development installation with git+https://github.com/wumpyproject/wumpy.

Bluenix2 commented 2 years ago

For unknown reasons, isort is now starting to order imports again like I want them to in this run.