Fix linter and test failures#5542
Merged
danielcweeks merged 6 commits intoapache:masterfrom Aug 16, 2022
samredai:lint_fixes
Merged
Fix linter and test failures#5542danielcweeks merged 6 commits intoapache:masterfrom samredai:lint_fixes
danielcweeks merged 6 commits intoapache:masterfrom
samredai:lint_fixes
Conversation
Fokko
reviewed
Aug 16, 2022
Contributor
Fokko
left a comment
There was a problem hiding this comment.
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)
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>
nastra
approved these changes
Aug 16, 2022
danielcweeks
approved these changes
Aug 16, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes some of the linter and test failures from the recent merges.