AryaKetanShCt commented on PR #42927:
URL: https://github.com/apache/superset/pull/42927#issuecomment-5229599028
Thanks — the `df` finding is correct, and `83f4957` fixes it.
One clarification for the record: the same call fails on `master` today,
because the options go to the operation unchanged. So this pull request does
not add the failure. But the check must still not report such an option as
supported, and it did.
The check now compares against the parameters that a caller can give by
keyword. It excludes the first parameter, which takes the DataFrame
positionally in `operation(df, **options)`, and any positional-only parameter.
```python
keyword_parameters = {
name
for position, (name, parameter) in enumerate(parameters.items())
if position > 0 and parameter.kind is not
inspect.Parameter.POSITIONAL_ONLY
}
```
An option named `df` is now dropped with the same warning as any other
unsupported option, instead of reaching the call.
The commit also adds tests for the three branches that the first commit left
uncovered, which was the codecov report: an option named `df`, an operation
that takes `**kwargs`, and an entry that names no operation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]