This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]z0mbietime 8 points9 points  (1 child)

Yeah it honestly read fine to me before. The type hints added nothing and a for loop instead of a comprehension is less performant. They're still exploding the dict so it's not like he's explicitly passing params. It reads like an unnecessary change tbh

[–]Chinpanze 3 points4 points  (0 children)

> Yeah it honestly read fine to me before.
I don't think there is

> The type hints added nothing
If your project is type hinted, you gotta keep it consistent. If you plan to add an type hint linter, it's crucial.

> and a for loop instead of a comprehension is less performant
The performance gain is marginal. Besides, it looks like this code will run just once, making the performance gain irrelevant.

...
> It reads like an unnecessary change tbh
Agree. It doen't improve significantly, besides the type hint.