openai/openai-python

Public

mirrored from https://github.com/openai/openai-pythonAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.13.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

mypy.ini

47lines · modecode

1[mypy]
2pretty = True
3show_error_codes = True
4
5# Exclude _files.py because mypy isn't smart enough to apply
6# the correct type narrowing and as this is an internal module
7# it's fine to just use Pyright.
8exclude = ^(src/openai/_files\.py|_dev/.*\.py)$
9
10strict_equality = True
11implicit_reexport = True
12check_untyped_defs = True
13no_implicit_optional = True
14
15warn_return_any = True
16warn_unreachable = True
17warn_unused_configs = True
18
19# Turn these options off as it could cause conflicts
20# with the Pyright options.
21warn_unused_ignores = False
22warn_redundant_casts = False
23
24disallow_any_generics = True
25disallow_untyped_defs = True
26disallow_untyped_calls = True
27disallow_subclassing_any = True
28disallow_incomplete_defs = True
29disallow_untyped_decorators = True
30cache_fine_grained = True
31
32# By default, mypy reports an error if you assign a value to the result
33# of a function call that doesn't return anything. We do this in our test
34# cases:
35# ```
36# result = ...
37# assert result is None
38# ```
39# Changing this codegen to make mypy happy would increase complexity
40# and would not be worth it.
41disable_error_code = func-returns-value
42
43# https://github.com/python/mypy/issues/12162
44[mypy.overrides]
45module = "black.files.*"
46ignore_errors = true
47ignore_missing_imports = true
48