Skip to content

Comments

Fix mypy plugin crashes by defaulting types to Any when internal assertions fail#567

Merged
gpauloski merged 1 commit intomainfrom
issue-559
May 1, 2024
Merged

Fix mypy plugin crashes by defaulting types to Any when internal assertions fail#567
gpauloski merged 1 commit intomainfrom
issue-559

Conversation

@gpauloski
Copy link
Collaborator

Description

Fix mypy plugin crashses by defaulting types to Any when internal assertions fail.

Fixes

Type of Change

  • Breaking Change (fix or enhancement which changes existing semantics of the public interface)
  • Enhancement (new features or improvements to existing functionality)
  • Bug (fixes for a bug or issue)
  • Internal (refactoring, style changes, testing, optimizations)
  • Documentation update (changes to documentation or examples)
  • Package (dependencies, versions, package metadata)
  • Development (CI workflows, pre-commit, linters, templates)
  • Security (security related changes)

Testing

Added new tests, and verified the example in #559 no longer crashes and instead raises the correct (expected) errors.

Pull Request Checklist

Please confirm the PR meets the following requirements.

  • Tags added to PR (e.g., breaking, bug, enhancement, internal, documentation, package, development, security).
  • Code changes pass pre-commit (e.g., mypy, ruff, etc.).
  • Tests have been added to show the fix is effective or that the new feature works.
  • New and existing unit tests pass locally with the changes.
  • Docs have been updated and reviewed if relevant.

@gpauloski gpauloski added the bug Error, flaw, or fault that causes unexpected behavior label May 1, 2024
@gpauloski gpauloski changed the title Fix mypy plugin crashses by defaulting types to Any when internal assertions fail Fix mypy plugin crashes by defaulting types to Any when internal assertions fail May 1, 2024
@gpauloski gpauloski merged commit ff70cde into main May 1, 2024
@gpauloski gpauloski deleted the issue-559 branch May 1, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Error, flaw, or fault that causes unexpected behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mypy plugin crashes on an assertion error

1 participant