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

type annotations edited to fix linting issue #648

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

zilto
Copy link
Collaborator

@zilto zilto commented Jan 18, 2024

Pylance (VSCode linter) would underline the entirety of materializers.

Changes

Elijah found the bug and asked to edit the type annotations of two methods

How I tested this

  • Pylance no longer throws errors after local changes.
  • Reran the test suite (except tests/integrations and tests/plugins) successfully and

@@ -26,7 +26,7 @@ def __new__(cls, name, bases, clsdict):
clsobj.__annotations__ = {}
return clsobj

def __getattr__(cls, item: str) -> "MaterializerFactory":
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to move these classes around too -- I can do that if you're slammed

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm I think we don't -- this is now delayed in evaluation. So long as this doesn't break/complain if you put from __future__ import annotations then it should be fine!

@elijahbenizzy elijahbenizzy merged commit e672bf5 into main Feb 6, 2024
22 checks passed
@elijahbenizzy elijahbenizzy deleted the fix/materialization-linting branch February 6, 2024 04:13
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