Skip to content

Commit

Permalink
dotfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrake committed Jan 8, 2020
1 parent f3f644a commit 63e8931
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[flake8]
# E203: Conflicts with black's formatting
# E501: Conflicts with black's formatting, which defaults to a max
# line length of 88 but will go over if necessary.
# See https://github.com/ambv/black#line-length for more info
# W605: Conflicts with regular expression formatting
ignore = E203,E501,E731,W503,W605
import-order-style = google
# Packages added in this list should be added to the setup.cfg file as well
application-import-names =
pypants
exclude =
*vendor*
.venv
.env
.pants.d
.pantscache
.git
__init__.py
setup.py
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.DS_Store
.venv*
.vscode
**/__pycache__/
**/.cache/
**/.tox
**/*.coverage
**/*.egg-info
**/*.pyc
**/dist
58 changes: 58 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
default_stages: [commit]

default_language_version:
python: python3

exclude: "examples/.*$"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-byte-order-marker
- id: check-executables-have-shebangs
# Need to define stages explicitly since `default_stages` was not being respected
stages: [commit]
- id: check-merge-conflict
- id: debug-statements
- id: forbid-new-submodules
- id: no-commit-to-branch
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
# Need to define stages explicitly since `default_stages` was not being respected
stages: [commit]

- repo: local
hooks:
- id: isort
name: Sort Python imports (isort)
entry: isort
language: python
types: [file, python]
additional_dependencies: [isort==4.3.16]

- id: black
name: Format Python (black)
entry: black
language: python
types: [file, python]
additional_dependencies: [black==19.3b0]

- id: pydocstyle
name: Lint Python docstrings (pydocstyle)
entry: pydocstyle
language: python
types: [file, python]
additional_dependencies: [pydocstyle==4.0.1]

- id: flake8
name: Lint Python (flake8)
entry: flake8 --config .flake8
language: python
types: [file, python]
additional_dependencies:
- flake8==3.7.9
- "flake8-import-order<0.19,>=0.18"

0 comments on commit 63e8931

Please sign in to comment.