python-language-server icon indicating copy to clipboard operation
python-language-server copied to clipboard

Python Linter doesn't recognize that invalid data is being passed to a function

Open DonJayamanne opened this issue 6 years ago • 3 comments

@rchiodo commented on Tue Apr 16 2019

I have a function defined like so:

def verify_dataframe_info(vars, name: str, capsys, hasInfo: bool):

And I had code like so:

verify_dataframe_info(vars, 'se', capsys, true)

The 'true' value should be 'True'

Linter didn't recognize this mistake.

DonJayamanne avatar May 16 '19 01:05 DonJayamanne

There is only linter for undefined variables. No code that would check type mismatch.

MikhailArkhipov avatar May 16 '19 04:05 MikhailArkhipov

I'm assuming this would then count as a feature enhancement? Please feel free to close this issue (created internally by our team)

DonJayamanne avatar May 16 '19 05:05 DonJayamanne

Of course it is, just saying its not a bug :-)

MikhailArkhipov avatar May 16 '19 16:05 MikhailArkhipov