blob: b3e3bb8c5c55b3631516cf107f29cf0e542af42a [file] [log] [blame]
# Copyright 2023 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
[tool.black]
# Following the Google Python style guide, we set the maximum line length
# to 80 characters. See: https://google.github.io/styleguide/pyguide.html#32-line-length
line-length = 80
target-version = ['py311']
include = '\.pyi?$'
exclude = '''
# Start regex with a forward slash so that black will only ignore these files
# if they're in the root of the repo.
^/(
(
\.jiri_root
| out
| third_party
| prebuilt
| __pycache__
)
)
'''
[tool.isort]
profile = "black"
line_length = 80
default_section="FIRSTPARTY"
skip_glob = ["**/.venvs/*", "**/third_party/*", "**/*.pyz", "out/*"]
[tool.mypy]
strict = true
pretty = true
# We need to ignore missing imports since some of our source code dependencies
# reside in the 'third_party' directory, which may not always be in python path.
ignore_missing_imports = true
# TODO(b/324270220): Temporarily disable this flag to ease the transition to
# type checking. Re enable this flag for stricter checking in the future.
warn_return_any = false
# TODO(b/331504010): Address subclass Type Errors in Tests
# To handle `error: Class cannot subclass "FuchsiaBaseTest" (has type "Any") [misc]`
# More info @ https://github.com/python/mypy/issues/9318
disallow_subclassing_any = false
# Allow decorators, calls without type annotations since some of our packages
# don't have type annotations.
allow_untyped_decorators = true
allow_untyped_calls = true
# 'yaml' module imports aren't working with the global
# 'ignore_missing_imports' flag. Overriding using overridesr entry.
[[tool.mypy.overrides]]
module = "yaml"
ignore_missing_imports = true