-
Notifications
You must be signed in to change notification settings - Fork 51
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
refactor: Properly annotate train_test_split
#210
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Another idea would be to remove the |
I think you need to add another overload-ed specification: @overload
def _splitter_train_test(
X: Union[pl.DataFrame, pl.LazyFrame],
test_size: Union[int, float],
eager: bool,
) -> Union[Tuple[pl.DataFrame, pl.DataFrame], Tuple[pl.LazyFrame, pl.LazyFrame]]: ... With that inplace I am not getting any complaint |
yup - I'd also suggest
as that's the default
😄 they're ok, i just don't like if they're overdone (like most things..) |
Where would you add that?
So I need three overload, plus the function body, for one boolean variable argument? |
where you already have |
Oh clear. I didn't really understand where I should do that: only for the parameters that have default values that I am overriding? |
@baggiponte bool is the worst scenario 😂 docs |
docs: add top level module docstring and comment
63a026d
to
6f37d37
Compare
This has been bugging me for a while. Though I can't get rid of one error:
@FBruzzesi have any ideas? (Taking the liberty to tag @MarcoGorelli too, whom I know hates function overloads)