leinardi/mypy-pycharm

Static methods missing a type definition are highlighted incorrectly

开放

#19 创建于 2018年9月27日

 (1 条评论) (0 个反应) (0 位负责人)Java (30 个派生)github user discovery
Priority: MediumStatus: AcceptedStatus: StaleType: Bughelp wanted

仓库指标

星标
 (206 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Step 1: Are you in the right place?

  • I have verified there are no duplicate active or recent bugs, questions, or requests
  • 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.

Expected Results:

def should be highlighted.

Relevant Code:

    @staticmethod
    def email_sent_on(obj):
        return obj.created_on

贡献者指南