diff options
author | 2020-03-04 18:16:04 -0800 | |
---|---|---|
committer | 2020-03-04 19:46:41 -0800 | |
commit | a6237bb9dfd7e9c28421f0b37d92796454b9c122 (patch) | |
tree | 76efbbede5f614d98233d0dab838e4ef65b3b34c /CONTRIBUTING.md | |
parent | Update dependencies (diff) |
Add more pre-commit hooks
Hooks added:
* check-merge-conflict - checks for files with merge conflict strings
* check-toml - attempts to load all toml files to verify syntax
* check-yaml - attempts to load all yaml files to verify syntax
* end-of-file-fixer - ensures files end in a newline and only a newline
* mixed-line-ending - replaces mixed line endings with LF
* trailing-whitespace - trims trailing whitespace
* python-check-blanket-noqa - enforces that noqa annotations always
occur with specific codes
Changes made to comply with new hooks:
* Remove trailing whitespaces
* Convert some CRLF files to LF
* Remove noqa and add missing type annotations
* Add missing newlines at end of files
See: python-discord/organisation#138
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fd0c048f..ced5df70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ Seasonalbot utilizes [Pipenv](https://pipenv.readthedocs.io/en/latest/) for inst When pulling down changes from GitHub, remember to sync your environment using `pipenv sync --dev` to ensure you're using the most up-to-date versions the project's dependencies. ### Type Hinting -[PEP 484](https://www.python.org/dev/peps/pep-0484/) formally specifies type hints for Python functions, added to the Python Standard Library in version 3.5. Type hints are recognized by most modern code editing tools and provide useful insight into both the input and output types of a function, preventing the user from having to go through the codebase to determine these types. +[PEP 484](https://www.python.org/dev/peps/pep-0484/) formally specifies type hints for Python functions, added to the Python Standard Library in version 3.5. Type hints are recognized by most modern code editing tools and provide useful insight into both the input and output types of a function, preventing the user from having to go through the codebase to determine these types. For example: @@ -86,7 +86,7 @@ def foo(bar: int, baz: dict=None) -> bool: Does some things with some stuff. This function takes an index, `bar` and checks for its presence in the database `baz`, passed as a dictionary. - + Returns `False` if `baz` is not passed. """ ``` |