Skip to content
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
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,11 @@ mypy_exclude = '''(?x)(
[tool.pytest.ini_options]
markers = ["examples"]

[tool.black] # automatically generated by pysen
# pysen ignores and overwrites any modifications
[tool.black] # automatically generated by pysen. pysen ignores and overwrites any modifications.
line-length = 88
target-version = ["py310"]

[tool.isort] # automatically generated by pysen
# pysen ignores and overwrites any modifications
[tool.isort] # automatically generated by pysen. pysen ignores and overwrites any modifications.
default_section = "THIRDPARTY"
ensure_newline_before_comments = true
force_grid_wrap = 0
Expand Down
4 changes: 2 additions & 2 deletions src/pysen/dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def dump_toml(path: pathlib.Path, setting: SettingFile) -> None:
updated = SettingFile.update_by_entry(document, p, d)
if isinstance(updated, tomlkit.items.Table):
updated.comment(
"# automatically generated by pysen\n"
"# pysen ignores and overwrites any modifications"
"# automatically generated by pysen. "
"pysen ignores and overwrites any modifications."
)

with path.open("w") as f:
Expand Down
8 changes: 3 additions & 5 deletions tests/test_dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ def _assert_toml(path: pathlib.Path, expected: SettingFile) -> None:

def test_dump_toml(temp_file: pathlib.Path, test_nested_data: SettingFile) -> None:
dumper.dump_toml(temp_file, test_nested_data)
expected = """[tool.bar] # automatically generated by pysen
# pysen ignores and overwrites any modifications
expected = """[tool.bar] # automatically generated by pysen. pysen ignores and overwrites any modifications.
a = 1.0
b = 12345
c = "yes"
Expand All @@ -83,16 +82,15 @@ def test_dump_toml(temp_file: pathlib.Path, test_nested_data: SettingFile) -> No
d-1-a = false
d-1-b = true
d-1-c = true
[tool.foo] # automatically generated by pysen
# pysen ignores and overwrites any modifications
[tool.foo] # automatically generated by pysen. pysen ignores and overwrites any modifications.
fuga = ["A", "B", "c", "d"]
hoge = true
piyo = "description"
[tool.foo.hogehoge]
x = "Hello"
y = 42
z = ["1", "2", "3"]
"""
""" # NOQA: B950

with temp_file.open("r") as f:
actual = f.read()
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ setenv =
[testenv:latest]
basepython = python3.10
deps =
pipenv==2022.9.8
pipenv==2026.0.2
extras = lint
commands =
pipenv sync --system
Expand All @@ -36,7 +36,7 @@ commands =
[testenv:development]
basepython = python3.10
deps =
pipenv==2022.9.8
pipenv==2026.0.2
extras = lint
commands =
pipenv sync --system
Expand Down
Loading