nutti / fake-bpy-module

Fake Blender Python API module collection for the code completion.
MIT License
1.32k stars 95 forks source link

Imports order is not reproducible #176

Closed JonathanPlasse closed 5 months ago

JonathanPlasse commented 7 months ago

Expected behavior

The order of imports is not reproducible between generation. This is a problem, as people who add the pyi files to git project will have large, unneeded diffs. I would propose to sort the imports alphabetically, like it is done in other parts of the code.

Description about the bug

Between generation, the order of imports is not the same.

Screenshots/Files [Optional]

This is an example.

diff --git a/out/bl_console_utils/autocomplete/__init__.pyi b/out/bl_console_utils/autocomplete/__init__.pyi
index 326e4ca..30c09d1 100644
--- a/out/bl_console_utils/autocomplete/__init__.pyi
+++ b/out/bl_console_utils/autocomplete/__init__.pyi
@@ -1,8 +1,8 @@
 import sys
 import typing
+from . import complete_namespace
 from . import complete_import
 from . import complete_calltip
-from . import complete_namespace
 from . import intellisense

 GenericType = typing.TypeVar("GenericType")