You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by dw...@apache.org on 2022/08/16 15:23:01 UTC
[iceberg] branch master updated: Fix linter and test failures (#5542)
This is an automated email from the ASF dual-hosted git repository.
dweeks pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new 2a2cf150ad Fix linter and test failures (#5542)
2a2cf150ad is described below
commit 2a2cf150adafd3487809363bcd7c4160d47e967c
Author: Samuel Redai <43...@users.noreply.github.com>
AuthorDate: Tue Aug 16 08:22:55 2022 -0700
Fix linter and test failures (#5542)
* Fix linter and test failures
* Replace pipe with Union
* Update python/tests/catalog/test_hive.py
Co-authored-by: Fokko Driesprong <fo...@apache.org>
* Update python/pyiceberg/catalog/rest.py
Co-authored-by: Fokko Driesprong <fo...@apache.org>
* Update python/pyiceberg/cli/console.py
Co-authored-by: Fokko Driesprong <fo...@apache.org>
* Update python/tests/catalog/test_rest.py
Co-authored-by: Fokko Driesprong <fo...@apache.org>
Co-authored-by: Fokko Driesprong <fo...@apache.org>
---
python/tests/catalog/test_hive.py | 2 +-
python/tests/catalog/test_rest.py | 2 +-
python/tests/cli/test_console.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/python/tests/catalog/test_hive.py b/python/tests/catalog/test_hive.py
index 32dce64e31..e3baec7b84 100644
--- a/python/tests/catalog/test_hive.py
+++ b/python/tests/catalog/test_hive.py
@@ -468,7 +468,7 @@ def test_list_namespaces():
def test_list_namespaces_with_parent():
- catalog = HiveCatalog(HIVE_CATALOG_NAME, {}, uri=HIVE_METASTORE_FAKE_URL)
+ catalog = HiveCatalog(HIVE_CATALOG_NAME, uri=HIVE_METASTORE_FAKE_URL)
# Hive does not support hierarchical namespaces
assert catalog.list_namespaces(("accounting",)) == []
diff --git a/python/tests/catalog/test_rest.py b/python/tests/catalog/test_rest.py
index 785c350b6c..cff7563ab5 100644
--- a/python/tests/catalog/test_rest.py
+++ b/python/tests/catalog/test_rest.py
@@ -157,7 +157,7 @@ def test_list_namespace_with_parent_200(rest_mock: Mocker):
json={"namespaces": [["tax"]]},
status_code=200,
)
- assert RestCatalog("rest", {}, TEST_URI, token=TEST_TOKEN).list_namespaces(("accounting",)) == [
+ assert RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).list_namespaces(("accounting",)) == [
("accounting", "tax"),
]
diff --git a/python/tests/cli/test_console.py b/python/tests/cli/test_console.py
index a22e9d5c42..659ace6c23 100644
--- a/python/tests/cli/test_console.py
+++ b/python/tests/cli/test_console.py
@@ -94,7 +94,7 @@ class MockCatalog(Catalog):
("default", "bar"),
]
- def list_namespaces(self) -> List[Identifier]:
+ def list_namespaces(self, namespace: Union[str, Identifier] = ()) -> List[Identifier]:
return [("default",), ("personal",)]
def load_namespace_properties(self, namespace: Union[str, Identifier]) -> Properties: