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
Since expression and comparator are contained within the property, I can't simply use --classmethod-decorators=expression,comparator to turn off warnings for them. I need to explicitly use NOQA: N805 each time.
It'll be nice if classmethod-decorators accepted a pattern instead of a symbol name.
The text was updated successfully, but these errors were encountered:
jace
changed the title
Classmethod decorators as properties of other attributes
Classmethod decorators may not be standalone
Jul 10, 2019
This would be really useful to have. Right now I have no choice but disabling N805 because honestly, adding noqa for almost 50 sqlalchemy hybrid property expression functions would be way too much noise...
How quickly would this make it into a release if I were to submit a PR for it?
So while looking into how to implement this I realized that only the last segment in case of dotted decorator name is used. So this works fine in an application that uses SQLAlchemy hybrids:
I have a related problem to #38: SQLAlchemy has a
hybrid_property
module that allows declaring a property distinctly for the instance and the class:Since
expression
andcomparator
are contained within the property, I can't simply use--classmethod-decorators=expression,comparator
to turn off warnings for them. I need to explicitly useNOQA: N805
each time.It'll be nice if
classmethod-decorators
accepted a pattern instead of a symbol name.The text was updated successfully, but these errors were encountered: