-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: disallow both class args with flake8 (#452)
Signed-off-by: Stephen Whitlock <[email protected]>
- Loading branch information
Showing
6 changed files
with
107 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
disallow both class args with flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
docs/usage/messages/sig005-mutually-exclusive-class-args.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
SIG005: mutually-exclusive-class-args | ||
===================================== | ||
|
||
both class args passed to commandline | ||
|
||
This is only raised as a ``flake8`` violation so that it won't cause ``flake8`` to | ||
totally crash and other plugins can continue to run | ||
|
||
When running ``docsig`` on it's own an exception will be raised instead | ||
|
||
.. code-block:: console | ||
$ flake8 example.py --sig-check-class --sig-check-class-constructor | ||
example.py:0:1: SIG005 both class and class constructor passed to commandline (mutually-exclusive-class-args) | ||
.. code-block:: console | ||
$ docsig example.py --check-class --check-class-constructor 2>&1 | tail -n 1 | ||
docsig: error: argument -C/--check-class-constructor: not allowed with argument -c/--check-class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters