Repository navigation
Closed
Labels
bugSomething isn't working
Description
Please confirm the following
- I agree to follow the aio-libs Code of Conduct
- I have checked the current issues for duplicates.
- 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
yarlwhich 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
propcache Version
$ python -m pip show propcache
0.2.1OS
macOS, Linux
Additional context
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
bdraco commentedon Dec 11, 2024
Looks like its related to this issue pylint-dev/pylint#3484
gmishkin commentedon Dec 11, 2024
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.
Dreamsorcerer commentedon Dec 12, 2024
Isn't that issue just because the library wasn't installed? Sounds to me like it should work if propcache is installed while type checking..