bito-code-review[bot] commented on code in PR #43396:
URL: https://github.com/apache/superset/pull/43396#discussion_r3832256080
##########
superset/utils/pandas_postprocessing/histogram.py:
##########
@@ -45,6 +54,14 @@ def histogram(
and each column corresponds to a histogram bin. The values are
the counts in each bin.
""" # noqa: E501
+ if not isinstance(bins, int) or not 1 <= bins <= MAX_HISTOGRAM_BINS:
Review Comment:
<!-- Bito Reply -->
The suggestion to include `np.integer` in the type check is a standard
practice for ensuring compatibility with numpy-based numeric types, which are
often used in data processing contexts like this. Since you have confirmed that
`bins` will only ever be a plain integer in this specific implementation, the
current check is locally correct and sufficient for your requirements. You may
choose to ignore the suggestion if you are certain that numpy scalars will not
be passed to this function.
**superset/utils/pandas_postprocessing/histogram.py**
```
+ if not isinstance(bins, int) or not 1 <= bins <= MAX_HISTOGRAM_BINS:
```
--
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]