diff --git a/pyproject.toml b/pyproject.toml
index bdd06de966ca989a703be15c19b6432be3d4f28f..e39c7482d6b2b3fa012a72f2bff72f7fbb74f133 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -87,6 +87,12 @@ ignore = [
     "W503" # line break before binary operator <https://github.com/psf/black/issues/52>
 ]
 max-line-length = 88
+exclude = [
+    "build",
+    "target",
+    ".tox",
+    "swh/provenance/grpc"
+]
 
 [tool.pytest.ini_options]
 norecursedirs = "build docs .*"