Skip to content

Commit

Permalink
Fix pre-commit framework inconsistencies with GA
Browse files Browse the repository at this point in the history
Also lint a few cases that were missed before
  • Loading branch information
unode committed Jun 11, 2021
1 parent 9aeb196 commit e3ffe8f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ repos:
rev: 21.5b1
hooks:
- id: black
exclude: (.*/)*snapshots/
- repo: https://gitlab.com/pycqa/flake8
# Checks the code for PEP8 violations and common pitfals
rev: 3.9.0
Expand All @@ -34,16 +35,17 @@ repos:
rev: '2020.10.8'
hooks:
- id: pytype
language: system
args:
- "-j"
- "auto"
- "."
- repo: https://github.com/myint/docformatter
# Formats docstrings following PEP 257
rev: v1.3.1
rev: v1.4
hooks:
- id: docformatter
args:
- "--in-place"
- "--wrap-summaries"
- "88"
- "--wrap-descriptions"
Expand Down
16 changes: 10 additions & 6 deletions docs/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Restrict messages to specific users
Restrict messages to specific channels
----------------------------------
--------------------------------------

.. code-block:: python
Expand All @@ -141,11 +141,15 @@ Restrict messages to specific channels
Click support
-------------

`mmpy_bot` now supports `click <https://click.palletsprojects.com/en/7.x/>`_ commands, so you can build a robust CLI-like experience if you need it.
The example below registers a `hello_click` command that takes a positional argument, a keyword argument and a toggleable flag, which are automatically converted to the correct type.
For example, it can be called with `hello_click my_argument --keyword-arg=3 -f` and will parse the arguments accordingly.
A nice benefit of `click` commands is that they also automatically generate nicely formatted help strings.
Try sending "help" to the `ExamplePlugin` to see what it looks like!
`mmpy_bot` now supports `click <https://click.palletsprojects.com/en/7.x/>`_
commands, so you can build a robust CLI-like experience if you need it. The
example below registers a `hello_click` command that takes a positional
argument, a keyword argument and a toggleable flag, which are automatically
converted to the correct type. For example, it can be called with
`hello_click my_argument --keyword-arg=3 -f` and will parse the arguments
accordingly. A nice benefit of `click` commands is that they also
automatically generate nicely formatted help strings. Try sending "help" to
the `ExamplePlugin` to see what it looks like!

.. code-block:: python
Expand Down

0 comments on commit e3ffe8f

Please sign in to comment.