-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
115 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Generated from: | ||
# https://github.com/zopefoundation/meta/tree/master/config/pure-python | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
# Allow to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
pre-commit: | ||
name: linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --show-diff-on-failure | ||
env: | ||
PRE_COMMIT_COLOR: always | ||
- uses: pre-commit-ci/[email protected] | ||
if: always() | ||
with: | ||
msg: Apply pre-commit code formatting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,28 @@ | ||
--- | ||
# Generated from: | ||
# https://github.com/zopefoundation/meta/tree/master/config/pure-python | ||
minimum_pre_commit_version: '3.6' | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: fix-encoding-pragma | ||
args: [--remove] | ||
- id: check-yaml | ||
- id: debug-statements | ||
language_version: python3 | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 | ||
language_version: python3 | ||
additional_dependencies: [flake8-typing-imports==1.14.0] | ||
args: ["--per-file-ignores=src/zope/pytestlayer/tests/test_integration.py:E501"] | ||
- repo: https://github.com/hhatto/autopep8 | ||
rev: v2.0.4 | ||
hooks: | ||
- id: autopep8 | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: [--filter-files] | ||
files: \.py$ | ||
- repo: local | ||
hooks: | ||
- id: rst | ||
name: rst | ||
entry: rst-lint --encoding utf-8 | ||
exclude: ./doc/* | ||
# We have Sphinx directives in the docs. This cannot be validated | ||
# here. We therefore include two rst-linter. They complement each | ||
# other. This regex matches all *.rst not in the doc/ folder. | ||
files: ^[^(doc)].*rst | ||
language: python | ||
additional_dependencies: [pygments, restructuredtext_lint] | ||
- repo: https://github.com/rstcheck/rstcheck | ||
rev: 'v6.2.0' | ||
hooks: | ||
- id: rstcheck | ||
args: ["--ignore-messages", 'No directive entry for "autosummary"|No role entry for "ref"|Unknown interpreted text role "ref"|Unknown directive type "(autosummary|literalinclude|toctree)"'] | ||
- repo: https://github.com/pycqa/isort | ||
rev: "5.13.2" | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/hhatto/autopep8 | ||
rev: "v2.3.1" | ||
hooks: | ||
- id: autopep8 | ||
args: [--in-place, --aggressive, --aggressive] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.19.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py39-plus] | ||
- repo: https://github.com/isidentical/teyit | ||
rev: 0.4.3 | ||
hooks: | ||
- id: teyit | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: "7.1.1" | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-debugger == 4.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Generated from: | ||
# https://github.com/zopefoundation/meta/tree/master/config/pure-python | ||
|
||
[build-system] | ||
requires = ["setuptools <= 75.6.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
source = ["zope.pytestlayer"] | ||
|
||
[tool.coverage.report] | ||
fail_under = 98 | ||
precision = 2 | ||
ignore_errors = true | ||
show_missing = true | ||
exclude_lines = ["pragma: no cover", "pragma: nocover", "except ImportError:", "raise NotImplementedError", "if __name__ == '__main__':", "self.fail", "raise AssertionError", "raise unittest.Skip"] | ||
|
||
[tool.coverage.html] | ||
directory = "parts/htmlcov" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters