|
69 | 69 |
|
70 | 70 | [tool.setuptools.packages]
|
71 | 71 | find = {exclude = ["ci", "flasher_stub", "test", "docs"]}
|
| 72 | + |
| 73 | +[tool.setuptools.dynamic] |
| 74 | + version = {attr = "esptool.__init__.__version__"} |
| 75 | + |
| 76 | +[tool.commitizen] |
| 77 | + version = "4.7.0" |
| 78 | + update_changelog_on_bump = true |
| 79 | + tag_format = "v$version" |
| 80 | + changelog_start_rev = "v4.2.1" |
| 81 | + changelog_merge_prerelease = true |
| 82 | + annotated_tag = true |
| 83 | + bump_message = "change: Update version to $new_version" |
| 84 | + version_files = [ |
| 85 | + "esptool/__init__.py:__version__" |
| 86 | + ] |
| 87 | + change_type_order = [ |
| 88 | + "BREAKING CHANGE", |
| 89 | + "New Features", |
| 90 | + "Bug Fixes", |
| 91 | + "Code Refactoring", |
| 92 | + "Performance Improvements" |
| 93 | + ] |
| 94 | + |
| 95 | +[tool.commitizen.change_type_map] |
| 96 | + feat = "New Features" |
| 97 | + fix = "Bug Fixes" |
| 98 | + refactor = "Code Refactoring" |
| 99 | + perf = "Performance Improvements" |
| 100 | + |
| 101 | +[tool.codespell] |
| 102 | + skip = '*.bin,*test/images/efuse/*,*docs/en/espefuse/inc/*' |
| 103 | + ignore-words-list = 'bloc,ser,dout,exten' |
| 104 | + write-changes = false |
| 105 | + |
| 106 | +[tool.mypy] |
| 107 | + disallow_incomplete_defs = false # Disallows defining functions with incomplete type annotations |
| 108 | + disallow_untyped_defs = false # Disallows defining functions without type annotations or with incomplete type annotations |
| 109 | + ignore_missing_imports = true # Suppress error messages about imports that cannot be resolved |
| 110 | + python_version = "3.7" # Specifies the Python version used to parse and check the target program |
| 111 | + warn_no_return = true # Shows errors for missing return statements on some execution paths |
| 112 | + warn_return_any = true # Shows a warning when returning a value with type Any from a function declared with a non- Any return type |
| 113 | + |
| 114 | +[tool.ruff] |
| 115 | + # https://docs.astral.sh/ruff/settings/ |
| 116 | + # Exclude a variety of commonly ignored directories. |
| 117 | + exclude = [ |
| 118 | + ".eggs", |
| 119 | + ".git", |
| 120 | + "__pycache__" |
| 121 | + ] |
| 122 | + |
| 123 | + line-length = 88 |
| 124 | + |
| 125 | + select = ['E', 'F', 'W'] |
| 126 | + ignore = ["E203"] |
| 127 | + |
| 128 | + target-version = "py37" |
| 129 | + |
| 130 | +[tool.ruff.lint] |
| 131 | + # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. |
| 132 | + # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or |
| 133 | + # McCabe complexity (`C901`) by default. |
| 134 | + select = ["E4", "E7", "E9", "F"] |
| 135 | + ignore = [] |
| 136 | + |
| 137 | + # Allow fix for all enabled rules (when `--fix`) is provided. |
| 138 | + fixable = ["ALL"] |
| 139 | + unfixable = [] |
| 140 | + |
| 141 | + # Allow unused variables when underscore-prefixed. |
| 142 | + dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" |
| 143 | + |
| 144 | +[tool.ruff.lint.per-file-ignores] |
| 145 | + # tests often manipulate sys.path before importing the main tools, so ignore import order violations |
| 146 | + "test/*.py" = ["E402"] |
| 147 | + |
| 148 | + # multiple spaces after ',' and long lines - used for visual layout of eFuse data |
| 149 | + "espefuse/efuse/*/mem_definition.py" = ["E241", "E501"] |
| 150 | + "espefuse/efuse/*/operations.py" = ["E241", "E501", "F401"] |
| 151 | + "espefuse/efuse/*/fields.py" = ["E241", "E501"] |
| 152 | + |
| 153 | + # ignore long lines - used for RS encoding pairs |
| 154 | + "test/test_modules.py" = ["E501"] |
| 155 | + |
| 156 | + # don't check for unused imports in __init__.py files |
| 157 | + "__init__.py" = ["F401"] |
| 158 | + |
| 159 | + # allow definition from star imports in docs config |
| 160 | + "docs/conf_common.py" = ["F405"] |
| 161 | + |
| 162 | +[tool.ruff.format] |
| 163 | + quote-style = "double" |
| 164 | + indent-style = "space" |
| 165 | + docstring-code-format = true |
0 commit comments