diff --git a/pyproject.toml b/pyproject.toml
index 2ec5b34d15a65156b1ff41451d54c2e77a9e9d33..bddd828770069b619585198ff479afb7dabdaff1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -8,6 +8,18 @@ known_first_party = ["test"]
 [tool.black]
 line-length = 120
 target-version = ["py310"]
+exclude = '''
+(
+  /(
+    geant_service_orchestrator\.egg-info      # exclude a few common directories in the
+    | \.git                                   # root of the project
+    | \.*_cache
+    | \.tox
+    | venv
+    | gso/migrations
+  )/
+)
+'''
 
 [tool.mypy]
 exclude = "venv"
@@ -84,5 +96,5 @@ ban-relative-imports = "all"
 "test/*" = ["S101", "B033", "N816", "N802"]
 
 [tool.ruff.isort]
-known-third-party = ["pydantic"]
-known-first-party = ["migrations", "test"]
+known-third-party = ["pydantic", "migrations"]
+known-first-party = ["test"]