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

flake8_simplify : SIM210, SIM211, SIM212 #1717

Merged
merged 9 commits into from
Jan 7, 2023
Prev Previous commit
Next Next commit
fix typo
  • Loading branch information
chammika-become committed Jan 7, 2023
commit 70682e228c876245f506125449cde41d89156260
2 changes: 1 addition & 1 deletion src/checkers/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2711,7 +2711,7 @@ where
}
ExprKind::IfExp { test, body, orelse } => {
if self.settings.enabled.contains(&CheckCode::SIM210) {
flake8_simplify::plugins::explicit_ture_false_in_ifexpr(
flake8_simplify::plugins::explicit_true_false_in_ifexpr(
self, expr, test, body, orelse,
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/flake8_simplify/plugins/ast_ifexp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::checkers::ast::Checker;
use crate::registry::{Check, CheckKind};

/// SIM210
pub fn explicit_ture_false_in_ifexpr(
pub fn explicit_true_false_in_ifexpr(
checker: &mut Checker,
expr: &Expr,
test: &Expr,
Expand Down
2 changes: 1 addition & 1 deletion src/flake8_simplify/plugins/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub use ast_bool_op::{
pub use ast_for::convert_loop_to_any_all;
pub use ast_if::{nested_if_statements, return_bool_condition_directly, use_ternary_operator};
pub use ast_ifexp::{
explicit_false_true_in_ifexpr, explicit_ture_false_in_ifexpr, twisted_arms_in_ifexpr,
explicit_false_true_in_ifexpr, explicit_true_false_in_ifexpr, twisted_arms_in_ifexpr,
};
pub use ast_unary_op::{double_negation, negation_with_equal_op, negation_with_not_equal_op};
pub use ast_with::multiple_with_statements;
Expand Down