You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 30, 2022. It is now read-only.
I seem to be running into what seems an invalid enforcement. Nothing bad seems to happen (choices provided are correct, help string is correct and so on) if we skip the enforcement. So, I'm not sure if this is a bug with consequences I'm not spotting, or is it just a wrong check.
I have a class SqCommand whose class decorator takes a set of arguments that apply to all the subcommands of that class. So SqCommand represents a super command. I then define two subclasses of this SqCommand, lets say super1 and super2. Both their classes take arguments that apply to all subcommands of those two super commands. If I define an argument with the same name, say "state" for both super1 and super2, Nubia complains that I've defined a duplicate of the same variable, "state", This happens around line 161 in nubia/internal/typing/init.py. If I comment out that check, everything seems to work as expected.
I'm attaching a skeleton to explain what I'm seeing as the problem (state is flagged as a duplicate var). I've tried both command_pkgs and get_cmds() methods to register Super1 and Super2 and both have the same issue.
I seem to be running into what seems an invalid enforcement. Nothing bad seems to happen (choices provided are correct, help string is correct and so on) if we skip the enforcement. So, I'm not sure if this is a bug with consequences I'm not spotting, or is it just a wrong check.
I have a class SqCommand whose class decorator takes a set of arguments that apply to all the subcommands of that class. So SqCommand represents a super command. I then define two subclasses of this SqCommand, lets say super1 and super2. Both their classes take arguments that apply to all subcommands of those two super commands. If I define an argument with the same name, say "state" for both super1 and super2, Nubia complains that I've defined a duplicate of the same variable, "state", This happens around line 161 in nubia/internal/typing/init.py. If I comment out that check, everything seems to work as expected.
I'm attaching a skeleton to explain what I'm seeing as the problem (state is flagged as a duplicate var). I've tried both command_pkgs and get_cmds() methods to register Super1 and Super2 and both have the same issue.
Thanks,
Dinesh
The text was updated successfully, but these errors were encountered: