Skip to content

Fix linter and test failures#5542

Merged
danielcweeks merged 6 commits intoapache:masterfrom
samredai:lint_fixes
Aug 16, 2022
Merged

Fix linter and test failures#5542
danielcweeks merged 6 commits intoapache:masterfrom
samredai:lint_fixes

Conversation

@samredai
Copy link
Contributor

This fixes some of the linter and test failures from the recent merges.

Copy link
Contributor

@kbendick kbendick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @samredai!

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this @samredai! 👏🏻

I'm not seeing the C901 voilations, so I don't think we should add them:

trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check docstring is first.................................................Passed
debug statements (python)................................................Passed
check yaml...............................................................Passed
check python ast.........................................................Passed
black....................................................................Passed
isort....................................................................Passed
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

Collecting types-requests
  Downloading types_requests-2.28.8-py3-none-any.whl (13 kB)
Collecting types-urllib3<1.27
  Downloading types_urllib3-1.26.22-py3-none-any.whl (14 kB)
Installing collected packages: types-urllib3, types-requests
Successfully installed types-requests-2.28.8 types-urllib3-1.26.22
python/tests/catalog/test_rest.py:1[60](https://github.com/apache/iceberg/runs/7849651326?check_suite_focus=true#step:5:61): error: Argument 2 to "RestCatalog" has incompatible type "Dict[<nothing>, <nothing>]"; expected "str"
python/tests/cli/test_console.py:97: error: Signature of "list_namespaces" incompatible with supertype "Catalog"
python/tests/cli/test_console.py:97: note:      Superclass:
python/tests/cli/test_console.py:97: note:          def list_namespaces(self, namespace: Union[str, Tuple[str, ...]] = ...) -> List[Tuple[str, ...]]
python/tests/cli/test_console.py:97: note:      Subclass:
python/tests/cli/test_console.py:97: note:          def list_namespaces(self) -> List[Tuple[str, ...]]
Installing missing stub packages:
/home/runner/.cache/pre-commit/repo1r7mm2an/py_env-python3.8/bin/python -m pip install types-requests


Found 2 errors in 2 files (checked 83 source files)

pycln....................................................................Passed
pyupgrade................................................................Passed
pylint...................................................................Failed
- hook id: pylint
- exit code: 4

************* Module tests.cli.test_console
python/tests/cli/test_console.py:97:4: W0221: Number of parameters was 2 in 'Catalog.list_namespaces' and is now 1 in overridden 'MockCatalog.list_namespaces' method (arguments-differ)

samredai and others added 4 commits August 16, 2022 00:10
Co-authored-by: Fokko Driesprong <fokko@apache.org>
Co-authored-by: Fokko Driesprong <fokko@apache.org>
Co-authored-by: Fokko Driesprong <fokko@apache.org>
Co-authored-by: Fokko Driesprong <fokko@apache.org>
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks @samredai ! 🚀

@danielcweeks danielcweeks merged commit 2a2cf15 into apache:master Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants