-
-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathmypy.ini
More file actions
57 lines (47 loc) · 1.65 KB
/
Copy pathmypy.ini
File metadata and controls
57 lines (47 loc) · 1.65 KB
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
# SPDX-License-Identifier: MIT
# Copyright 2024 Beslogic Inc.
# The source skeleton for this configuration can be found at
# https://github.com/BesLogic/shared-configs/blob/main/mypy.ini
# Modifications to this file that are not project-specific should also be done upstream.
# This config file assumes Mypy 2.0+
# https://mypy.readthedocs.io/en/stable/config_file.html
[mypy]
###
# General settings
###
show_column_numbers = true
###
# Strictness flags
# All below are rules and codes not enabled by default even with strict=true
###
strict = true
strict_equality_for_none = true
warn_unreachable = true
; <removed section from upstream>
; We don't run mypy in the CI. This is just to help anyone who would like to use it manually.
; Namely, the mypy_primer tool.
###
# Reduced strictness, where flexibility is preferred
###
allow_redefinition = true
report_deprecated_as_note = true
# Disable this if you want to ensure all your dependencies are typed
follow_untyped_imports = true
# Implicit return types using pyright ! (mypy doesn't do implicit return types)
# Note: mypy still has issues with some boolean inferred returns:
# https://github.com/python/mypy/issues/4409
# https://github.com/python/mypy/issues/10149
# Comment out/remove if not using pyright or implicit types (like for a library)
check_untyped_defs = true
disallow_untyped_calls = false
disallow_untyped_defs = false
disallow_incomplete_defs = false
###
# Specific to this project
###
; exclude mypyc build and PyInstaller dist
exclude = .*(build|dist)/.*
mypy_path = $MYPY_CONFIG_FILE_DIR/typings
; Auto-generated code, not much we can do there
[mypy-gen.*]
disable_error_code = attr-defined, arg-type