leinardi / mypy-pycharm

A plugin providing both real-time and on-demand scanning of Python files with Mypy from within PyCharm/IDEA.
Apache License 2.0
194 stars 31 forks source link

Static methods missing a type definition are highlighted incorrectly #19

Open dlo opened 6 years ago

dlo commented 6 years ago

Step 1: Are you in the right place?

Step 2: Describe your environment

Step 3: Describe the problem:

Steps to reproduce:

  1. Write a method annotated with @staticmethod.
  2. Run the mypy checker.

Observed Results:

The highlight exposing a missing type definition starts immediately after the staticmethod annotation and ends right before def.

screen shot 2018-09-27 at 9 44 07 am screenshot 2018-09-27 09 45 05

Expected Results:

def should be highlighted.

Relevant Code:

    @staticmethod
    def email_sent_on(obj):
        return obj.created_on
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had activity in the last 60 days.