Skip to content

Commit

Permalink
Merge pull request #185 from ral-facilities/feature/add-code-linting-…
Browse files Browse the repository at this point in the history
…#165

Add Code Linting and Implementation of Hypermodern Python
  • Loading branch information
MRichards99 authored Jan 4, 2021
2 parents ec1dd64 + 9b4907c commit ca0efc6
Show file tree
Hide file tree
Showing 54 changed files with 2,734 additions and 1,638 deletions.
10 changes: 10 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# .flake8
[flake8]
select = A,B,B9,BLK,C,E,F,I,N,S,W
ignore = E203,W503,E501
max-complexity = 17
max-line-length = 80
application-import-names = datagateway_api,test,util
import-order-style = google
per-file-ignores = test/*:S101,util/icat_db_generator.py:S311
enable-extensions=G
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ venv/
logs.log
config.json
.vscode/
.nox/
.python-version
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: check-docstring-first
- id: check-json
- id: check-toml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: local
hooks:
- id: black
name: black
entry: poetry run black
language: system
types: [python]
Loading

0 comments on commit ca0efc6

Please sign in to comment.