Skip to content

Support try/except in partially defined check #13928

Closed

Description

@ilinum

Currently, partially defined check (--enable-error-code partially-defined) does not support detecting partially defined variables try/except statement.

The most basic example is the following:

try:
  x = foo()
except:
  pass
y = x  # mypy should generate an error here but does not.

Activity

  1. ilevkivskyi commented on Dec 9, 2022

    @ilevkivskyi
    Member

    @ilinum What is the situation here? I see there were no activity on the PR last week. We will probably start 1.0 release process in a week or so. I would like to announce this feature in the release, and it would be great if try/except is properly supported.

  2. JukkaL commented on Dec 9, 2022

    @JukkaL
    Collaborator

    I can do another round of review and make some performance measurements.

  3. added a commit that references this issue on Dec 16, 2022
    96ac8b3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions