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

Pyright failures with 1.1.309 #284

Closed
tsibley opened this issue May 25, 2023 · 0 comments
Closed

Pyright failures with 1.1.309 #284

tsibley opened this issue May 25, 2023 · 0 comments
Assignees

Comments

@tsibley
Copy link
Member

tsibley commented May 25, 2023

On master (8ed366e)

$ npx pyright@1.1.308
Need to install the following packages:
  pyright@1.1.308
Ok to proceed? (y) y
0 errors, 0 warnings, 0 informations 

$ npx pyright@1.1.309
Need to install the following packages:
  pyright@1.1.309
Ok to proceed? (y) y
/home/tom/nextstrain/cli/nextstrain/cli/remote/s3.py
  /home/tom/nextstrain/cli/nextstrain/cli/remote/s3.py:213:39 - error: Cannot access member "Bucket" for type "_"
    Member "Bucket" is unknown (reportGeneralTypeIssues)
/home/tom/nextstrain/cli/nextstrain/cli/runner/aws_batch/s3.py
  /home/tom/nextstrain/cli/nextstrain/cli/runner/aws_batch/s3.py:208:26 - error: "client" is not a known member of "None" (reportOptionalMemberAccess)
  /home/tom/nextstrain/cli/nextstrain/cli/runner/aws_batch/s3.py:212:24 - error: Cannot access member "Bucket" for type "_"
    Member "Bucket" is unknown (reportGeneralTypeIssues)
3 errors, 0 warnings, 0 informations 

1.1.309 was released last week, and we likely didn't notice failures due to existing failing CI.

@tsibley tsibley self-assigned this May 25, 2023
tsibley added a commit that referenced this issue May 25, 2023
Without these type stubs, new failures related to these libraries are
raised by Pyright starting with 1.1.309:

    …/nextstrain/cli/remote/s3.py
      …/nextstrain/cli/remote/s3.py:213:39 - error: Cannot access member "Bucket" for type "_"
        Member "Bucket" is unknown (reportGeneralTypeIssues)
    …/nextstrain/cli/runner/aws_batch/s3.py
      …/nextstrain/cli/runner/aws_batch/s3.py:208:26 - error: "client" is not a known member of "None" (reportOptionalMemberAccess)
      …/nextstrain/cli/runner/aws_batch/s3.py:212:24 - error: Cannot access member "Bucket" for type "_"
        Member "Bucket" is unknown (reportGeneralTypeIssues)
    3 errors, 0 warnings, 0 informations

With these type stubs, those failures are resolved, but different
failures are raised:

    …/nextstrain/cli/remote/s3.py
      …/nextstrain/cli/remote/s3.py:251:23 - error: Could not access item in TypedDict
        "Error" is not a required key in "_ClientErrorResponseTypeDef", so access may result in runtime exception (reportTypedDictNotRequiredAccess)
      …/nextstrain/cli/remote/s3.py:251:23 - error: Could not access item in TypedDict
        "Code" is not a required key in "_ClientErrorResponseError", so access may result in runtime exception (reportTypedDictNotRequiredAccess)
    2 errors, 0 warnings, 0 informations

All failures are fixed in this commit.

Resolves: <#284>
tsibley added a commit that referenced this issue May 25, 2023
Without these type stubs, new failures related to these libraries are
raised by Pyright starting with 1.1.309:

    …/nextstrain/cli/remote/s3.py
      …/nextstrain/cli/remote/s3.py:213:39 - error: Cannot access member "Bucket" for type "_"
        Member "Bucket" is unknown (reportGeneralTypeIssues)
    …/nextstrain/cli/runner/aws_batch/s3.py
      …/nextstrain/cli/runner/aws_batch/s3.py:208:26 - error: "client" is not a known member of "None" (reportOptionalMemberAccess)
      …/nextstrain/cli/runner/aws_batch/s3.py:212:24 - error: Cannot access member "Bucket" for type "_"
        Member "Bucket" is unknown (reportGeneralTypeIssues)
    3 errors, 0 warnings, 0 informations

With these type stubs, those failures are resolved, but different
failures are raised:

    …/nextstrain/cli/remote/s3.py
      …/nextstrain/cli/remote/s3.py:251:23 - error: Could not access item in TypedDict
        "Error" is not a required key in "_ClientErrorResponseTypeDef", so access may result in runtime exception (reportTypedDictNotRequiredAccess)
      …/nextstrain/cli/remote/s3.py:251:23 - error: Could not access item in TypedDict
        "Code" is not a required key in "_ClientErrorResponseError", so access may result in runtime exception (reportTypedDictNotRequiredAccess)
    2 errors, 0 warnings, 0 informations

All failures are fixed in this commit.

Resolves: <#284>
@tsibley tsibley closed this as completed May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant