Skip to content

Commit

Permalink
Update pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Stranger6667 committed Nov 26, 2020
1 parent 40b41f7 commit 1c727ce
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 14 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ name: CI
on: [push, pull_request]

jobs:
pre-commit:
name: Generic pre-commit checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-python@v2
with:
python-version: 3.7

- run: pip install pre-commit
- run: pre-commit run --all-files
docs:
name: docs
runs-on: ubuntu-latest
Expand Down
27 changes: 17 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
rev: v3.3.0
hooks:
- id: trailing-whitespace
- id: flake8
args:
- --exclude=djmoney/*/migrations/*
- id: check-yaml
- id: check-added-large-files
- id: debug-statements
- id: end-of-file-fixer
- id: fix-encoding-pragma
args:
- --remove
- repo: git://github.com/adambrenecki/pre-commit-python-sorter
rev: 1.0.5
hooks:
- id: python-import-sorter
args:
- --silent-overwrite

- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.6.4
hooks:
- id: isort

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
exclude: ^docs
6 changes: 4 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# Django-money documentation build configuration file, created by
# sphinx-quickstart on Thu Sep 29 11:06:12 2016.
Expand All @@ -12,17 +11,20 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import sys


# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))

import sphinx_rtd_theme

from djmoney import __version__


# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sphinx_rtd_theme
sphinx_rtd_theme
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ line_length = 120
combine_as_imports = true
known_django = django
known_first_party = tests, djmoney, moneyed
known_third_party = pytest, rest_framework, certifi
known_third_party = moneyed,pytest,rest_framework,reversion,setuptools,sphinx_rtd_theme
sections=FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
include_trailing_comma = true
multi_line_output = 3
Expand Down

0 comments on commit 1c727ce

Please sign in to comment.