Skip to content

Commit

Permalink
Revert "add is_str" since it's unused
Browse files Browse the repository at this point in the history
This reverts commit efcc4cf.
  • Loading branch information
ntBre committed Nov 28, 2024
1 parent 76b9bd8 commit b48fb18
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions crates/ruff_python_semantic/src/analyze/typing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,14 +665,6 @@ impl BuiltinTypeChecker for IntChecker {
const EXPR_TYPE: PythonType = PythonType::Number(NumberLike::Integer);
}

struct StrChecker;

impl BuiltinTypeChecker for StrChecker {
const BUILTIN_TYPE_NAME: &'static str = "str";
const TYPING_NAME: Option<&'static str> = None;
const EXPR_TYPE: PythonType = PythonType::String;
}

pub struct IoBaseChecker;

impl TypeChecker for IoBaseChecker {
Expand Down Expand Up @@ -787,11 +779,6 @@ pub fn is_int(binding: &Binding, semantic: &SemanticModel) -> bool {
check_type::<IntChecker>(binding, semantic)
}

/// Test whether the given binding can be considered a string.
pub fn is_str(binding: &Binding, semantic: &SemanticModel) -> bool {
check_type::<StrChecker>(binding, semantic)
}

/// Test whether the given binding can be considered a set.
///
/// For this, we check what value might be associated with it through it's initialization and
Expand Down

0 comments on commit b48fb18

Please sign in to comment.