Skip to content

Commit

Permalink
Update centrally managed files (#390)
Browse files Browse the repository at this point in the history
* update pyproject.toml

* update pyproject.toml

* update pyproject.toml

* update pyproject.toml

* update pyproject.toml

* update pyproject.toml

* update pyproject.toml

* update pyproject.toml

* update pyproject.toml

* update pyproject.toml

* fix lints

Also switch to flake8-pyproject for consistency

---------

Co-authored-by: soleng-terraform[bot] <168111096+soleng-terraform[bot]@users.noreply.github.com>
Co-authored-by: Samuel Allan <[email protected]>
  • Loading branch information
soleng-terraform[bot] and samuelallan72 authored Feb 20, 2025
1 parent 4e64e28 commit 18da88d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 47 deletions.
97 changes: 52 additions & 45 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,91 +1,98 @@
# This is a template `pyproject.toml` file for ops charms
# This file is managed by bootstack-charms-spec and should not be modified
# within individual charm repos. https://launchpad.net/bootstack-charms-spec
# This file is centrally managed as a template file in https://github.com/canonical/solutions-engineering-automation
# To update the file:
# - Edit it in the canonical/solutions-engineering-automation repository.
# - Open a PR with the changes.
# - When the PR merges, the soleng-terraform bot will open a PR to the target repositories with the changes.

[tool.flake8]
ignore = ["D100", "D101", "D102", "D103", "W503", "W504"]
exclude = ['.eggs', '.git', '.tox', '.venv', '.build', 'lib', 'report']
max-line-length = 99
max-doc-length = 99
max-complexity = 10
exclude = [
".git",
"__pycache__",
".tox",
".build",
"build",
"dist",
".eggs",
"*.egg_info",
"venv",
".venv",
"report",
"docs",
"lib",
]
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 D415 Docstring first line punctuation (doesn't make sense for properties)
# Ignore N818 Exceptions end with "Error" (not all exceptions are errors)
# D100, D101, D102, D103: Ignore missing docstrings in tests
ignore = ["C901", "W503", "E501", "D107", "D415", "N818", "D100", "D101", "D102", "D103", "W504"]
per-file-ignores = ["tests/*:D100,D101,D102,D103,D104"]
# 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"

[tool.black]
line-length = 99
target-version = ["py38", "py310"]
exclude = '''
/(
| .eggs
| .git
| .tox
| .venv
| .build
| build
| lib
| report
| docs
)/
'''

[tool.isort]
profile = "black"
line_length = 99
skip_glob = [
".eggs",
".git",
".tox",
".venv",
".build",
"lib",
"report"
]
skip_glob = [".eggs", ".git", ".tox", ".venv", ".build", "build", "lib", "report"]

[tool.pylint]
max-line-length = 99
ignore-paths = [
".eggs",
".git",
".tox",
".venv",
".build",
"lib",
"report",
"tests",
]
disable = [
"E1102",
]
disable = ["E1102"]
ignore = ['.eggs', '.git', '.tox', '.venv', '.build', 'lib', 'report', 'tests', 'docs']

[tool.mypy]
warn_unused_ignores = true
warn_unused_configs = true
warn_unreachable = true
disallow_untyped_defs = true
ignore_missing_imports = true
exclude = [
".eggs",
".git",
".tox",
".venv",
".build",
"lib",
"report",
"tests",
]
no_namespace_packages = true
exclude = ['.eggs', '.git', '.tox', '.venv', '.build', 'lib', 'report', 'tests', 'docs']

[tool.codespell]
skip = ".eggs,.tox,.git,.venv,venv,build,.build,lib,report,docs,poetry.lock,htmlcov"
quiet-level = 3
check-filenames = true
ignore-words-list = "assertIn"

## Ignore unsupported imports
[[tool.mypy.overrides]]
module = [
"charmhelpers.*"
]
module = ["charmhelpers.*", "setuptools"]
ignore_missing_imports = true

[tool.coverage.run]
relative_files = true
source = ["src"]
omit = ["tests/**", "docs/**", "templates/**"]
source = ["."]
omit = ["tests/**", "docs/**", "lib/**", "snap/**", "build/**", "setup.py"]

[tool.coverage.report]
fail_under = 100
show_missing = true

[tool.coverage.html]
directory = "tests/unit/report/html"
directory = "tests/report/html"

[tool.coverage.xml]
output = "tests/unit/report/coverage.xml"
output = "tests/report/coverage.xml"
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ passenv =

[testenv:lint]
commands =
pflake8
flake8
pylint --recursive=y .
mypy --install-types --non-interactive .
black --check --diff --color .
Expand All @@ -38,7 +38,7 @@ deps =
pylint
mypy
flake8
pyproject-flake8
flake8-pyproject
flake8-docstrings
pep8-naming
flake8-colors
Expand Down

0 comments on commit 18da88d

Please sign in to comment.