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
I understand this is open source software provided for free and that I might not receive a timely response.
I am positive I am NOT reporting a (potential) security
vulnerability, to the best of my knowledge. (These must be shared by
submitting this report form instead, if
any hesitation exists.)
I am willing to submit a pull request with reporoducers as xfailing test cases or even entire fix. (Assign this issue to me.)
Describe the bug
With pylint 3.3.2, the following comparison-with-callable warning is fired when using propcache'd properties, presumably because although it tries to exclude property decorators, the propcache decorator doesn't look enough like one (doesn't inherit it?) to exclude it.
To Reproduce
With the expression in the latest yarl which uses propcache: url.scheme == "https" and url.host == "github.com"
When running pylint
You get the error: Comparing against a callable, did you omit the parenthesis? : *comparison-with-callable*
Expected behavior
I don't know if this is on you or pylint to fix but I figure it's not reasonable to expect pylint to know about non-standard property decorators. Is there anything you can do on your end to make it look like a regular property decorator to pylint, or do I just need to suppress this check when using
Logs/tracebacks
************* Module deployment_helper
R: 35,0: DeploymentHelper: Too few public methods (1/2) : *too-few-public-methods*
W:182,15: DroneHelper._get_owner_repo: Comparing against a callable, did you omit the parenthesis? : *comparison-with-callable*
W:182,41: DroneHelper._get_owner_repo: Comparing against a callable, did you omit the parenthesis? : *comparison-with-callable*
### Python Version
```console
$ python --version
3.12.1
Ah thanks, I knew I should've searched pylint issues for that "constant" keyword too since I saw it referenced in the problematic looking block of code. Dunno why I missed it. Thanks for looking and feel free to resolve then.
Please confirm the following
vulnerability, to the best of my knowledge. (These must be shared by
submitting this report form instead, if
any hesitation exists.)
Describe the bug
With pylint 3.3.2, the following
comparison-with-callable
warning is fired when using propcache'd properties, presumably because although it tries to exclude property decorators, the propcache decorator doesn't look enough like one (doesn't inherit it?) to exclude it.To Reproduce
yarl
which uses propcache:url.scheme == "https" and url.host == "github.com"
Comparing against a callable, did you omit the parenthesis? : *comparison-with-callable*
Expected behavior
I don't know if this is on you or pylint to fix but I figure it's not reasonable to expect pylint to know about non-standard property decorators. Is there anything you can do on your end to make it look like a regular property decorator to pylint, or do I just need to suppress this check when using
Logs/tracebacks
propcache Version
OS
macOS, Linux
Additional context
https://github.com/pylint-dev/pylint/blob/cb125773cfd83005455ed55d0710e375720b1ff9/pylint/checkers/base/comparison_checker.py#L280 presumably
The text was updated successfully, but these errors were encountered: