Skip to content

Commit

Permalink
Add time, timezone, and tzinfo as immutable function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Wouda committed Aug 26, 2024
1 parent f8f2e2a commit feae164
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/ruff_python_stdlib/src/typing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit feae164

Please # to comment.