fix: Make Python "import from" statements commutative #248

Merged
ada4a merged 2 commits from wetneb/mergiraf:python_import_from into main 2025-03-07 17:33:16 +01:00
Owner

So far we were able to reorder statements of the form import foo but not from foo import bar. This fixes it.

So far we were able to reorder statements of the form `import foo` but not `from foo import bar`. This fixes it.
fix: Make Python "import from" statements commutative
All checks were successful
/ test (pull_request) Successful in 54s
54fb7923f0
@ -0,0 +1,17 @@
from .....pagination import SyncCursorPage, AsyncCursorPage
Owner

It's kind of hard to tell from a glance what gets merged with what -- maybe it could be helpful to minimize the example a little and use shorter names?

It's kind of hard to tell from a glance what gets merged with what -- maybe it could be helpful to minimize the example a little and use shorter names?
Simplify example
All checks were successful
/ test (pull_request) Successful in 57s
47fa44dc93
Author
Owner

Good point! I did think about it, was just too lazy to act on it ^^

Good point! I did think about it, was just too lazy to act on it ^^
Owner

Much clearer now, thank you:)

Much clearer now, thank you:)
ada4a approved these changes 2025-03-07 17:14:29 +01:00
Owner

Oh and I also think this could be feat instead of fix, since we add more functionality -- but I guess that's not too important

Oh and I also think this could be `feat` instead of `fix`, since we add more functionality -- but I guess that's not too important
ada4a merged commit af99629c26 into main 2025-03-07 17:33:16 +01:00
Author
Owner

It was reported to me as a bug, and it was also my expectation that such a case worked already, so that's why I think of it as a fix, but yeah, the difference is sometimes not clear cut ^^

It was reported to me as a bug, and it was also my expectation that such a case worked already, so that's why I think of it as a fix, but yeah, the difference is sometimes not clear cut ^^
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: mergiraf/mergiraf#248
No description provided.