mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-28 23:43:53 +00:00
Add time, tzinfo, and timezone as immutable function calls (#13109)
This commit is contained in:
parent
4e1b289a67
commit
e6d0c4a65d
1 changed files with 4 additions and 2 deletions
|
@ -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"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue