Skip to content

Apply a few ruff/refurb rules (FURB)#1480

Closed
DimitriPapadopoulos wants to merge 0 commit intopypa:masterfrom
DimitriPapadopoulos:refurb
Closed

Apply a few ruff/refurb rules (FURB)#1480
DimitriPapadopoulos wants to merge 0 commit intopypa:masterfrom
DimitriPapadopoulos:refurb

Conversation

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor

I have fixed the few cases which I think result in more readable code.

Would it be OK to add these rules?

identifier = stat.st_dev, stat.st_ino
if identifier in seen:
del dirs[:]
dirs.clear()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might find this one questionable, since del list[:] is a widely used Python idiom. But then list.clear() is explicit, even for those with less exposure to Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant