| [build-system] |
| requires = [ |
| # NOTE: this needs to be kept in sync with mypy-requirements.txt |
| # and build-requirements.txt, because those are both needed for |
| # self-typechecking :/ |
| "setuptools >= 40.6.2", |
| "wheel >= 0.30.0", |
| # the following is from mypy-requirements.txt |
| "typing_extensions>=4.1.0", |
| "mypy_extensions>=1.0.0", |
| "typed_ast>=1.4.0,<2; python_version<'3.8'", |
| "tomli>=1.1.0; python_version<'3.11'", |
| # the following is from build-requirements.txt |
| "types-psutil", |
| "types-setuptools", |
| "types-typed-ast>=1.5.8.5,<1.6.0", |
| ] |
| build-backend = "setuptools.build_meta" |
| |
| [tool.black] |
| line-length = 99 |
| target-version = ["py37", "py38", "py39", "py310", "py311"] |
| skip-magic-trailing-comma = true |
| force-exclude = ''' |
| ^/mypy/typeshed| |
| ^/mypyc/test-data| |
| ^/test-data |
| ''' |
| |
| [tool.isort] |
| py_version = 37 |
| profile = "black" |
| line_length = 99 |
| combine_as_imports = true |
| skip_gitignore = true |
| extra_standard_library = ["typing_extensions"] |
| skip_glob = [ |
| "mypy/typeshed/*", |
| "mypyc/test-data/*", |
| "test-data/*", |
| ] |
| |
| [tool.ruff] |
| line-length = 99 |
| target-version = "py37" |
| |
| select = [ |
| "E", # pycoderstyle (error) |
| "F", # pyflakes |
| "B", # flake8-bugbear |
| "RUF100", # Unused noqa comments |
| "PGH004" # blanket noqa comments |
| ] |
| |
| ignore = [ |
| "B006", # use of mutable defaults in function signatures |
| "B007", # Loop control variable not used within the loop body. |
| "B011", # Don't use assert False |
| "B023", # Function definition does not bind loop variable |
| "E203", # conflicts with black |
| "E402", # module level import not at top of file |
| "E501", # conflicts with black |
| "E731", # Do not assign a `lambda` expression, use a `def` |
| "E741", # Ambiguous variable name |
| ] |
| |
| extend-exclude = [ |
| "@*", |
| # Sphinx configuration is irrelevant |
| "docs/source/conf.py", |
| "mypyc/doc/conf.py", |
| # tests have more relaxed styling requirements |
| # fixtures have their own .pyi-specific configuration |
| "test-data/*", |
| "mypyc/test-data/*", |
| # typeshed has its own .pyi-specific configuration |
| "mypy/typeshed/*", |
| ] |