Skip to content

Commit

Permalink
Merge branch 'master' into major-200-20240511
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishek's Macbook Pro authored and Abhishek's Macbook Pro committed May 11, 2024
2 parents e8fb1da + bcb7b73 commit ff4f9cb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/commands/import_symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,15 @@ def run(self, copy: bool = False):
)

self.import_statements = dict(
sorted(self.import_statements.items(), key=lambda k: k[0])
sorted(
self.import_statements.items(),
# put imports first, then sort by depth, then by name
key=lambda k: (
not k[0].startswith("import "),
k[0].count("."),
k[0],
),
)
)

self.view.erase_status(PyRockConstants.PACKAGE_NAME)
Expand Down

0 comments on commit ff4f9cb

Please sign in to comment.