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: informing about bad positional argument in node constructor #1984 #1991

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

leshabirukov
Copy link

Patch, proposed in
#1984

Copy link
Collaborator

@justinchuby justinchuby left a comment

Choose a reason for hiding this comment

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

Thanks for the proposal! I would consider creating the check outside of the IR. Here, a lingering None value as the last input is entirely valid.

@leshabirukov
Copy link
Author

About None, - this part must allow None, if my understanding correct:

if self._inputs **and self._inputs[-1]** and not isinstance(self._inputs[-1], (Value)):

(actually, it allows 0.0, and that's bad, needs to change that)

if self._inputs and self._inputs[-1] is not None and not isinstance(self._inputs[-1], (Value)):

About moving check outside, will research, probably after 01.01 :)

@justinchuby
Copy link
Collaborator

I see, you are right. Although this check should still be moved outside for performance reasons. Feel free to propose something, or I can take a look when I get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants