Skip to content
Snippets Groups Projects
mypy.ini 2.42 KiB
Newer Older
  • Learn to ignore specific revisions
  • namespace_packages = True
    
    plugins = pydantic.mypy, mypy_zope:plugin, scripts-dev/mypy_synapse_plugin.py
    
    follow_imports = normal
    
    check_untyped_defs = True
    show_error_codes = True
    show_traceback = True
    mypy_path = stubs
    
    warn_unused_ignores = True
    
    local_partial_types = True
    
    disallow_untyped_defs = True
    
    strict_equality = True
    
    warn_redundant_casts = True
    
      tests/,
      build_rust.py
    
    
    # Note: Better exclusion syntax coming in mypy > 0.910
    # https://github.com/python/mypy/pull/11329
    #
    # For now, set the (?x) flag enable "verbose" regexes
    # https://docs.python.org/3/library/re.html#re.X
    exclude = (?x)
      ^(
       |synapse/storage/databases/__init__.py
       |synapse/storage/databases/main/cache.py
       |synapse/storage/schema/
       )$
    
    [mypy-synapse.federation.transport.client]
    disallow_untyped_defs = False
    
    
    [mypy-synapse.http.matrixfederationclient]
    disallow_untyped_defs = False
    
    [mypy-synapse.metrics._reactor_metrics]
    
    disallow_untyped_defs = False
    
    # This module imports select.epoll. That exists on Linux, but doesn't on macOS.
    # See https://github.com/matrix-org/synapse/pull/11771.
    warn_unused_ignores = False
    
    
    [mypy-synapse.util.caches.treecache]
    disallow_untyped_defs = False
    
    [mypy-tests.util.caches.test_descriptors]
    disallow_untyped_defs = False
    
    
    ;; Dependencies without annotations
    ;; Before ignoring a module, check to see if type stubs are available.
    ;; The `typeshed` project maintains stubs here:
    ;;     https://github.com/python/typeshed/tree/master/stubs
    ;; and for each package `foo` there's a corresponding `types-foo` package on PyPI,
    
    ;; which we can pull in as a dev dependency by adding to `pyproject.toml`'s
    ;; `[tool.poetry.dev-dependencies]` list.
    
    ignore_missing_imports = True
    
    
    ignore_missing_imports = True
    
    
    ignore_missing_imports = True
    
    
    ignore_missing_imports = True
    
    [mypy-parameterized.*]
    ignore_missing_imports = True
    
    
    ignore_missing_imports = True
    
    
    ignore_missing_imports = True
    
    ignore_missing_imports = True
    
    ignore_missing_imports = True
    
    ignore_missing_imports = True
    
    [mypy-srvlookup.*]
    ignore_missing_imports = True
    
    
    ignore_missing_imports = True
    
    [mypy-incremental.*]
    ignore_missing_imports = True
    
    
    [mypy-setuptools_rust.*]
    ignore_missing_imports = True