diff --git a/metadata-ingestion-modules/airflow-plugin/pyproject.toml b/metadata-ingestion-modules/airflow-plugin/pyproject.toml index 1fdd56ff1792a..41bd14d9b1b85 100644 --- a/metadata-ingestion-modules/airflow-plugin/pyproject.toml +++ b/metadata-ingestion-modules/airflow-plugin/pyproject.toml @@ -5,6 +5,12 @@ requires = ["setuptools>=54.0.0", "wheel", "pip>=21.0.0"] [tool.ruff] line-length = 88 target-version = "py38" +exclude = [ + ".git", + "venv", + ".tox", + "__pycache__", +] [tool.ruff.format] quote-style = "double" diff --git a/metadata-ingestion-modules/dagster-plugin/pyproject.toml b/metadata-ingestion-modules/dagster-plugin/pyproject.toml index 39d780a2c1254..41bd14d9b1b85 100644 --- a/metadata-ingestion-modules/dagster-plugin/pyproject.toml +++ b/metadata-ingestion-modules/dagster-plugin/pyproject.toml @@ -3,8 +3,14 @@ build-backend = "setuptools.build_meta" requires = ["setuptools>=54.0.0", "wheel", "pip>=21.0.0"] [tool.ruff] -target-version = "py38" line-length = 88 +target-version = "py38" +exclude = [ + ".git", + "venv", + ".tox", + "__pycache__", +] [tool.ruff.format] quote-style = "double" diff --git a/metadata-ingestion-modules/gx-plugin/pyproject.toml b/metadata-ingestion-modules/gx-plugin/pyproject.toml index 7e227edc4b196..41bd14d9b1b85 100644 --- a/metadata-ingestion-modules/gx-plugin/pyproject.toml +++ b/metadata-ingestion-modules/gx-plugin/pyproject.toml @@ -5,6 +5,12 @@ requires = ["setuptools>=54.0.0", "wheel", "pip>=21.0.0"] [tool.ruff] line-length = 88 target-version = "py38" +exclude = [ + ".git", + "venv", + ".tox", + "__pycache__", +] [tool.ruff.format] quote-style = "double" @@ -48,7 +54,6 @@ ignore = [ max-complexity = 15 [tool.ruff.lint.flake8-tidy-imports] -# Disallow all relative imports. ban-relative-imports = "all" [tool.ruff.lint.per-file-ignores] diff --git a/metadata-ingestion-modules/prefect-plugin/pyproject.toml b/metadata-ingestion-modules/prefect-plugin/pyproject.toml index 1fdd56ff1792a..41bd14d9b1b85 100644 --- a/metadata-ingestion-modules/prefect-plugin/pyproject.toml +++ b/metadata-ingestion-modules/prefect-plugin/pyproject.toml @@ -5,6 +5,12 @@ requires = ["setuptools>=54.0.0", "wheel", "pip>=21.0.0"] [tool.ruff] line-length = 88 target-version = "py38" +exclude = [ + ".git", + "venv", + ".tox", + "__pycache__", +] [tool.ruff.format] quote-style = "double" diff --git a/metadata-ingestion/pyproject.toml b/metadata-ingestion/pyproject.toml index f489facde4d50..7378b60d60a81 100644 --- a/metadata-ingestion/pyproject.toml +++ b/metadata-ingestion/pyproject.toml @@ -4,10 +4,9 @@ requires = ["setuptools>=63.0.0", "wheel"] [tool.ruff] line-length = 88 -# Exclude directories matching these patterns +target-version = "py38" exclude = [ ".git", - "src/datahub/metadata", "venv", ".tox", "__pycache__", @@ -19,6 +18,23 @@ indent-style = "space" skip-magic-trailing-comma = false line-ending = "auto" +[tool.ruff.lint.isort] +combine-as-imports = true +known-first-party = ["datahub"] +extra-standard-library = ["__future__", "datahub.utilities._markupsafe_compat", "datahub.sql_parsing._sqlglot_patch"] +section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] +force-sort-within-sections = false +force-wrap-aliases = false +split-on-trailing-comma = false +order-by-type = true +relative-imports-order = "closest-to-furthest" +force-single-line = false +single-line-exclusions = ["typing"] +length-sort = false +from-first = false +required-imports = [] +classes = ["typing"] + [tool.ruff.lint] select = [ "B", # flake8-bugbear @@ -29,14 +45,10 @@ select = [ "TID", # flake8-tidy-imports ] ignore = [ - # Ignore line length violations (handled by formatter) - "E501", - # Ignore whitespace before ':' (matches Black) - "E203", - # Allow usages of functools.lru_cache - "B019", - # Allow function call in argument defaults - "B008", + "E501", # Line length violations (handled by formatter) + "E203", # Ignore whitespace before ':' (matches Black) + "B019", # Allow usages of functools.lru_cache + "B008", # Allow function call in argument defaults # TODO: Enable these later "B006", # Mutable args "B017", # Do not assert blind exception @@ -46,23 +58,6 @@ ignore = [ [tool.ruff.lint.mccabe] max-complexity = 20 -[tool.ruff.lint.isort] -combine-as-imports = true -known-first-party = ["datahub"] -extra-standard-library = ["__future__", "datahub.utilities._markupsafe_compat", "datahub.sql_parsing._sqlglot_patch"] -section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] -force-sort-within-sections = false -force-wrap-aliases = false -split-on-trailing-comma = false -order-by-type = true -relative-imports-order = "closest-to-furthest" -force-single-line = false -single-line-exclusions = ["typing"] -length-sort = false -from-first = false -required-imports = [] -classes = ["typing"] - [tool.ruff.lint.flake8-tidy-imports] ban-relative-imports = "all"