Skip to content

Commit b9c500f

Browse files
committed
ci: GHA basic format & pre-commit
1 parent e248869 commit b9c500f

Some content is hidden

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

60 files changed

+121
-28
lines changed

.github/workflows/format.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Format
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- master
9+
- stable
10+
- "v*"
11+
12+
jobs:
13+
pre-commit:
14+
name: Format
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-python@v2
19+
- uses: pre-commit/action@v2.0.0

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.1.0
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-merge-conflict
8+
- id: check-symlinks
9+
- id: check-yaml
10+
- id: debug-statements
11+
- id: end-of-file-fixer
12+
- id: mixed-line-ending
13+
- id: requirements-txt-fixer
14+
- id: trailing-whitespace
15+
- id: fix-encoding-pragma
16+
17+
- repo: https://github.com/Lucas-C/pre-commit-hooks
18+
rev: v1.1.7
19+
hooks:
20+
- id: remove-tabs
21+
exclude: (Makefile|debian/rules|.gitmodules)(\.in)?$
22+
23+
- repo: https://gitlab.com/pycqa/flake8
24+
rev: 3.8.2
25+
hooks:
26+
- id: flake8
27+
additional_dependencies: [flake8-bugbear]
28+
exclude: ^(docs/.*|tools/.*)$

CONTRIBUTING.md

Lines changed: 7 additions & 2 deletions

docs/advanced/cast/index.rst

Lines changed: 0 additions & 1 deletion

docs/advanced/classes.rst

Lines changed: 2 additions & 2 deletions

docs/advanced/misc.rst

Lines changed: 5 additions & 5 deletions

docs/advanced/pycpp/object.rst

Lines changed: 4 additions & 4 deletions

docs/benchmark.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
import random
23
import os
34
import time

docs/benchmark.rst

Lines changed: 0 additions & 2 deletions

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@
130130
else:
131131
html_context = {
132132
'css_files': [
133-
'//media.readthedocs.org/css/sphinx_rtd_theme.css',
134-
'//media.readthedocs.org/css/readthedocs-doc-embed.css',
133+
'//media.readthedocs.org/css/sphinx_rtd_theme.css',
134+
'//media.readthedocs.org/css/readthedocs-doc-embed.css',
135135
'_static/theme_overrides.css'
136136
]
137137
}

0 commit comments

Comments
 (0)