Skip to content

Commit

Permalink
Remove unused # type: ignore (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fokko authored May 8, 2023
1 parent cb41ab0 commit 142c7a6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20230508-222118.yaml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dbt/adapters/spark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions dbt/adapters/spark/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 142c7a6

Please sign in to comment.