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

Fix: format CAST as :: less aggressively #2555

Merged
merged 5 commits into from
May 2, 2024
Merged

Fix: format CAST as :: less aggressively #2555

merged 5 commits into from
May 2, 2024

Conversation

georgesittas
Copy link
Contributor

@georgesittas georgesittas commented May 2, 2024

Fixes #2554

I went with the any approach instead of .. and not args.get("safe") to ensure we there are no future regressions if we were to add new args to Cast.

@georgesittas georgesittas requested a review from tobymao May 2, 2024 20:59
id=faker.uuid4(),
id=str(faker.uuid4()),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI this change was triggered due to a mypy error, probably caused by the latest Faker release.

I verified that the uuid is a string value, but I went ahead and used str here to enforce this instead of t.cast.

>>> import faker
>>> type(faker.Faker().uuid4())
<class 'str'>

@georgesittas georgesittas enabled auto-merge (squash) May 2, 2024 21:41
@georgesittas georgesittas merged commit e6294d9 into main May 2, 2024
14 checks passed
@georgesittas georgesittas deleted the jo/fix_cast branch May 2, 2024 21:45
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.

SQLMesh format converts SAFE_CAST to CAST
2 participants