Open ambitious-octopus opened 3 years ago
I am not sure if any of the developers on this project have PyCharm/work with PyCharm. Any chance you can submit a fix for this?
I will work on it!
Great! Looking forward to the fix! Let us know if you have any questions!
Describe the bug
Functions Annotations in the time module create problems with automatic code completion tools such as Pycharm. https://github.com/projectmesa/mesa/blob/2e66e9f70f9b4c58d90654ba590fc011263c483c/mesa/time.py#L85 To Reproduce
Using Pycharm with Kite and reproducing the sample code MoneyModel: When iterating between agents within the scheduler if an attribute or method of an agent is requested, Pycharm will display the "unresolved attribute reference '"method"' for class Agent" error. This is because Pycharm expects an object of the Agent class when it finds an object that inherits from the Agent class but is not an agent object (MoneyAgent). Important: The code works perfectly when running, but autocompletion does not work during editing and Pycharm display errors.