Skip to content

Commit

Permalink
chore: add pre-commit file (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadej Svetina committed Aug 30, 2021
1 parent c84ce84 commit 50b5a79
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: https://github.com/psf/black
rev: 21.7b0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: "3.9.2"
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: "5.8.0"
hooks:
- id: isort
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ If you are working from the command line, you should use these tools form the ro
black jinahub/encoders/text/BERTTextEncoder
```

We also provide a `.pre-commit-config.yaml` file, which enables you to use [pre-commit](https://pre-commit.com/index.html) to automatically perform the required linting/formatting actions before you commit your changes. You can install it using

```
pip install pre-commit
pre-commit install
```

### 📖 Documentation

When writing code you should already be adding documentation, by writing docstrings for all classes, methods and functions. Type hints for all arguments and return values should be added as well.
Expand Down

0 comments on commit 50b5a79

Please sign in to comment.