# SPDX-FileCopyrightText: Copyright 2022-2023, Arm Limited and/or its affiliates. # SPDX-FileCopyrightText: Copyright (c) 2012-2022 Jukka Lehtosalo and contributors # SPDX-FileCopyrightText: Copyright (c) 2015-2022 Dropbox, Inc. # SPDX-License-Identifier: Apache-2.0 AND MIT [build-system] requires = [ "setuptools>=42", "wheel", "setuptools_scm[toml]>=6.2" ] build-backend = "setuptools.build_meta" # Enable setuptools_scm [tool.setuptools_scm] [tool.pytest.ini_options] testpaths = "tests" markers = [ "e2e", # e2e tests "install", # installation tests "command", # command tests "model_gen" # model generation tests ] junit_logging = "all" [tool.pylint.messages_control] min-similarity-lines = 10 min-public-methods = 1 max-line-length = 88 max-args = 8 max-attributes = 10 # Provide basic compatibility with black disable = [ "wrong-import-order" ] enable = [ "dangerous-default-value", # W0102 # black will reflow code lines, but won't touch comments, error on those "line-too-long" # C0301 ] [tool.pylint.similarities] ignore-imports = true [tool.mypy] # Suppresses error messages about imports that cannot be resolved ignore_missing_imports = true # Shows a warning when encountering any code inferred to be unreachable or redundant after performing type analysis warn_unreachable = true # Shows errors for missing return statements on some execution paths warn_no_return = true # Shows a warning when returning a value with type Any from a function declared with a non- Any return type warn_return_any = true # Warns about unneeded # type: ignore comments warn_unused_ignores = true # Warns about casting an expression to its inferred type warn_redundant_casts = true # Disallows calling functions without type annotations from functions with type annotations disallow_untyped_calls = true # Disallows defining functions without type annotations or with incomplete type annotations disallow_untyped_defs = true # Disallows defining functions with incomplete type annotations disallow_incomplete_defs = true # Reports an error whenever a function with type annotations is decorated with a decorator without annotations disallow_untyped_decorators = true # Type-checks the interior of functions without type annotations check_untyped_defs = true [[tool.mypy.overrides]] module = [ "pkg_resources", "requests" ] ignore_missing_imports = true [tool.commitizen] # This simply signifies that we want to customize the commitizen configuration name = "cz_customize" # name = "cz_conventional_commits" tag_format = "$version" version_scheme = "semver" version_provider = "scm" update_changelog_on_bump = true [tool.commitizen.customize] # Schema pattern is used by `cz check`, and `tox -e lint` in turn. Builtin CC pattern: # (?s)(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)(\\(\\S+\\))?!?:( [^\\n\\r]+)((\\n\\n.*)|(\\s*))?$ # We customize this slightly by removing types that don't seem relevant now: schema_pattern = "(?s)(build|ci|docs|feat|fix|perf|refactor|style|test)(\\(\\S+\\))?!?:( [A-Z][^\\n\\r]+)((\\n\\n.*)|(\\s*))?$" schema = "(): \n\n\n\n(BREAKING CHANGE: )