Skip to content

Commit

Permalink
mypy.ini: Expand tests wildcard from strict-optional into files list.
Browse files Browse the repository at this point in the history
  • Loading branch information
neiljp authored and timabbott committed Mar 25, 2018
1 parent ac09687 commit 8810245
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,45 @@ strict_optional = False
[mypy-zerver.tornado.descriptors] # line 10: 'get' can return None; only used in zerver/tornado/handlers?
strict_optional = False

# General exclusions to work on
# Tests (may be many issues in file; comment is just one error noted)

[mypy-zerver.tests.*]
[mypy-zerver/tests/test_tornado] #202: error: Item "None" of "Optional[Morsel[Any]]" has no attribute "coded_value"
strict_optional = False
[mypy-zerver/tests/test_slack_importer] #70: error: Argument 1 to "MockResponse" has incompatible type "None"; expected "Dict[str, Any]"
strict_optional = False
[mypy-zerver/tests/test_service_bot_system] #312: error: Argument 1 to "set_bot_config" has incompatible type "Optional[UserProfile]"; expected "UserProfile"
strict_optional = False
[mypy-zerver/tests/test_outgoing_webhook_system] #33: error: Argument 1 to "MockServiceHandler" has incompatible type "None"; expected "str"
strict_optional = False
[mypy-zerver/tests/test_outgoing_webhook_interfaces] #22: error: Argument "user_profile" to "GenericOutgoingWebhookService" has incompatible type "None"; expected "UserProfile"
strict_optional = False
[mypy-zerver/tests/test_narrow] #515: error: Incompatible types in assignment (expression has type "None", variable has type "int")
strict_optional = False
[mypy-zerver/tests/test_logging_handlers] #73: error: Argument 7 to "makeRecord" of "Logger" has incompatible type "Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]"; expected "Union[Tuple[type, BaseException, TracebackType], Tuple[None, None, None], None]"
strict_optional = False
[mypy-zerver/tests/test_link_embed] #53: error: Value of type "Optional[Dict[Any, Any]]" is not indexable
strict_optional = False
[mypy-zerver/tests/test_embedded_bot_system] #26: error: Item "None" of "Optional[UserProfile]" has no attribute "email"
strict_optional = False
[mypy-zerver/tests/test_decorators] #1322: error: Item "None" of "Optional[Match[str]]" has no attribute "groupdict"
strict_optional = False
[mypy-zerver/tests/test_auth_backends] #2079: error: Incompatible types in assignment (expression has type "Optional[UserProfile]", variable has type "UserProfile")
strict_optional = False
[mypy-zerver/tests/test_subs] #2916: error: Item "None" of "Optional[Subscription]" has no attribute "recipient"
strict_optional = False
[mypy-zerver/tests/test_signup] #1954: error: Item "None" of "Optional[Match[Any]]" has no attribute "groups"
strict_optional = False
[mypy-zerver/tests/test_realm] #191: error: Item "None" of "Optional[Stream]" has no attribute "id"
strict_optional = False
[mypy-zerver/tests/test_messages] #3070: error: Incompatible types in assignment (expression has type "None", variable has type "int")
strict_optional = False
[mypy-zerver/tests/test_events] #1365: error: Argument 2 to "do_set_realm_notifications_stream" has incompatible type "Optional[Stream]"; expected "Stream"
strict_optional = False
[mypy-zerver/tests/test_docs] #131: error: Argument 1 to "isfile" has incompatible type "Optional[str]"; expected "Union[bytes, str]"
strict_optional = False

# General exclusions to work on

[mypy-zerver.lib.test_helpers]
strict_optional = False
[mypy-zerver.lib.test_classes]
Expand Down

0 comments on commit 8810245

Please sign in to comment.