Skip to content

Commit

Permalink
Merge pull request #21 from robinedwards/feature_standard_functions
Browse files Browse the repository at this point in the history
Feature standard functions
  • Loading branch information
martyzz1 authored Feb 16, 2022
2 parents f6e488f + 0059e32 commit 0f49368
Show file tree
Hide file tree
Showing 15 changed files with 273 additions and 82 deletions.
63 changes: 63 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.yaml]
indent_style = space
indent_size = 2

# 4 space indentation
[*.py]
# Isort definitions
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
indent_style = space
indent_size = 4
max_line_length = 119
line_length=119
indent=' '
balanced_wrapping=True
length_sort=1
combine_as_imports = true
import_heading_future=General libraries
import_heading_localfolder=Project libraries
import_heading_thirdparty=Third party libraries
default_section=THIRDPARTY
no_lines_before=FUTURE,STDLIB
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER

# js files
[*.js]
indent_size = 2
insert_final_newline = ignore
indent_style = space
trim_trailing_whitespace = true

# The JSON files contain newlines inconsistently
[*.json]
indent_size = 2
insert_final_newline = ignore

# Minified JavaScript files shouldn't be changed
[**.min.js]
indent_style = ignore
insert_final_newline = ignore

# Batch files use tabs for indentation
[*.bat]
indent_style = tab

# Tab indentation (no size specified)
[Makefile]
indent_style = tab
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.python-version
*.swp
*.swo
.direnv/
.envrc
gitfeatures.egg-info/
64 changes: 64 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
# - id: check-docstring-first
- id: check-merge-conflict
- id: check-symlinks
- id: check-vcs-permalinks
# - id: check-xml
- id: debug-statements
# - id: detect-private-key
- id: trailing-whitespace
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending # force UNIX file endings for consistency
args: [--fix=lf]
- id: pretty-format-json
args: [--autofix, --indent, "2", --no-ensure-ascii, --no-sort-keys]
exclude: |
(?x)(
^Pipfile\.lock$|
/fixtures/.*\.json$
)
- id: check-executables-have-shebangs
- id: requirements-txt-fixer
args: [requirements-dev.txt]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.0
hooks:
- id: yamllint
- repo: https://github.com/pycqa/isort
rev: 5.8.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.6+
exclude: .+\/migrations.*\.py$
args: [-t, py37, -l, "119"]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
exclude: .+\/migrations.*\.py$
- repo: https://github.com/martyzz1/pre-commit-hooks
rev: v1.1
hooks:
- id: prepend-branch-name
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.5
hooks:
- id: shellcheck
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.1
hooks:
- id: rst-linter
args: [--allow-raw]
1 change: 1 addition & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC2059,SC1091
12 changes: 12 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'

rules:
line-length:
max: 119
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
Loading

0 comments on commit 0f49368

Please sign in to comment.