Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

weak warning in PyCharm: Unexpected argument

This inspection reports discrepancies between declared parameters and actual arguments, as well as incorrect arguments (e.g. duplicate named arguments) and incorrect argument order. Decorators are analyzed, too.

^That's what PyCharm is telling me. It's a weak warning, so my code runs fine.

import collections
var_dict = {}
var_dict = collections.OrderedDict(sorted(var_dict.items()))

^This is the line of code in question. I believe the warning has to do with the OrderedDict call.

I checked the OrderedDict documentation for Python 3.5, but I'm still nonplussed.

Why am I getting this warning? I'm using PyCharm Community Edition 5.0.1

like image 512
michen00 Avatar asked Nov 16 '15 15:11

michen00


1 Answers

I posted an issue - having similar warnings in Python 2. I believe it's a bug in their inspection (in PyCharm 5), but let's see how they respond.

To moderators: this is a valid answer as recognized by the OP. It is not a "comment". Please read carefully before deleting.

like image 140
Mr_and_Mrs_D Avatar answered Sep 23 '22 07:09

Mr_and_Mrs_D