-
Notifications
You must be signed in to change notification settings - Fork 67
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 flake8 #178
Fix flake8 #178
Conversation
from discopy.grammar import thue | ||
from discopy.rigid import Ob | ||
from discopy.rigid import Ob # noqa: F401 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid this # noqa F401 by adding Ob
to adding an __all__
variable to the module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case we really want the unused import because e.g. lambeq uses from discopy.grammar.pregroup import Ob
discopy/symmetric.py
Outdated
from discopy.cat import factory | ||
from discopy.monoidal import Ob, Ty, PRO | ||
from discopy.monoidal import Ty, PRO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say as a rule of thumb it's nice if every module has it's own Ob
even when it's just imported from another. In that way you can from discopy.symmetric import *
and you get Ob
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff! Let's take care of this pregroup.Ob
business (because it might break lambeq) then we can merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.