RhinoSecurityLabs / pacu

The AWS exploitation framework, designed for testing the security of Amazon Web Services environments.
https://rhinosecuritylabs.com/aws/pacu-open-source-aws-exploitation-framework/
BSD 3-Clause "New" or "Revised" License
4.3k stars 689 forks source link

Sort imported Python modules alphabetically using isort #405

Closed za closed 4 months ago

za commented 7 months ago

Hi there,

Any plan to use isort to sort imported modules alphabetically? This will make the code easier to read as it's following Python best practice on importing modules.

Example:

diff --git a/pacu/core/lib.py b/pacu/core/lib.py
index 1fa9d0f..69660b4 100644
--- a/pacu/core/lib.py
+++ b/pacu/core/lib.py
@@ -1,8 +1,7 @@
 import contextlib
 import os
-from typing import Optional, cast, Callable, Generator, IO, Any
-
 from pathlib import Path
+from typing import IO, Any, Callable, Generator, Optional, cast
DaveYesland commented 4 months ago

There are certainly quite a few improvements which could be made to formatting and readability of Pacu's code. But for now formatting across the entire code base is not something we are planning to do.