Skip to content

Commit 5c73bfc

Browse files
authored
Run all pre-commit hooks on pull requests (#236)
Help to ensure new code contributions meet the coding standards of the project.
1 parent ca0b08f commit 5c73bfc

3 files changed

Lines changed: 17 additions & 6 deletions

File tree

.github/workflows/test.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,19 @@ name: Python package
33
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
lint:
7+
runs-on: ubuntu-latest
78

9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Set up Python ${{ matrix.python-version }}
12+
uses: actions/setup-python@v2
13+
- name: Install dependencies
14+
run: python -m pip install pre-commit
15+
- name: Run pre-commit
16+
run: pre-commit run --all-files
17+
18+
build:
819
runs-on: ubuntu-latest
920
strategy:
1021
matrix:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ repos:
99
rev: 21.8b0
1010
hooks:
1111
- id: black
12-
language_version: python3.6
12+
args: ["--target-version", "py36"]

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ def readme():
2929
license="LGPL",
3030
keywords=["encoding", "i18n", "xml"],
3131
project_urls={
32-
'Documentation': 'https://chardet.readthedocs.io/',
33-
'GitHub Project': 'https://github.com/chardet/chardet',
34-
'Issue Tracker': 'https://github.com/chardet/chardet/issues'
35-
},
32+
"Documentation": "https://chardet.readthedocs.io/",
33+
"GitHub Project": "https://github.com/chardet/chardet",
34+
"Issue Tracker": "https://github.com/chardet/chardet/issues",
35+
},
3636
classifiers=[
3737
"Development Status :: 5 - Production/Stable",
3838
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)