beartype / pytest-beartype

A pytest plugin to automatically run `beartype` on your test cases.
MIT License
9 stars 1 forks source link

feat: `--beartype-skip-packages` #9

Closed tusharsadhwani closed 5 days ago

tusharsadhwani commented 2 months ago

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

leycec commented 2 months ago

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: :turkey:

tusharsadhwani commented 2 months ago

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

leycec commented 2 months ago

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)

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

leycec commented 2 months ago

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. :smile:

tusharsadhwani commented 2 months ago

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

tusharsadhwani commented 5 days ago

oh right, i can ship this now.