Skip to content

Commit

Permalink
Add time, tzinfo, and timezone as immutable function calls (#13109)
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Wouda authored Aug 27, 2024
1 parent 4e1b289 commit e6d0c4a
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 e6d0c4a

Please sign in to comment.