You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by di...@apache.org on 2020/06/19 22:16:44 UTC

[airflow] branch v1-10-test updated: flake8 fixes

This is an automated email from the ASF dual-hosted git repository.

dimberman pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v1-10-test by this push:
     new 6678ac4  flake8 fixes
6678ac4 is described below

commit 6678ac43c69a43b01d78c77589bbfe9edbeabceb
Author: Daniel Imberman <da...@astronomer.io>
AuthorDate: Fri Jun 19 15:15:50 2020 -0700

    flake8 fixes
---
 airflow/operators/sql.py      | 2 +-
 tests/operators/test_sql.py   | 3 +--
 tests/test_core_to_contrib.py | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/airflow/operators/sql.py b/airflow/operators/sql.py
index fd997d9..84a4b49 100644
--- a/airflow/operators/sql.py
+++ b/airflow/operators/sql.py
@@ -82,7 +82,7 @@ class SQLCheckOperator(BaseOperator):
 
     @apply_defaults
     def __init__(
-        self, sql: str, conn_id: Optional[str] = None, *args, **kwargs
+        self, sql, conn_id = None, *args, **kwargs
     ) -> None:
         super().__init__(*args, **kwargs)
         self.conn_id = conn_id
diff --git a/tests/operators/test_sql.py b/tests/operators/test_sql.py
index a538f15..255c6f5 100644
--- a/tests/operators/test_sql.py
+++ b/tests/operators/test_sql.py
@@ -200,8 +200,7 @@ class TestIntervalCheckOperator(unittest.TestCase):
                 [2, 2, 2, 2],  # reference
                 [1, 1, 1, 1],  # current
             ]
-
-            yield from rows
+            return rows
 
         mock_hook.get_first.side_effect = returned_row()
         mock_get_db_hook.return_value = mock_hook
diff --git a/tests/test_core_to_contrib.py b/tests/test_core_to_contrib.py
index 0a3e7fb..36e5762 100644
--- a/tests/test_core_to_contrib.py
+++ b/tests/test_core_to_contrib.py
@@ -66,7 +66,7 @@ RENAMED_HOOKS = [
 
 class TestMovingCoreToContrib(TestCase):
     @staticmethod
-    def assert_warning(msg: str, warning: Any):
+    def assert_warning(msg, warning):
         error = "Text '{}' not in warnings".format(msg)
         assert any(msg in str(w) for w in warning.warnings), error