We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9609c4 commit bf9056eCopy full SHA for bf9056e
pylint/checkers/variables.py
@@ -3084,8 +3084,8 @@ def _get_value_length(value_node: nodes.NodeNG) -> int:
3084
if isinstance(value_node, nodes.Subscript):
3085
step = value_node.slice.step or 1
3086
splice_range = value_node.slice.upper.value - value_node.slice.lower.value
3087
- splice_length = int(math.ceil(splice_range / step))
3088
- return splice_length
+ # RUF046 says the return of 'math.ceil' is always an int, mypy doesn't see it
+ return math.ceil(splice_range / step) # type: ignore[no-any-return]
3089
return 1
3090
3091
@staticmethod
0 commit comments