mirror of
https://github.com/astral-sh/ruff
synced 2026-01-09 07:34:06 -05:00
Add time, tzinfo, and timezone as immutable function calls (#13109)
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user