diff --git a/crates/ruff_python_stdlib/src/typing.rs b/crates/ruff_python_stdlib/src/typing.rs index bfd8f7f5c04b0..ef250d2df68cf 100644 --- a/crates/ruff_python_stdlib/src/typing.rs +++ b/crates/ruff_python_stdlib/src/typing.rs @@ -299,8 +299,10 @@ pub fn is_mutable_return_type(qualified_name: &[&str]) -> bool { pub fn is_immutable_return_type(qualified_name: &[&str]) -> bool { matches!( qualified_name, - ["datetime", "date" | "datetime" | "timedelta"] - | ["decimal", "Decimal"] + [ + "datetime", + "date" | "datetime" | "time" | "timedelta" | "timezone" | "tzinfo" + ] | ["decimal", "Decimal"] | ["fractions", "Fraction"] | ["operator", "attrgetter" | "itemgetter" | "methodcaller"] | ["pathlib", "Path"]