Skip to content

Commit c45b3e8

Browse files
committed
Switched to running linting checks through pre-commit.ci
1 parent 462d524 commit c45b3e8

File tree

5 files changed

+56
-54
lines changed

5 files changed

+56
-54
lines changed

.github/workflows/codeqa-test.yml renamed to .github/workflows/test.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,12 @@
1-
name: Python codeqa/test
1+
name: Run the test suite
22

33
on:
44
push:
55
branches: [master]
66
pull_request:
77

88
jobs:
9-
lint:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up Python
14-
uses: actions/setup-python@v2
15-
with:
16-
python-version: 3.x
17-
- uses: actions/cache@v2
18-
with:
19-
path: ~/.cache/pip
20-
key: pip-lint
21-
- name: Install dependencies
22-
run: pip install pyproject-flake8 isort mypy
23-
- name: Run flake8
24-
run: pflake8 src tests
25-
- name: Check types with Mypy
26-
run: mypy src
27-
- name: Run isort
28-
run: isort -c src tests
29-
309
test:
31-
needs: [lint]
3210
strategy:
3311
fail-fast: false
3412
matrix:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.pre-commit-config.yaml
21
.project
32
.pydevproject
43
.idea

.pre-commit-config.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# This is the configuration file for pre-commit (https://pre-commit.com/).
2+
# To use:
3+
# * Install pre-commit (https://pre-commit.com/#installation)
4+
# * Copy this file as ".pre-commit-config.yaml"
5+
# * Run "pre-commit install".
6+
repos:
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v4.1.0
9+
hooks:
10+
- id: check-toml
11+
- id: check-yaml
12+
- id: debug-statements
13+
- id: end-of-file-fixer
14+
- id: mixed-line-ending
15+
args: [ "--fix=lf" ]
16+
- id: trailing-whitespace
17+
18+
- repo: https://github.com/asottile/pyupgrade
19+
rev: v2.31.1
20+
hooks:
21+
- id: pyupgrade
22+
args: [ "--py37-plus", "--keep-runtime-typing" ]
23+
24+
- repo: https://github.com/pre-commit/mirrors-autopep8
25+
rev: v1.6.0
26+
hooks:
27+
- id: autopep8
28+
29+
- repo: https://github.com/pycqa/isort
30+
rev: 5.10.1
31+
hooks:
32+
- id: isort
33+
34+
- repo: https://github.com/csachs/pyproject-flake8
35+
rev: v0.0.1a3
36+
hooks:
37+
- id: pyproject-flake8
38+
39+
- repo: https://github.com/pre-commit/mirrors-mypy
40+
rev: v0.942
41+
hooks:
42+
- id: mypy
43+
# additional_dependencies: [ "pytest", "trio-typing", "packaging" ]
44+
45+
- repo: https://github.com/pre-commit/pygrep-hooks
46+
rev: v1.9.0
47+
hooks:
48+
- id: python-check-blanket-noqa
49+
- id: python-check-blanket-type-ignore
50+
- id: python-no-eval
51+
- id: rst-backticks
52+
- id: rst-directive-colons
53+
- id: rst-inline-touching-normal

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
.. image:: https://github.com/asphalt-framework/asphalt-exceptions/actions/workflows/codeqa-test.yml/badge.svg
2-
:target: https://github.com/asphalt-framework/asphalt-exceptions/actions/workflows/codeqa-test.yml
1+
.. image:: https://github.com/asphalt-framework/asphalt-exceptions/actions/workflows/test.yml/badge.svg
2+
:target: https://github.com/asphalt-framework/asphalt-exceptions/actions/workflows/test.yml
33
:alt: Build Status
44
.. image:: https://coveralls.io/repos/github/asphalt-framework/asphalt-exceptions/badge.svg?branch=master
55
:target: https://coveralls.io/github/asphalt-framework/asphalt-exceptions?branch=master

pre-commit-config.sample.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)