lugensa / scorched

Sunburnt offspring solr client
MIT License
27 stars 19 forks source link

Adds hinting for list objects to the add method #35

Open mlissner opened 7 years ago

mlissner commented 7 years ago

This change makes it so that the method docstring supports either lists or dicts. I ran into this issue when Intellij was unhappy because I was passing a list to the add method instead of a dict, as the method requested.

This fixes the linting issue in my IDE, and apparently, there's no standard on this (yet), so it should be a decent way to proceed. Here's the documentation for Intellij and PyCharm, where they describe the syntax that they prefer (they're usually pretty sane about these things):

https://www.jetbrains.com/help/pycharm/2016.1/type-hinting-in-pycharm.html#legacy

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 95.369% when pulling d0c720e35c89da1ce2b94589b835b21e2d3dc42a on mlissner:patch-1 into 607573095b82655f62f0bf587ac02132c9404ad3 on lugensa:master.

mlissner commented 3 years ago

This is a very small tweak to the type hints that should be ready to land.