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
Both of these situations generate the same error codes, meaning an ignore for one will ignore the other.
Pitch
I think it would be incredibly useful to people porting legacy code if overrides could be broken down into (at-least) these two types, so they can be triaged and scheduled into sprints accordingly.
When dealing with large legacy projects, these errors are plentiful. While the narrowing of input values for Type Safety needs to be addressed, that need is often secondary to addressing the invocation of a function that uses a wildly different call signature - and has likely missed unit tests and code coverage for several years of API/Library updates.
The text was updated successfully, but these errors were encountered:
Feature
Apologies if I this has been discussed before. I did search the archives for past issues.
I am porting a legacy project to mypy and have run into several issues with LSP that generate a
[override]
error as outlined on https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overridesAs I've been working on this effort, I've noticed two main situations that generate this issue. I'll use the examples on the docs to illustrate
Given:
1- Most problems are due to a narrowing of the argument, as the docs show
2- However, some problems are due to a developer completely breaking the API, such as changing the input variables and types completely:
Both of these situations generate the same error codes, meaning an ignore for one will ignore the other.
Pitch
I think it would be incredibly useful to people porting legacy code if overrides could be broken down into (at-least) these two types, so they can be triaged and scheduled into sprints accordingly.
When dealing with large legacy projects, these errors are plentiful. While the narrowing of input values for Type Safety needs to be addressed, that need is often secondary to addressing the invocation of a function that uses a wildly different call signature - and has likely missed unit tests and code coverage for several years of API/Library updates.
The text was updated successfully, but these errors were encountered: