From the course: Using Rust with Python
Unlock this course with a free trial
Join today to access over 23,200 courses taught by industry experts.
Using the Rust Ruff linter - Rust Tutorial
From the course: Using Rust with Python
Using the Rust Ruff linter
- [Instructor] Ruff is an extremely fast Python linter written in Rust. And it shows how you can write very performant tools in the Rust language for Python. And here's a example here that this 0.29 second compared to a 60 second for Pylint really is so substantial that it's hard to make the case for why you would use a slower linter. And it also has advanced features like caching, et cetera. Now how do we actually play around with this? Well, an easy way to start with this is to go to the Playground. So let's go ahead and select this link. And if you go to this link here, what's nice is it shows you that right here I've got a error and I can actually interact with the linter. So it says remove assignment to unused variables. So let's go ahead and change this. And we could even say, for example, print x to fix it. There we go. And we don't need this semicolon as well. But the main idea here is that you can actually get real time feedback, because of the speed of formatter as well as…
Contents
-
-
Introduction: Instructor45s
-
Introduction: Rust and Python5m
-
PyO3 installation4m 15s
-
(Locked)
Basic Rust library4m 46s
-
(Locked)
Rust to Python3m 33s
-
(Locked)
Rust ownership model4m 59s
-
(Locked)
Diagram of a PyO3 project3m 40s
-
(Locked)
Python calculator CLI3m 54s
-
(Locked)
PyO3 features2m 38s
-
(Locked)
PyO3 exceptions4m 21s
-
(Locked)
Call Python from Rust5m 53s
-
(Locked)
Run Python with embedded Rust4m 47s
-
(Locked)
Embedded Rust CLI diagram3m 34s
-
(Locked)
Embedded Rust CLI4m 31s
-
(Locked)
Embedded Rust CLI test4m 59s
-
(Locked)
Rust-built Python tools3m 52s
-
(Locked)
Using the Rust Ruff linter5m 15s
-
(Locked)
Using Polars in Python with Rust4m 9s
-
(Locked)
Polars CLI in Rust4m
-
(Locked)
Polars CLI test in Rust4m 21s
-
(Locked)
Polars CLI integration test3m 29s
-
(Locked)
Polars criterion benchmarking5m 39s
-