Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pre-commit framework inconsistencies with GA #229

Merged
merged 1 commit into from
Jun 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 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,18 @@ repos:
rev: '2020.10.8'
hooks:
- id: pytype
# Don't run pytype in an isolated venv or it will fail on imports
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