New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restrict the number of errors shown when there are missing stubs #10579
Conversation
When upgrading to mypy 0.900, most projects will see some errors. Projects with strict settings could see thousands of errors, since missing stubs will generate many additional `Any` types. After 200 errors we will only show errors about unresolved imports or missing stubs so that the likely root causes won't be hidden in a high volume of errors.
mypy/errors.py
Outdated
from mypy import errorcodes as codes | ||
from mypy.util import DEFAULT_SOURCE_OFFSET, is_typeshed_file | ||
|
||
T = TypeVar('T') | ||
allowed_duplicates = ['@overload', 'Got:', 'Expected:'] # type: Final | ||
|
||
|
||
# Threshold after which we may filter out most errors to avoid very | ||
# verbose output | ||
MANY_ERRORS_THRESHOLD = 200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be tunable by user (e.g. with a flag). For example, what if the errors are caused by something else (not missing imports). I always prefer to see all the errors especially when working with the PyCharm plugin.
Finally, testing will be simpler when it is tunable.
test-data/unit/check-modules.test
Outdated
certifi.x | ||
certifi.x | ||
certifi.x | ||
certifi.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add couple more tests maybe:
- Checking that new import errors are still shown
- Checking that limit does not apply if there were no import errors
This comment has been minimized.
This comment has been minimized.
Diff from mypy_primer, showing the effect of this PR on open source code: core (https://github.com/home-assistant/core.git)
+ homeassistant/util/color.py:587: note: (Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)
- homeassistant/util/color.py:587: error: Too many arguments for "XYPoint" [call-arg]
- homeassistant/util/color.py:588: error: Too many arguments for "XYPoint" [call-arg]
- homeassistant/util/color.py:598: error: Too many arguments for "XYPoint" [call-arg]
- homeassistant/util/color.py:609: error: Too many arguments for "XYPoint" [call-arg]
- homeassistant/util/color.py:641: error: Too many arguments for "XYPoint" [call-arg]
- homeassistant/util/color.py:642: error: Too many arguments for "XYPoint" [call-arg]
- homeassistant/util/color.py:644: error: Too many arguments for "XYPoint" [call-arg]
- homeassistant/util/color.py:654: error: Too many arguments for "XYPoint" [call-arg]
- homeassistant/util/color.py:655: error: Too many arguments for "XYPoint" [call-arg]
- homeassistant/components/http/static.py:19: error: Class cannot subclass "StaticResource" (has type "Any") [misc]
- homeassistant/util/dt.py:133: error: Returning Any from function declared to return "Optional[datetime]" [no-any-return]
- homeassistant/components/zeroconf/models.py:10: error: Class cannot subclass "Zeroconf" (has type "Any") [misc]
- homeassistant/components/zeroconf/models.py:19: error: Class cannot subclass "AsyncZeroconf" (has type "Any") [misc]
- homeassistant/components/zeroconf/models.py:33: error: Class cannot subclass "ServiceBrowser" (has type "Any") [misc]
- homeassistant/components/http/web_runner.py:11: error: Class cannot subclass "BaseSite" (has type "Any") [misc]
- homeassistant/util/yaml/loader.py:93: error: Class cannot subclass "SafeLoader" (has type "Any") [misc]
- homeassistant/util/__init__.py:87: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/core.py:974: error: Unexpected keyword argument "id" for "Context" [call-arg]
- homeassistant/core.py:974: error: Unexpected keyword argument "user_id" for "Context" [call-arg]
- homeassistant/components/http/view.py:46: error: Unexpected keyword argument "user_id" for "Context" [call-arg]
- homeassistant/components/http/security_filter.py:42: error: Untyped decorator makes function "security_filter_middleware" untyped [misc]
- homeassistant/components/http/request_context.py:18: error: Untyped decorator makes function "request_context_middleware" untyped [misc]
- homeassistant/components/http/forwarded.py:65: error: Untyped decorator makes function "forwarded_middleware" untyped [misc]
- homeassistant/components/http/auth.py:112: error: Untyped decorator makes function "auth_middleware" untyped [misc]
- homeassistant/helpers/device_registry.py:106: error: Unexpected keyword argument "config_entries" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:106: error: Unexpected keyword argument "connections" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:106: error: Unexpected keyword argument "identifiers" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:106: error: Unexpected keyword argument "id" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:106: error: Unexpected keyword argument "is_new" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:279: error: Unexpected keyword argument "is_new" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:461: error: Returning Any from function declared to return "Optional[DeviceEntry]" [no-any-return]
- homeassistant/helpers/device_registry.py:469: error: Unexpected keyword argument "config_entries" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:469: error: Unexpected keyword argument "connections" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:469: error: Unexpected keyword argument "identifiers" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:469: error: Unexpected keyword argument "id" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:469: error: Unexpected keyword argument "orphaned_timestamp" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "config_entries" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "connections" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "identifiers" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "manufacturer" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "model" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "name" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "sw_version" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "entry_type" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "id" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "via_device_id" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "area_id" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "name_by_user" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "disabled_by" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "config_entries" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "connections" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "identifiers" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "manufacturer" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "model" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "name" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "sw_version" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "entry_type" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "id" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "via_device_id" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "area_id" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "name_by_user" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:493: error: Unexpected keyword argument "disabled_by" for "DeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:518: error: Unexpected keyword argument "config_entries" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:518: error: Unexpected keyword argument "connections" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:518: error: Unexpected keyword argument "identifiers" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:518: error: Unexpected keyword argument "id" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:518: error: Unexpected keyword argument "orphaned_timestamp" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:518: error: Unexpected keyword argument "config_entries" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:518: error: Unexpected keyword argument "connections" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:518: error: Unexpected keyword argument "identifiers" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:518: error: Unexpected keyword argument "id" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/device_registry.py:518: error: Unexpected keyword argument "orphaned_timestamp" for "DeletedDeviceEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:111: error: "str" has no attribute "default" [attr-defined]
- homeassistant/helpers/entity_registry.py:111: error: Untyped decorator makes function "_domain_default" untyped [misc]
- homeassistant/helpers/entity_registry.py:480: error: Returning Any from function declared to return "RegistryEntry" [no-any-return]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "entity_id" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "config_entry_id" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "device_id" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "area_id" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "unique_id" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "platform" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "name" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "icon" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "disabled_by" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "capabilities" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "supported_features" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "device_class" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "unit_of_measurement" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "original_name" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:502: error: Unexpected keyword argument "original_icon" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "entity_id" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "config_entry_id" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "device_id" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "area_id" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "unique_id" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "platform" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "disabled_by" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "capabilities" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "supported_features" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "device_class" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "unit_of_measurement" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "original_name" for "RegistryEntry" [call-arg]
- homeassistant/helpers/entity_registry.py:293: error: Unexpected keyword argument "original_icon" for "RegistryEntry" [call-arg]
- homeassistant/helpers/template.py:1358: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/helpers/template.py:1361: error: Class cannot subclass "Undefined" (has type "Any") [misc]
- homeassistant/helpers/template.py:1400: error: Class cannot subclass "ImmutableSandboxedEnvironment" (has type "Any") [misc]
- homeassistant/helpers/area_registry.py:86: error: Unexpected keyword argument "name" for "AreaEntry" [call-arg]
- homeassistant/helpers/area_registry.py:86: error: Unexpected keyword argument "normalized_name" for "AreaEntry" [call-arg]
- homeassistant/helpers/area_registry.py:148: error: Returning Any from function declared to return "AreaEntry" [no-any-return]
- homeassistant/helpers/area_registry.py:159: error: Unexpected keyword argument "name" for "AreaEntry" [call-arg]
- homeassistant/helpers/area_registry.py:159: error: Unexpected keyword argument "id" for "AreaEntry" [call-arg]
- homeassistant/helpers/area_registry.py:159: error: Unexpected keyword argument "normalized_name" for "AreaEntry" [call-arg]
- homeassistant/helpers/event.py:1336: error: Too many arguments for "SunListener" [call-arg]
- homeassistant/helpers/event.py:1350: error: Too many arguments for "SunListener" [call-arg]
- homeassistant/auth/auth_store.py:119: error: Too many arguments for "User" [call-arg]
- homeassistant/auth/auth_store.py:228: error: Too many arguments for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:308: error: Too many arguments for "PermissionLookup" [call-arg]
- homeassistant/auth/auth_store.py:367: error: Unexpected keyword argument "id" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:367: error: Unexpected keyword argument "name" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:367: error: Unexpected keyword argument "policy" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:367: error: Unexpected keyword argument "system_generated" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:412: error: Unexpected keyword argument "name" for "User" [call-arg]
- homeassistant/auth/auth_store.py:412: error: Unexpected keyword argument "groups" for "User" [call-arg]
- homeassistant/auth/auth_store.py:412: error: Unexpected keyword argument "id" for "User" [call-arg]
- homeassistant/auth/auth_store.py:412: error: Unexpected keyword argument "is_owner" for "User" [call-arg]
- homeassistant/auth/auth_store.py:412: error: Unexpected keyword argument "is_active" for "User" [call-arg]
- homeassistant/auth/auth_store.py:412: error: Unexpected keyword argument "system_generated" for "User" [call-arg]
- homeassistant/auth/auth_store.py:412: error: Unexpected keyword argument "perm_lookup" for "User" [call-arg]
- homeassistant/auth/auth_store.py:423: error: Unexpected keyword argument "id" for "Credentials" [call-arg]
- homeassistant/auth/auth_store.py:423: error: Unexpected keyword argument "is_new" for "Credentials" [call-arg]
- homeassistant/auth/auth_store.py:423: error: Unexpected keyword argument "auth_provider_type" for "Credentials" [call-arg]
- homeassistant/auth/auth_store.py:423: error: Unexpected keyword argument "auth_provider_id" for "Credentials" [call-arg]
- homeassistant/auth/auth_store.py:423: error: Unexpected keyword argument "data" for "Credentials" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "id" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "user" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "client_id" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "client_name" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "client_icon" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "token_type" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "created_at" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "access_token_expiration" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "token" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "jwt_key" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "last_used_at" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "last_used_ip" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "credential" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:461: error: Unexpected keyword argument "version" for "RefreshToken" [call-arg]
- homeassistant/auth/auth_store.py:584: error: Unexpected keyword argument "name" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:584: error: Unexpected keyword argument "id" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:584: error: Unexpected keyword argument "policy" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:584: error: Unexpected keyword argument "system_generated" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:594: error: Unexpected keyword argument "name" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:594: error: Unexpected keyword argument "id" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:594: error: Unexpected keyword argument "policy" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:594: error: Unexpected keyword argument "system_generated" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:604: error: Unexpected keyword argument "name" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:604: error: Unexpected keyword argument "id" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:604: error: Unexpected keyword argument "policy" for "Group" [call-arg]
- homeassistant/auth/auth_store.py:604: error: Unexpected keyword argument "system_generated" for "Group" [call-arg]
- homeassistant/auth/providers/__init__.py:93: error: Unexpected keyword argument "auth_provider_type" for "Credentials" [call-arg]
- homeassistant/auth/providers/__init__.py:93: error: Unexpected keyword argument "auth_provider_id" for "Credentials" [call-arg]
- homeassistant/auth/providers/__init__.py:93: error: Unexpected keyword argument "data" for "Credentials" [call-arg]
- homeassistant/auth/__init__.py:461: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/components/websocket_api/connection.py:42: error: Unexpected keyword argument "user_id" for "Context" [call-arg]
- homeassistant/components/http/ban.py:59: error: Untyped decorator makes function "ban_middleware" untyped [misc]
- homeassistant/components/frontend/__init__.py:507: error: Class cannot subclass "AbstractResource" (has type "Any") [misc]
- homeassistant/helpers/condition.py:208: error: Unexpected keyword argument "index" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:208: error: Unexpected keyword argument "total" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:208: error: Unexpected keyword argument "error" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:208: error: Unexpected keyword argument "index" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:208: error: Unexpected keyword argument "total" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:208: error: Unexpected keyword argument "error" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:213: error: Unexpected keyword argument "errors" for "ConditionErrorContainer" [call-arg]
- homeassistant/helpers/condition.py:243: error: Unexpected keyword argument "index" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:243: error: Unexpected keyword argument "total" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:243: error: Unexpected keyword argument "error" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:243: error: Unexpected keyword argument "index" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:243: error: Unexpected keyword argument "total" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:243: error: Unexpected keyword argument "error" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:248: error: Unexpected keyword argument "errors" for "ConditionErrorContainer" [call-arg]
- homeassistant/helpers/condition.py:278: error: Unexpected keyword argument "index" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:278: error: Unexpected keyword argument "total" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:278: error: Unexpected keyword argument "error" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:278: error: Unexpected keyword argument "index" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:278: error: Unexpected keyword argument "total" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:278: error: Unexpected keyword argument "error" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:283: error: Unexpected keyword argument "errors" for "ConditionErrorContainer" [call-arg]
- homeassistant/helpers/condition.py:465: error: Unexpected keyword argument "index" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:465: error: Unexpected keyword argument "total" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:465: error: Unexpected keyword argument "error" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:465: error: Unexpected keyword argument "index" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:465: error: Unexpected keyword argument "total" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:465: error: Unexpected keyword argument "error" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:472: error: Unexpected keyword argument "errors" for "ConditionErrorContainer" [call-arg]
- homeassistant/helpers/condition.py:569: error: Unexpected keyword argument "index" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:569: error: Unexpected keyword argument "total" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:569: error: Unexpected keyword argument "error" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:569: error: Unexpected keyword argument "index" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:569: error: Unexpected keyword argument "total" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:569: error: Unexpected keyword argument "error" for "ConditionErrorIndex" [call-arg]
- homeassistant/helpers/condition.py:576: error: Unexpected keyword argument "errors" for "ConditionErrorContainer" [call-arg]
- homeassistant/helpers/condition.py:881: error: Unexpected keyword argument "errors" for "ConditionErrorContainer" [call-arg]
- homeassistant/util/ruamel_yaml.py:25: error: Class cannot subclass "SafeConstructor" (has type "Any") [misc]
- homeassistant/helpers/network.py:124: error: Returning Any from function declared to return "Optional[str]" [no-any-return]
- homeassistant/helpers/httpx_client.py:39: error: Class cannot subclass "AsyncClient" (has type "Any") [misc]
- homeassistant/components/elgato/light.py:101: error: Returning Any from function declared to return "Optional[int]" [no-any-return]
- homeassistant/components/elgato/light.py:127: error: Returning Any from function declared to return "bool" [no-any-return]
- homeassistant/auth/mfa_modules/notify.py:127: error: Too many arguments for "NotifySetting" [call-arg]
- homeassistant/auth/mfa_modules/notify.py:180: error: Unexpected keyword argument "notify_service" for "NotifySetting" [call-arg]
- homeassistant/auth/mfa_modules/notify.py:180: error: Unexpected keyword argument "target" for "NotifySetting" [call-arg]
- homeassistant/helpers/config_entry_oauth2_flow.py:508: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/helpers/config_entry_oauth2_flow.py:517: error: Returning Any from function declared to return "Optional[Dict[Any, Any]]" [no-any-return]
- homeassistant/components/huawei_lte/__init__.py:274: error: Attribute function "signal_update" with type "Callable[[], None]" does not accept self argument [misc]
- homeassistant/components/huawei_lte/__init__.py:385: error: Too many arguments for "Router" [call-arg]
- homeassistant/components/huawei_lte/__init__.py:481: error: Unexpected keyword argument "hass_config" for "HuaweiLteData" [call-arg]
- homeassistant/components/huawei_lte/__init__.py:481: error: Unexpected keyword argument "config" for "HuaweiLteData" [call-arg]
- homeassistant/components/zeroconf/__init__.py:107: error: Redundant cast to "HaZeroconf" [redundant-cast]
- homeassistant/components/zeroconf/__init__.py:123: error: Redundant cast to "HaZeroconf" [redundant-cast]
- homeassistant/components/huawei_lte/switch.py:36: error: Too many arguments for "HuaweiLteMobileDataSwitch" [call-arg]
- homeassistant/components/huawei_lte/sensor.py:375: error: Too many arguments for "HuaweiLteSensor" [call-arg]
- homeassistant/components/huawei_lte/notify.py:33: error: Too many arguments for "HuaweiLteSmsNotificationService" [call-arg]
- homeassistant/components/huawei_lte/device_tracker.py:90: error: Too many arguments for "HuaweiLteScannerEntity" [call-arg]
- homeassistant/components/huawei_lte/device_tracker.py:156: error: Too many arguments for "HuaweiLteScannerEntity" [call-arg]
- homeassistant/components/huawei_lte/binary_sensor.py:41: error: Too many arguments for "HuaweiLteMobileConnectionBinarySensor" [call-arg]
- homeassistant/components/huawei_lte/binary_sensor.py:42: error: Too many arguments for "HuaweiLteWifiStatusBinarySensor" [call-arg]
- homeassistant/components/huawei_lte/binary_sensor.py:43: error: Too many arguments for "HuaweiLteWifi24ghzStatusBinarySensor" [call-arg]
- homeassistant/components/huawei_lte/binary_sensor.py:44: error: Too many arguments for "HuaweiLteWifi5ghzStatusBinarySensor" [call-arg]
- homeassistant/components/huawei_lte/binary_sensor.py:47: error: Too many arguments for "HuaweiLteSmsStorageFullBinarySensor" [call-arg]
- homeassistant/components/device_tracker/legacy.py:318: error: Too many arguments for "DeviceTrackerPlatform" [call-arg]
- homeassistant/components/camera/__init__.py:147: error: Too many arguments for "Image" [call-arg]
- homeassistant/components/knx/knx_entity.py:25: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/components/knx/weather.py:86: error: Returning Any from function declared to return "Optional[float]" [no-any-return]
- homeassistant/components/knx/weather.py:106: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/components/knx/weather.py:111: error: Returning Any from function declared to return "Optional[float]" [no-any-return]
- homeassistant/components/knx/weather.py:116: error: Returning Any from function declared to return "Optional[int]" [no-any-return]
- homeassistant/components/knx/sensor.py:65: error: Returning Any from function declared to return "Union[None, str, int, float]" [no-any-return]
- homeassistant/components/knx/sensor.py:70: error: Returning Any from function declared to return "Optional[str]" [no-any-return]
- homeassistant/components/knx/sensor.py:77: error: Returning Any from function declared to return "Optional[str]" [no-any-return]
- homeassistant/components/knx/sensor.py:100: error: Returning Any from function declared to return "bool" [no-any-return]
- homeassistant/components/knx/light.py:259: error: Returning Any from function declared to return "Optional[int]" [no-any-return]
- homeassistant/components/knx/light.py:262: error: Returning Any from function declared to return "Optional[int]" [no-any-return]
- homeassistant/components/knx/light.py:275: error: Returning Any from function declared to return "Optional[Tuple[int, int, int]]" [no-any-return]
- homeassistant/components/knx/light.py:284: error: Incompatible return value type (got "Tuple[Any, ...]", expected "Optional[Tuple[int, int, int, int]]") [return-value]
- homeassistant/components/knx/light.py:292: error: Returning Any from function declared to return "Optional[Tuple[float, float]]" [no-any-return]
-``` |
) When upgrading to mypy 0.900, most projects will see some errors about missing stubs. Projects with strict settings could see thousands of errors, since missing stubs will generate many additional Any types. After 200 errors (only if some of them are about imports) we will now only show errors about unresolved imports or missing stubs, so that the likely root causes won't be obscured in a high volume of errors. Fixes #10529.
When upgrading to mypy 0.900, most projects will see some errors about
missing stubs. Projects with strict settings could see thousands of errors,
since missing stubs will generate many additional
Any
types.After 200 errors we will now only show errors about unresolved imports or
missing stubs, so that the likely root causes won't be obscured in a high
volume of errors.
Fixes #10529.