Skip to content

Silence pylint arguments-differ for narrowed erf __call__ - #3080

Merged
antonwolfy merged 1 commit into
masterfrom
fix-erf-arguments-differ
Sep 30, 2026
Merged

antonwolfy merged 1 commit into
masterfrom
fix-erf-arguments-differ

Conversation

@antonwolfy

Copy link
Copy Markdown
Contributor

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.

Checklist

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

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.

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thank you @antonwolfy

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/index.html

@github-actions

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev11=py314ha0e2e8e_9 ran successfully.
Passed: 1376
Failed: 0
Skipped: 6

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 78.609%. remained the same — fix-erf-arguments-differ into master

@antonwolfy
antonwolfy merged commit 4e84378 into master Sep 30, 2026
112 of 113 checks passed
@antonwolfy
antonwolfy deleted the fix-erf-arguments-differ branch September 30, 2026 12:18
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants