mypy-pycharm icon indicating copy to clipboard operation
mypy-pycharm copied to clipboard

Static methods missing a type definition are highlighted incorrectly

Open dlo opened this issue 7 years ago • 1 comments

Step 1: Are you in the right place?

  • [x] I have verified there are no duplicate active or recent bugs, questions, or requests
  • [x] I have verified that I am using the latest version of the plugin.

Step 2: Describe your environment

  • Plugin version: 0.10.2
  • PyCharm/IDEA version: PyCharm 2018.2
  • Mypy version: 0.620

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

dlo avatar Sep 27 '18 14:09 dlo

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

stale[bot] avatar Nov 27 '18 08:11 stale[bot]