Skip to content

Commit d4780b2

Browse files
committed
Add pre-commit hooks: check-toml, check-yaml, check-case-conflict, check-docstring-first, end-of-file-fixer, trailing-whitespace
1 parent 96881f0 commit d4780b2

File tree

81 files changed

+81
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+81
-97
lines changed

.coveragerc

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ source =
1515
show_missing = True
1616
exclude_lines =
1717
pragma: no cover
18-
@(abc\.)?abstractmethod
18+
@(abc\.)?abstractmethod

.github/workflows/ci.yml

+13-15
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,27 @@ defaults:
1414
shell: bash
1515

1616
jobs:
17-
beefore:
18-
name: Pre-test checks
17+
pre-commit:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v1
21+
- uses: actions/[email protected]
22+
with:
23+
python-version: ${{ env.min_python_version }}
24+
- uses: pre-commit/[email protected]
25+
26+
docs:
1927
runs-on: ubuntu-latest
20-
strategy:
21-
matrix:
22-
task:
23-
- flake8
24-
# - towncrier-check
25-
- docs
2628
steps:
2729
- uses: actions/checkout@v1
2830
- uses: actions/[email protected]
2931
with:
3032
python-version: ${{ env.min_python_version }}
31-
- name: Install dependencies
32-
run: |
33-
python -m pip install --upgrade pip
34-
python -m pip install --upgrade setuptools
35-
python -m pip install tox
36-
- run: tox -e ${{ matrix.task }}
33+
- run: pip install tox
34+
- run: tox -e docs
3735

3836
package:
39-
needs: beefore
37+
needs: [pre-commit, docs]
4038
runs-on: ubuntu-latest
4139
steps:
4240
- uses: actions/checkout@v1

.pre-commit-config.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.3.0
4+
hooks:
5+
- id: check-toml
6+
exclude: ^examples/.template/
7+
- id: check-yaml
8+
- id: check-case-conflict
9+
- id: check-docstring-first
10+
- id: end-of-file-fixer
11+
- id: trailing-whitespace

CONTRIBUTING.md

-1

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2424
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2525
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2626
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

attic/django/CONTRIBUTING.md

-1

attic/django/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2424
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2525
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2626
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

attic/falcon/CONTRIBUTING.md

-1

attic/falcon/README.rst

+1-1

attic/flask/CONTRIBUTING.md

-1

attic/flask/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2424
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2525
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2626
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

attic/pyramid/CONTRIBUTING.md

-1

attic/pyramid/README.rst

+1-1

attic/starlette/CONTRIBUTING.md

-1

attic/starlette/README.rst

+1-1

attic/tornado/CONTRIBUTING.md

-1

attic/tornado/README.rst

+1-1

attic/win32/MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ include LICENSE
22
include tox.ini
33
include README.rst
44
recursive-include toga_win32 *.py
5-
recursive-include tests *.py
5+
recursive-include tests *.py

attic/win32/README.rst

+1-1

attic/win32/toga_win32/libs/debug.py

-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,3 @@ def f(*args):
4141
return f
4242
else:
4343
DebugLibrary = lambda lib: lib
44-

attic/win32/toga_win32/widgets/multilinetextinput.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
from ..libs import *
33

44
class MultilineTextInput(TextInput):
5-
control_style = ES_MULTILINE | ES_WANTRETURN | ES_AUTOVSCROLL
5+
control_style = ES_MULTILINE | ES_WANTRETURN | ES_AUTOVSCROLL

demo/CONTRIBUTING.md

+2-3

demo/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2424
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2525
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2626
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

docs/_static/custom.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ div.body table.widget-descriptions td:first-of-type p,
1111
div.body table.widget-descriptions th:first-of-type p
1212
{
1313
text-align: left;
14-
}
14+
}

docs/background/releases.rst

-1

docs/background/success.rst

-1

docs/how-to/contribute.rst

+3-1

docs/make.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,4 @@ results in %BUILDDIR%/doctest/output.txt.
187187
goto end
188188
)
189189

190-
:end
190+
:end

docs/reference/api/containers/index.rst

-1

docs/reference/platforms.rst

-1
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.

examples/date_and_time/README.rst

+1-1
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.

examples/font/font/resources/README

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.

examples/positron-static/src/positron/resources/webapp/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
<body>
77
<h1>Hello World</h1>
88
</body>
9-
</html>
9+
</html>
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
h1 {
22
font-family: sans-serif;
3-
}
3+
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Put any icons or images in this directory.
1+
Put any icons or images in this directory.

nursery/curses/CONTRIBUTING.md

-1

nursery/qt/CONTRIBUTING.md

-1

nursery/tvOS/CONTRIBUTING.md

-1

nursery/tvOS/README.rst

+1-1

nursery/uwp/CONTRIBUTING.md

-1

nursery/watchOS/CONTRIBUTING.md

-1

src/android/CONTRIBUTING.md

-1

src/android/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2424
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2525
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2626
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

src/android/README.rst

+1-1

src/cocoa/CONTRIBUTING.md

-1

src/cocoa/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2424
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2525
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2626
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

src/cocoa/README.rst

+1-1

0 commit comments

Comments
 (0)