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

feat: --beartype-skip-packages #9

Merged
merged 5 commits into from
Oct 31, 2024
Merged

feat: --beartype-skip-packages #9

merged 5 commits into from
Oct 31, 2024

Conversation

tusharsadhwani
Copy link
Collaborator

This should work, all that's left is to actually verify if it does or not.

@leycec
Copy link
Member

leycec commented Aug 17, 2024

Brilliant! I rejoice to know you. This is me awkwardly saying...

You're amazing.

srsly. I meant to give you a detailed writeup integrating this BeartypeConf.claw_skip_package_names black magic with the pytest CLI. But I guess you got there first and just reverse-engineered all of this mostly undocumented madness without me. If I had money, I'd hire you to do stuff. Lots of stuff.

Sadly, I have no money. I can only thank you. Please accept this ceremonial Canadian turkey: 🦃

@tusharsadhwani
Copy link
Collaborator Author

I'll probably have to wait until this arg has been released on PyPI. Will it be part of 0.19?

@leycec
Copy link
Member

leycec commented Aug 17, 2024

Testing! Forgot about that. Testing is... cumbersome. Here's what @beartype's test suite does:

# Assert that a PEP 526-compliant assignment statement assigning an object
# violating the type hint annotating that statement raises *NO* exception.
this_should_fail_but_doesnt: str = b'Totally not a string, but nobody cares.'
assert isinstance(this_should_fail_but_doesnt, bytes)
  • Skip that skippable_submodule.py by passing an option resembling --beartype-skip-packages='skippable_submodule'. Maybe? No idea.
  • Pray that tox passes. Pray harder than you have ever prayed.

Thanks again being so awesome, @tusharsadhwani. Kali herself surely shines upon you.

@leycec
Copy link
Member

leycec commented Aug 17, 2024

I'll probably have to wait until this arg has been released on PyPI. Will it be part of 0.19?

Totally. 0.19.0 is the plan. Alternately, users could be forced to install the live @beartype if they really want this. I am fine with forcing users to do stuff they don't want to do. Let them eat git!

Totally up to you. Thanks so much yet again. I get the sinking feeling I'd better start hacking on 0.19 a lot harder. 😄

@tusharsadhwani
Copy link
Collaborator Author

You already hack at an incredible pace. There's no need to worry.

@tusharsadhwani
Copy link
Collaborator Author

oh right, i can ship this now.

@tusharsadhwani tusharsadhwani merged commit e6bf380 into main Oct 31, 2024
5 checks passed
@tusharsadhwani tusharsadhwani deleted the skip-packages branch October 31, 2024 17:52
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