Micha Reiser

Results 740 comments of Micha Reiser
trafficstars

> Possibly something like consider-using-dataclass could work well... but there might be other reasons you might want to consider using a dataclass, of course (such as code generation for several...

This is interesting https://github.com/astral-sh/ruff/pull/10146 I haven't looked at how the two rules overlap but maybe there's an opportunity.

Note for reviewing: The rule itself is a style rule but we need to find a good name that expresses the motivation to use dataclasses/named tuples instead of enforcing a...

It seems that black formats the walrus operator more closely to assignments where it only breaks the right but never the left (or before/after the operator), even if doing so...

Here's a ZIP with the described repo. [I10622.zip](https://github.com/astral-sh/ruff/files/14770373/I10622.zip)

I think it would be good for us to document this behavior because it wasn't clear to me.

> If the goal is to ensure people don't access a possibly unbound loop variable outside of the loop, that should probably be a different check. Agree, although I'm not...

@charliermarsh I think that should be possible by setting up our own subscriber that then forwards messages to the LSP. I think the problem this approach is that it only...

> Just to confirm, your preferred style uses an 8-space indent, which is unusual and inconsistent with the rest of Black's style. Did you mean to use a 4-space indent,...

These are interesting cases. I did a quick check on how ruff would format these with the new preview style enabled: ```python VALUE = [ Thing(""" value """) ] func(...