Skip to content

Commit

Permalink
prepare 0.1.5, fix rst and add pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-bagerard committed Mar 21, 2021
1 parent ee7e50b commit 7f80ce2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
26 changes: 17 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,34 @@
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v3.4.0
hooks:
- id: check-ast
- id: flake8
name: flake8-blocking
args: ['--isolated', '--select=P,F401,F821,F901', '--ignore=P101,P102']
additional_dependencies:
- flake8-string-format
- id: check-merge-conflict
- id: debug-statements
- id: trailing-whitespace
types: [python]
- id: end-of-file-fixer
types: [python]

- repo: https://gitlab.com/pycqa/flake8
rev: master
hooks:
- id: flake8
name: flake8-blocking
args: [ '--isolated', '--select=P,F401,F821,F901', '--ignore=P101,P102' ]
additional_dependencies:
- flake8-string-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.730
rev: v0.812
hooks:
- id: mypy
args: [--ignore-missing-imports]
- repo: https://github.com/psf/black
rev: 19.10b0
rev: 20.8b1
hooks:
- id: black
- id: black
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.1
hooks:
- id: rst-linter
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This plugin is using the following error codes:
Operation
---------

The plugin will go through all files, look for files starting with "test_" and check any functions or methods
The plugin will go through all files, look for files starting with `test_` and check any functions or methods
starting with `test_` against your validator.


Expand Down
2 changes: 1 addition & 1 deletion flake8_test_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Callable, Optional

# metadata
__version__ = "0.1.4"
__version__ = "0.1.5"

CODE_PREFIX = "TN"

Expand Down
5 changes: 4 additions & 1 deletion test_flake8_test_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ def test__resolve_path_expand__should_pass(self):

class TestFlake8Optparse:
def test__add_options__should_pass(self):
flake8_opt_mgr = OptionManager(prog="flake8", version=flake8.__version__,)
flake8_opt_mgr = OptionManager(
prog="flake8",
version=flake8.__version__,
)
plugin = Flake8Argparse(None, SAMPLE_FILE_PATH)
plugin.add_options(flake8_opt_mgr)
assert len(flake8_opt_mgr.options) == 2
Expand Down

0 comments on commit 7f80ce2

Please sign in to comment.