Skip to content

Commit

Permalink
fix: pre-commit errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eggplants committed Jun 24, 2023
1 parent 06152db commit 1cd71b0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 42 deletions.
60 changes: 30 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,6 @@ requires = [
]

[tool]
[tool.black]
line-length = 120
target-version = ['py39']

[tool.isort]
profile = "black"

[tool.mypy]
pretty = true
python_version = "3.9"
show_error_codes = true
strict = true

[tool.ruff]
ignore = [
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
]
line-length = 120
select = ["ALL"]

[tool.ruff.mccabe]
max-complexity = 18

[tool.ruff.per-file-ignores]
"tests/*.py" = [
"D",
"S101", # Use of assert detected
]

[tool.poetry]
authors = ["eggplants <w10776e8w@yahoo.co.jp>"]
classifiers = [
Expand Down Expand Up @@ -77,6 +47,36 @@ types-requests = "^2.28.11.14"
[tool.poetry.scripts]
shindan = "shindan_cli.main:main"

[tool.black]
line-length = 120
target-version = ['py39']

[tool.ruff]
ignore = [
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
]
line-length = 120
select = ["ALL"]

[tool.ruff.mccabe]
max-complexity = 18

[tool.ruff.per-file-ignores]
"tests/*.py" = [
"D",
"S101", # Use of assert detected
]

[tool.isort]
profile = "black"

[tool.mypy]
pretty = true
python_version = "3.9"
show_error_codes = true
strict = true

[tool.poetry_bumpversion.file."shindan_cli/__init__.py"]

[tool.taskipy.tasks]
Expand Down
18 changes: 6 additions & 12 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ def test_no_args(capfd: pytest.CaptureFixture[str]) -> None:
main(test=[])
captured = capfd.readouterr()
assert not captured.out
assert captured.err == "\n".join(
[
"usage: shindan [-h] [-w] [-H] [-l] [-V] ID NAME",
"shindan: error: the following arguments are required: ID, NAME",
"",
],
assert (
captured.err
== "usage: shindan [-h] [-w] [-H] [-l] [-V] ID NAME\nshindan: error: the following arguments are required: ID, NAME\n" # noqa: E501
)
assert e.value.args == (2,)

Expand All @@ -34,12 +31,9 @@ def test_no_name(capfd: pytest.CaptureFixture[str]) -> None:
main(test=["1036646"])
captured = capfd.readouterr()
assert not captured.out
assert captured.err == "\n".join(
[
"usage: shindan [-h] [-w] [-H] [-l] [-V] ID NAME",
"shindan: error: the following arguments are required: NAME",
"",
],
assert (
captured.err
== "usage: shindan [-h] [-w] [-H] [-l] [-V] ID NAME\nshindan: error: the following arguments are required: NAME\n" # noqa: E501
)
assert e.value.args == (2,)

Expand Down

0 comments on commit 1cd71b0

Please sign in to comment.