Skip to content

Commit

Permalink
pre-commit: get rid of yesqa, it's for flake8 only
Browse files Browse the repository at this point in the history
flake8 was dropped in #752
  • Loading branch information
akx committed Dec 18, 2023
1 parent 64c65da commit 985e94c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ repos:
- mdformat-gfm
- mdformat_frontmatter

- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.4
hooks:
Expand Down
2 changes: 1 addition & 1 deletion papermill/tests/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_str_path():
[
"Dummy usage",
"\nParameters inferred for notebook '{name}':",
"\n Can't infer anything about this notebook's parameters. It may not have any parameter defined.", # noqa
"\n Can't infer anything about this notebook's parameters. It may not have any parameter defined.",
],
),
],
Expand Down
2 changes: 1 addition & 1 deletion papermill/tests/test_translators.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_translate_comment_python(test_input, expected):
[Parameter("a", "List[str]", "['this','is','a','string','list']", "Nice variable a")],
),
(
"a: List[str] = [\n 'this',\n 'is',\n 'a',\n 'string',\n 'list'\n] # Nice variable a", # noqa
"a: List[str] = [\n 'this',\n 'is',\n 'a',\n 'string',\n 'list'\n] # Nice variable a",
[Parameter("a", "List[str]", "['this','is','a','string','list']", "Nice variable a")],
),
(
Expand Down
2 changes: 1 addition & 1 deletion papermill/translators.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def inspect(cls, parameters_cell):
class PythonTranslator(Translator):
# Pattern to capture parameters within cell input
PARAMETER_PATTERN = re.compile(
r"^(?P<target>\w[\w_]*)\s*(:\s*[\"']?(?P<annotation>\w[\w_\[\],\s]*)[\"']?\s*)?=\s*(?P<value>.*?)(\s*#\s*(type:\s*(?P<type_comment>[^\s]*)\s*)?(?P<help>.*))?$" # noqa
r"^(?P<target>\w[\w_]*)\s*(:\s*[\"']?(?P<annotation>\w[\w_\[\],\s]*)[\"']?\s*)?=\s*(?P<value>.*?)(\s*#\s*(type:\s*(?P<type_comment>[^\s]*)\s*)?(?P<help>.*))?$"
)

@classmethod
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ select = [
"I", # isort
# "D", # see: https://pypi.org/project/pydocstyle
# "N", # see: https://pypi.org/project/pep8-naming
"RUF100", # unnecessary noqa comment
]
#extend-select = [
# "C4", # see: https://pypi.org/project/flake8-comprehensions
Expand Down

0 comments on commit 985e94c

Please sign in to comment.