Skip to content

Pylint gets TensorFlow's tf.split all wrong #3613

@bersbersbers

Description

@bersbersbers

Steps to reproduce

import tensorflow as tf
tf.split([0, 0], num_or_size_splits=[1, 1], axis=-1)
print("Done.")

Current behavior

Code runs fine, but

bug.py:3:0: E1123: Unexpected keyword argument 'num_or_size_splits' in function call (unexpected-keyword-arg)
bug.py:3:0: E1124: Argument 'axis' passed by position and keyword in function call (redundant-keyword-arg)
bug.py:3:0: E1120: No value for argument 'value' in function call (no-value-for-parameter)
bug.py:3:0: E1120: No value for argument 'num_split' in function call (no-value-for-parameter)

Expected behavior

Perfect score

pylint --version output

tensorflow 2.2.0
pylint 2.5.2
astroid 2.4.1
Python 3.8.2 (default, Feb 26 2020, 09:52:54) 
[GCC 7.5.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    AstroidRelated to astroidFalse Positive 🦟A message is emitted but nothing is wrong with the codeRegression

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions