nornir-automation / nornir

Pluggable multi-threaded framework with inventory management to help operate collections of devices
https://nornir.readthedocs.io/
Apache License 2.0
1.36k stars 228 forks source link

Suggestion: Introduce Ruff #919

Closed ogenstad closed 3 weeks ago

ogenstad commented 1 month ago

Introduce Ruff and have it replace:

While Ruff also has checks for type annotations the recommendation is still to keep using mypy.

Thoughts around this @dbarrosop & @ktbyers?

dbarrosop commented 1 month ago

I have no opinion, as long as it covers the same functionality (or even more) than the ones being replaced I am good. The formatter is the only thing that I am not sure about. Is it as extremely opinionated as black? I may not always agree with black but I like that I (or anyone else) have no choice other than to abide by it :)

ogenstad commented 1 month ago

Ruff will have more functionality, it's pretty much as opinionated as Black (https://docs.astral.sh/ruff/formatter/#black-compatibility), there are some slight changes depending on the codebase there could be a small number of lines that change during the migration.

I think it's nice as it's fewer tools to deal with, it's also faster though that doesn't have much of an impact on this codebase.

ktbyers commented 1 month ago

I am fine either way on this.

dbarrosop commented 1 month ago

Yeah, I am good with the change too.

ogenstad commented 3 weeks ago

Fixed in #926 and #930