Skip to content

Mark --add-noqa as incompatible with --fix#2513

Merged
charliermarsh merged 1 commit intomainfrom
charlie/fix-add
Feb 3, 2023
Merged

Mark --add-noqa as incompatible with --fix#2513
charliermarsh merged 1 commit intomainfrom
charlie/fix-add

Conversation

@charliermarsh
Copy link
Member

Closes #2187.

@charliermarsh charliermarsh changed the title Mark --add-noqa as incompatible with --fix Mark --add-noqa as incompatible with --fix Feb 3, 2023
output.push_str(line_ending);
}
Directive::Codes(_, start_byte, _, existing) => {
println!("existing: {:?}", existing);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't wanna talk about it.

}

if cli.add_noqa {
if !matches!(autofix, fix::FixMode::None) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a rare path, since you can't set --fix on the CLI with --add-noqa. But if the user's pyproject.toml has fix = true, we warn.

@charliermarsh charliermarsh merged commit a30c77e into main Feb 3, 2023
@charliermarsh charliermarsh deleted the charlie/fix-add branch February 3, 2023 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--add-noqa is unintuitive

1 participant