Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: fix a possibly unbound error in core.cancel(). #2061

Merged
merged 1 commit into from
Jun 11, 2023

Conversation

concretevitamin
Copy link
Member

@concretevitamin concretevitamin commented Jun 9, 2023

Reported by Pylance in vscode.

Related: pyright sky found a ton of errors, a lot of them related to typing errors caused by decorators (pyright is what Pylance uses: https://microsoft.github.io/pyright/#/). The same as my vscode showing tons of warnings/errors. So we can’t integrate in one go into CI.

» pyright sky/core.py                           1 ↵
/Users/zongheng/Dropbox/workspace/riselab/sky-computing/sky/core.py
  /Users/zongheng/Dropbox/workspace/riselab/sky-computing/sky/core.py:167:30 - error: "_Wrapped[(...), Unknown, (*args: Unknown, **kwargs: Unknown), Unknown]" is not iterable
    "__iter__" method not defined (reportGeneralTypeIssues)
  /Users/zongheng/Dropbox/workspace/riselab/sky-computing/sky/core.py:204:32 - error: Expected 0 positional arguments (reportGeneralTypeIssues)
  /Users/zongheng/Dropbox/workspace/riselab/sky-computing/sky/core.py:319:15 - error: "check_features_are_supported" is not a known member of "None" (reportOptionalMemberAccess)
  /Users/zongheng/Dropbox/workspace/riselab/sky-computing/sky/core.py:332:22 - error: Expected 0 positional arguments (reportGeneralTypeIssues)
  /Users/zongheng/Dropbox/workspace/riselab/sky-computing/sky/core.py:364:22 - error: Expected 0 positional arguments (reportGeneralTypeIssues)
  /Users/zongheng/Dropbox/workspace/riselab/sky-computing/sky/core.py:454:15 - error: "check_features_are_supported" is not a known member of "None" (reportOptionalMemberAccess)
  /Users/zongheng/Dropbox/workspace/riselab/sky-computing/sky/core.py:513:60 - error: Expected 0 positional arguments (reportGeneralTypeIssues)
  /Users/zongheng/Dropbox/workspace/riselab/sky-computing/sky/core.py:746:23 - error: No parameter named "refresh" (reportGeneralTypeIssues)
  /Users/zongheng/Dropbox/workspace/riselab/sky-computing/sky/core.py:746:12 - error: Argument missing for parameter "f" (reportGeneralTypeIssues)
  /Users/zongheng/Dropbox/workspace/riselab/sky-computing/sky/core.py:813:9 - error: Expected 0 positional arguments (reportGeneralTypeIssues)
  /Users/zongheng/Dropbox/workspace/riselab/sky-computing/sky/core.py:875:49 - error: Expected 0 positional arguments (reportGeneralTypeIssues)
11 errors, 0 warnings, 0 informations

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: pytest tests/test_smoke.py
    • pytest tests/test_smoke.py --managed-spot
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

@concretevitamin concretevitamin changed the title Core: fix a possibly unbound error in core.cancel(). API: fix a possibly unbound error in core.cancel(). Jun 9, 2023
Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Great catch @concretevitamin! Thanks for fixing it. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants