You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on support for this test in PyCharm, I noticed that it requires highlighting the function signature instead of the decorator (which is how PyCharm currently handles it).
For example:
@staticmethod@overridedefstatic_method1() ->int: # E: no matching signature in ancestorreturn1@classmethod@overridedefclass_method1(cls) ->int: # E: no matching signature in ancestorreturn1
This would be easy to change on our end, but I believe allowing the option to highlight the decorator would be preferable for several reasons:
Highlighting the function signature may overlap with other checks, such as PyCharm inspections or other linters.
If the decorator is removed, the error no longer applies, so highlighting the decorator itself makes sense.
Other conformance tests already allow highlighting decorators. For example:
qualifiers_final_decorator.py
@final# E[func]: not allowed on non-method function.deffunc1() ->int: # E[func]return0
overloads_definitions.py
@overload# E[func2]deffunc2(x: int) ->int: # E[func2]: no implementation
...
If this change makes sense, I’d be happy to submit a PR to update the test.
The text was updated successfully, but these errors were encountered:
The exact placement of errors isn't a strict requirement, and we've mostly done the placement on the basis of the behavior of type checkers we're already testing. If it makes sense to use a different line to show the error I'm happy to allow it.
While working on support for this test in PyCharm, I noticed that it requires highlighting the function signature instead of the decorator (which is how PyCharm currently handles it).
For example:
This would be easy to change on our end, but I believe allowing the option to highlight the decorator would be preferable for several reasons:
If this change makes sense, I’d be happy to submit a PR to update the test.
The text was updated successfully, but these errors were encountered: