Skip to content

Commit

Permalink
Make sure to infer the arguments to the slice() builtin
Browse files Browse the repository at this point in the history
  • Loading branch information
PCManticore committed Feb 28, 2019
1 parent 9eddca3 commit 2021865
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions astroid/brain/brain_builtin_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ def infer_slice(node, context=None):
raise UseInferenceDefault

infer_func = partial(helpers.safe_infer, context=context)
args = [infer_func(arg) for arg in args]
for arg in args:
if not arg or arg is util.Uninferable:
raise UseInferenceDefault
Expand Down

0 comments on commit 2021865

Please sign in to comment.