diff --git a/metadata-ingestion/build.gradle b/metadata-ingestion/build.gradle index ac8658bd869272..6629a0b9ef022e 100644 --- a/metadata-ingestion/build.gradle +++ b/metadata-ingestion/build.gradle @@ -106,12 +106,7 @@ task modelDocUpload(type: Exec, dependsOn: [modelDocGen]) { task lint(type: Exec, dependsOn: installDev) { - /* - The find/sed combo below is a temporary work-around for the following mypy issue with airflow 2.2.0: - "venv/lib/python3.8/site-packages/airflow/_vendor/connexion/spec.py:169: error: invalid syntax". - */ commandLine 'bash', '-c', - "find ${venv_name}/lib -path *airflow/_vendor/connexion/spec.py -exec sed -i.bak -e '169,169s/ # type: List\\[str\\]//g' {} \\; && " + "source ${venv_name}/bin/activate && set -x && " + "black --check --diff src/ tests/ examples/ && " + "isort --check --diff src/ tests/ examples/ && " + @@ -122,9 +117,7 @@ task lintFix(type: Exec, dependsOn: installDev) { commandLine 'bash', '-c', "source ${venv_name}/bin/activate && set -x && " + "black src/ tests/ examples/ && " + - "isort src/ tests/ examples/ && " + - "flake8 src/ tests/ examples/ && " + - "mypy --show-traceback --show-error-codes src/ tests/ examples/" + "isort src/ tests/ examples/" } def pytest_default_env = "PYTHONDEVMODE=1" diff --git a/metadata-ingestion/developing.md b/metadata-ingestion/developing.md index b713997d8286fe..5e4bc2d4d71158 100644 --- a/metadata-ingestion/developing.md +++ b/metadata-ingestion/developing.md @@ -89,6 +89,7 @@ cd metadata-ingestion-modules/gx-plugin source venv/bin/activate datahub version # should print "DataHub CLI version: unavailable (installed in develop mode)" ``` + ### (Optional) Set up your Python environment for developing on Dagster Plugin From the repository root: @@ -99,6 +100,7 @@ cd metadata-ingestion-modules/dagster-plugin source venv/bin/activate datahub version # should print "DataHub CLI version: unavailable (installed in develop mode)" ``` + ### Common setup issues Common issues (click to expand): @@ -188,6 +190,9 @@ mypy src/ tests/ or you can run from root of the repository ```shell +./gradlew :metadata-ingestion:lint + +# This will auto-fix some linting issues. ./gradlew :metadata-ingestion:lintFix ```