diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index debad8cc6a..5183f38110 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,6 +68,10 @@ repos: - id: check-symlinks - id: destroyed-symlinks - id: requirements-txt-fixer + - repo: https://github.com/PyCQA/isort + rev: 5.11.5 + hooks: + - id: isort - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt rev: 0.2.3 hooks: diff --git a/pyproject.toml b/pyproject.toml index a06d464de7..d32cf5f06b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,12 @@ [tool.black] line-length = 79 include = '\.pyi?$' +[tool.isort] +profile = "black" +multi_line_output = 3 +line_length = 79 +force_grid_wrap = 2 +known_m5 = "m5" +known_underscore_m5 = "_m5,slicc" +known_gem5 = "gem5" +sections="FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,M5,UNDERSCORE_M5,GEM5,LOCALFOLDER"