[mypy]
# --- https://mypy.readthedocs.io/en/stable/config_file.html
# try to keep all under .cache directory
cache_dir = .cache/mypy/
# warn_unused_ignores = True
warn_unused_configs = True
warn_no_return = False

packages=xonsh,xontrib,xompletions

; a regex to exclude certain directories
exclude = ((xonsh/parsers/ply)|(xontrib/(mpl.*py|distributed.py|jedi.py)))

;match dmypy semantics - https://github.com/python/mypy/issues/8046
local_partial_types = True

; since v0.991 implicit optional became True by default.
no_implicit_optional=False


# report
show_error_context = True
show_column_numbers = True
show_error_codes = True
pretty = True

# the __init__ files have dynamic check - ignoring the attribute error. others are generated files
# top level package name only ignores the __init__.py file.
[mypy-xonsh.parser_table,xonsh.completion_parser_table,xonsh.parsers.parser_table.*,xonsh.parsers.completion_parser_table.*,xonsh,xonsh.prompt,xonsh.history,xonsh.completers,xonsh.procs]
ignore_errors = True

# 3rd party libraries that we dont have control over
[mypy-zmq.*,setproctitle,xonsh.parsers.ply.*,winreg.*,pygments.*,importlib_resources.*,nt.*,prompt_toolkit.*,distro.*,conda_suggest.*,_winreg.*]
ignore_missing_imports = True
ignore_errors = True

[tool:pytest]
cache_dir = .cache/pytest
markers =
    news: check changelog unit is valid rst
testpaths =
    tests
