Add pre-commit hooks: check-toml, check-yaml, check-case-conflict, check-docstring-first, end-of-file-fixer, trailing-whitespace

This commit is contained in:
Malcolm Smith 2022-10-20 21:59:36 +01:00
parent 96881f0936
commit d4780b217a
81 changed files with 81 additions and 97 deletions

View file

@ -14,29 +14,27 @@ defaults:
shell: bash
jobs:
beefore:
name: Pre-test checks
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v3.1.2
with:
python-version: ${{ env.min_python_version }}
- uses: pre-commit/action@v3.0.0
docs:
runs-on: ubuntu-latest
strategy:
matrix:
task:
- flake8
# - towncrier-check
- docs
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v3.1.2
with:
python-version: ${{ env.min_python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install tox
- run: tox -e ${{ matrix.task }}
- run: pip install tox
- run: tox -e docs
package:
needs: beefore
needs: [pre-commit, docs]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

11
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-toml
exclude: ^examples/.template/
- id: check-yaml
- id: check-case-conflict
- id: check-docstring-first
- id: end-of-file-fixer
- id: trailing-whitespace

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -41,4 +41,3 @@ if _debug_win32:
return f
else:
DebugLibrary = lambda lib: lib

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](http://beeware.org/contributing) for details.

View file

@ -60,4 +60,3 @@ Initial public release. Includes:
* A GTK+ backend
* A proof-of-concept Win32 backend
* A proof-of-concept iOS backend

View file

@ -5,4 +5,3 @@ Want to see examples of Toga in use? Here's some:
* `Travel Tips <https://itunes.apple.com/au/app/travel-tips/id1336372310>`_ is an app in the iOS App Store that uses Toga to describe it's user interface.
* `Eddington <https://github.com/EddLabs/eddington-gui>`_ is a data fitting tool based on *Toga* and *Briefcase*

View file

@ -1,3 +1,5 @@
FIXME pre-commit
.. _contribute:
=========================

View file

@ -7,4 +7,3 @@ Containers
optioncontainer
scrollcontainer
splitcontainer

View file

@ -140,4 +140,3 @@ Unofficial platform support
===========================
At present, there are no known unofficial platform backends.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -33,4 +33,3 @@ want to contribute code, please `fork the code`_ and `submit a pull request`_.
.. _log them on Github: https://github.com/beeware/toga/issues
.. _fork the code: https://github.com/beeware/toga
.. _submit a pull request: https://github.com/beeware/toga/pulls

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.

View file

@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.
See [CONTRIBUTING to BeeWare](https://beeware.org/contributing/) for details.