Skip to content

Commit

Permalink
Add pre-commit to CI, update all linters (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Oct 15, 2020
1 parent f67f61d commit 8e7e829
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 13 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Lint

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
repos:
- repo: https://github.com/psf/black
rev: 19.10b0
rev: 20.8b1
hooks:
- id: black
language_version: python3.8

- repo: https://github.com/timothycrosley/isort
rev: 5.0.4
- repo: https://github.com/PyCQA/isort
rev: 5.6.4
hooks:
- id: isort
files: \.py$

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
rev: 3.8.4
hooks:
- id: flake8

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
rev: v3.2.0
hooks:
- id: check-builtin-literals
- id: check-added-large-files
Expand All @@ -29,20 +29,20 @@ repos:
- id: forbid-new-submodules
- id: trailing-whitespace

- repo: https://github.com/PyCQA/pydocstyle.git
rev: 5.0.2
- repo: https://github.com/PyCQA/pydocstyle
rev: 5.1.1
hooks:
- id: pydocstyle
files: src/.*\.py$

- repo: https://github.com/asottile/blacken-docs
rev: v1.7.0
rev: v1.8.0
hooks:
- id: blacken-docs
additional_dependencies: [black==19.10b0]
additional_dependencies: [black==20.8b1]

- repo: https://github.com/prettier/prettier
rev: 2.1.1
rev: 2.1.2
hooks:
- id: prettier
exclude: src/furo/theme/.*|docs/reference/admonitions.md
4 changes: 3 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ def get_release_versions(version_file):
@nox.session
def release(session):
version_file = f"src/{PACKAGE_NAME}/__init__.py"
allowed_upstreams = [f"git@github.com:pradyunsg/{PACKAGE_NAME.replace('_', '-')}.git"]
allowed_upstreams = [
f"git@github.com:pradyunsg/{PACKAGE_NAME.replace('_', '-')}.git"
]

release_version, next_version = get_release_versions(version_file)

Expand Down
6 changes: 4 additions & 2 deletions src/furo/assets/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ $admonitions: (
// Fonts
//////////////////////////////////////////////////////////////////////////////
// These are adapted from https://systemfontstack.com/
--font-stack: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial, sans-serif;
--font-stack--monospace: "SFMono-Regular", Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
--font-stack: -apple-system, BlinkMacSystemFont, avenir next, avenir,
helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial, sans-serif;
--font-stack--monospace: "SFMono-Regular", Menlo, Consolas, Monaco,
Liberation Mono, Lucida Console, monospace;

--font-size--normal: 100%;
--font-size--small: 87.5%;
Expand Down

0 comments on commit 8e7e829

Please sign in to comment.