Skip to content

False positive for RUF057 with negative ndigits #15221

@UnknownPlatypus

Description

@UnknownPlatypus

ruff propose this change:

-round(150, -2)
+150

which is not valid since round(150, -2) == 200

I believe negative ndigits should be skipped

Related to #14828

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpreviewRelated to preview mode features

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions