Silence pylint arguments-differ for narrowed erf __call__ - #3080
Merged
Merged
Conversation
pylint 4.1.0 (PR #11303) started checking parameter counts of overridden dunder methods, so DPNPErf.__call__ -- which intentionally narrows the base DPNPUnaryFunc signature to (x, out) -- now trips arguments-differ. The narrowing is deliberate, so disable the check on that line.
antonwolfy
requested review from
ndgrigorian and
vlad-perevezentsev
as code owners
September 30, 2026 10:29
vlad-perevezentsev
approved these changes
Sep 30, 2026
vlad-perevezentsev
left a comment
Contributor
There was a problem hiding this comment.
LGTM
Thank you @antonwolfy
Contributor
|
View rendered docs @ https://intelpython.github.io/dpnp/index.html |
Contributor
|
Array API standard conformance tests for dpnp=0.21.0dev11=py314ha0e2e8e_9 ran successfully. |
Collaborator
github-actions Bot
added a commit
that referenced
this pull request
Sep 30, 2026
pylint 4.1.0 started checking the parameter counts of overridden dunder methods (previously all special methods were exempt from `arguments-differ`). `DPNPErf.__call__` intentionally narrows the base `DPNPUnaryFunc.__call__(self, x, /, out=None, *, where, order, dtype, subok, **kwargs)` signature down to `(self, x, /, out=None)`, since erf exposes only `x` and `out`. With the newer pylint this now trips `arguments-differ` (W0221), which fails the `pre-commit` CI check on every PR. This PR adds a targeted `# pylint: disable=arguments-differ` on that method. The narrowing is deliberate API design, so the check is a false alarm relative to intent; the disable is scoped to the single line and changes no runtime behavior. 4e84378
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pylint 4.1.0 started checking the parameter counts of overridden dunder methods (previously all special methods were exempt from
arguments-differ).DPNPErf.__call__intentionally narrows the baseDPNPUnaryFunc.__call__(self, x, /, out=None, *, where, order, dtype, subok, **kwargs)signature down to(self, x, /, out=None), since erf exposes onlyxandout. With the newer pylint this now tripsarguments-differ(W0221), which fails thepre-commitCI check on every PR.This PR adds a targeted
# pylint: disable=arguments-differon that method. The narrowing is deliberate API design, so the check is a false alarm relative to intent; the disable is scoped to the single line and changes no runtime behavior.Checklist