forked from zulip/zulip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mypy.ini
128 lines (102 loc) · 4.61 KB
/
mypy.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[mypy]
# Logistics of what code to check and how to handle the data.
scripts_are_modules = True
show_traceback = True
# See https://zulip.readthedocs.io/en/latest/testing/mypy.html#mypy-stubs-for-third-party-modules
# for notes on how we manage mypy stubs.
mypy_path = stubs/
cache_dir = var/mypy-cache
# Options to make the checking stricter.
check_untyped_defs = True
disallow_untyped_defs = True
disallow_any_generics = True
warn_no_return = True
no_implicit_optional = True
# Display the codes needed for # type: ignore[code] annotations.
show_error_codes = True
# It's useful to try this occasionally, and keep it clean; but when
# someone fixes a type error we don't want to add a burden for them.
#warn_unused_ignores = True
# We use a lot of third-party libraries we don't have stubs for, as
# well as a handful of our own modules that we haven't told mypy how
# to find. Ignore them. (For some details, see:
# `git log -p -S ignore_missing_imports mypy.ini`.)
#
# This doesn't get in the way of using the stubs we *do* have.
ignore_missing_imports = True
# Warn of unreachable or redundant code.
warn_unreachable = True
#
#
# IGNORE ERRORS
#
#
# We suppress all errors in a handful of files, all of them config files.
[mypy-conf] # For docs/conf.py.
ignore_errors = True
# zerver.tornado.autoreload is a slightly-patched piece of upstream Tornado.
[mypy-zerver.tornado.autoreload]
ignore_errors = True
#
#
# STRICT OPTIONAL
#
#
strict_optional = True
# Various issues
[mypy-zerver.webhooks.gitlab.view]
strict_optional = False
[mypy-zerver.views.realm] # Other issues in this file too
strict_optional = False
# One change required?
[mypy-zilencer.management.commands.add_new_realm] #22: error: List item 0 has incompatible type "Optional[Stream]"; expected "Stream"
strict_optional = False
# Re-architecting required?
[mypy-zerver.lib.queue] # Delayed setup of SimpleQueueClient.channel (Optional)
strict_optional = False
[mypy-zerver/management/commands/purge_queue] #24: error: Item "None" of "Optional[Any]" has no attribute "queue_purge"
strict_optional = False
# Tests (may be many issues in file; comment is just one error noted)
[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_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_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_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
# General exclusions to work on
[mypy-zerver.lib.test_helpers]
strict_optional = False
[mypy-zerver.lib.test_classes]
strict_optional = False
[mypy-zerver.tornado.event_queue]
strict_optional = False
[mypy-zerver.lib.outgoing_webhook]
strict_optional = False
[mypy-zerver.lib.bugdown] # for __init__.py
strict_optional = False
[mypy-zerver.lib.push_notifications]
strict_optional = False
[mypy-zerver.worker.queue_processors]
strict_optional = False
[mypy-zerver.views.registration]
strict_optional = False
[mypy-tools.lib.html_branches]
strict_optional = False
[mypy-zthumbor.loaders.helpers]
strict_optional = False