From a4c869e0dcea19d3d238a53d34bd992ad068736c Mon Sep 17 00:00:00 2001 From: Hemanth Nakkina Date: Tue, 8 Aug 2023 16:35:25 +0530 Subject: [PATCH] Update pyproject.toml in cookiecutter code black uses information from pyproject.toml. So update the file with relevant information in cookiecutter code. Change-Id: I99c551b735b3fd5f52c9c97a23a4c28fee12868e --- .../pyproject.toml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ops-sunbeam/shared_code/sunbeam_charm/{{cookiecutter.service_name}}/pyproject.toml diff --git a/ops-sunbeam/shared_code/sunbeam_charm/{{cookiecutter.service_name}}/pyproject.toml b/ops-sunbeam/shared_code/sunbeam_charm/{{cookiecutter.service_name}}/pyproject.toml new file mode 100644 index 00000000..30821404 --- /dev/null +++ b/ops-sunbeam/shared_code/sunbeam_charm/{{cookiecutter.service_name}}/pyproject.toml @@ -0,0 +1,39 @@ +# Copyright 2023 Canonical Ltd. +# See LICENSE file for licensing details. + +# Testing tools configuration +[tool.coverage.run] +branch = true + +[tool.coverage.report] +show_missing = true + +[tool.pytest.ini_options] +minversion = "6.0" +log_cli_level = "INFO" + +# Formatting tools configuration +[tool.black] +line-length = 79 + +[tool.isort] +profile = "black" +multi_line_output = 3 +force_grid_wrap = true + +# Linting tools configuration +[tool.flake8] +max-line-length = 79 +max-doc-length = 99 +max-complexity = 10 +exclude = [".git", "__pycache__", ".tox", "build", "dist", "*.egg_info", "venv"] +select = ["E", "W", "F", "C", "N", "R", "D", "H"] +# Ignore W503, E501 because using black creates errors with this +# Ignore D107 Missing docstring in __init__ +ignore = ["W503", "E501", "D107", "E402"] +per-file-ignores = [] +docstring-convention = "google" +# Check for properly formatted copyright header in each file +copyright-check = "True" +copyright-author = "Canonical Ltd." +copyright-regexp = "Copyright\\s\\d{4}([-,]\\d{4})*\\s+%(author)s"