From b48fb1883e38623f85ada854babaa29084dde70c Mon Sep 17 00:00:00 2001 From: Brent Westbrook Date: Thu, 28 Nov 2024 17:05:24 -0500 Subject: [PATCH] Revert "add is_str" since it's unused This reverts commit efcc4cfbe121203443d146961f5fce2c9d117a69. --- crates/ruff_python_semantic/src/analyze/typing.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/crates/ruff_python_semantic/src/analyze/typing.rs b/crates/ruff_python_semantic/src/analyze/typing.rs index 6a07feeb147f1..9cf8888b72f7d 100644 --- a/crates/ruff_python_semantic/src/analyze/typing.rs +++ b/crates/ruff_python_semantic/src/analyze/typing.rs @@ -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 { @@ -787,11 +779,6 @@ pub fn is_int(binding: &Binding, semantic: &SemanticModel) -> bool { check_type::(binding, semantic) } -/// Test whether the given binding can be considered a string. -pub fn is_str(binding: &Binding, semantic: &SemanticModel) -> bool { - check_type::(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