diff --git a/.changes/unreleased/Under the Hood-20230508-222118.yaml b/.changes/unreleased/Under the Hood-20230508-222118.yaml new file mode 100644 index 000000000..daf66ad15 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20230508-222118.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Remove unneeded type ignore +time: 2023-05-08T22:21:18.093232+02:00 +custom: + Author: Fokko + Issue: "753" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d80b955c..ddec9b665 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,7 +52,7 @@ repos: # of our control to the mix. Unfortunately, there's nothing we can # do about per pre-commit's author. # See https://github.com/pre-commit/pre-commit/issues/730 for details. - args: [--show-error-codes, --ignore-missing-imports, --explicit-package-bases] + args: [--show-error-codes, --ignore-missing-imports, --explicit-package-bases, --warn-unused-ignores] files: ^dbt/adapters/.* language: system - id: mypy diff --git a/dbt/adapters/spark/__init__.py b/dbt/adapters/spark/__init__.py index 315880199..c25ba40d5 100644 --- a/dbt/adapters/spark/__init__.py +++ b/dbt/adapters/spark/__init__.py @@ -5,7 +5,7 @@ from dbt.adapters.spark.impl import SparkAdapter from dbt.adapters.base import AdapterPlugin -from dbt.include import spark # type: ignore +from dbt.include import spark Plugin = AdapterPlugin( adapter=SparkAdapter, credentials=SparkCredentials, include_path=spark.PACKAGE_PATH # type: ignore diff --git a/dbt/adapters/spark/impl.py b/dbt/adapters/spark/impl.py index 37de188c5..b28d2c770 100644 --- a/dbt/adapters/spark/impl.py +++ b/dbt/adapters/spark/impl.py @@ -131,7 +131,7 @@ def add_schema_to_cache(self, schema) -> str: raise dbt.exceptions.CompilationError( "Attempted to cache a null schema for {}".format(name) ) - if get_flags().USE_CACHE: # type: ignore + if get_flags().USE_CACHE: self.cache.add_schema(None, schema) # so jinja doesn't render things return "" @@ -190,7 +190,7 @@ def _build_spark_relation_list( is_hudi: bool = "Provider: hudi" in information is_iceberg: bool = "Provider: iceberg" in information - relation: BaseRelation = self.Relation.create( # type: ignore + relation: BaseRelation = self.Relation.create( schema=_schema, identifier=name, type=rel_type,