Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change TOML indentation level from 4 spaces to 2 spaces #1079

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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: 3 additions & 3 deletions rye/src/templates/pyproject.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ version = {{ version }}
description = {{ description }}
{%- if author %}
authors = [
{ name = {{ author[0] }}, email = {{ author[1] }} }
{ name = {{ author[0] }}, email = {{ author[1] }} }
]
{%- endif %}
{%- if dependencies %}
dependencies = [
{%- for dependency in dependencies %}
{{ dependency }},
{{ dependency }},
{%- endfor %}
]
{%- else %}
Expand Down Expand Up @@ -61,7 +61,7 @@ virtual = true
{%- if dev_dependencies %}
dev-dependencies = [
{%- for dependency in dev_dependencies %}
{{ dependency }},
{{ dependency }},
{%- endfor %}
]
{%- else %}
Expand Down
6 changes: 3 additions & 3 deletions rye/src/utils/toml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ pub fn reformat_array_multiline(deps: &mut Array) {
let decor = item.decor_mut();
let mut prefix = String::new();
for comment in find_comments(decor.prefix()).chain(find_comments(decor.suffix())) {
prefix.push_str("\n ");
prefix.push_str("\n ");
prefix.push_str(comment);
}
prefix.push_str("\n ");
prefix.push_str("\n ");
decor.set_prefix(prefix);
decor.set_suffix("");
}
Expand All @@ -44,7 +44,7 @@ pub fn reformat_array_multiline(deps: &mut Array) {
let mut rv = String::new();
if comments.peek().is_some() {
for comment in comments {
rv.push_str("\n ");
rv.push_str("\n ");
rv.push_str(comment);
}
}
Expand Down
Loading