Comments (7)
First, let's talk about Linter
and Ruff
.
A linter, in the context of programming, is a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs. The term originates from a Unix utility that examined C language source code.
In Python, linters are used to enforce a consistent coding style and to catch certain types of errors before the code is even run. Using a linter can help to identify syntax errors, structural problems, code smells, and even more complex issues such as detecting unused variables or imports.
The most modern Linter in context of Python is Ruff
.
-
Ruff's GitHub repository is: https://github.com/astral-sh/ruff
-
Ruff's Homepage is: https://beta.ruff.rs
from deutschland.
Great idea, what config is needed so it plays nicely with isort
and black
? Does it replace one or the other?
from deutschland.
From a quick look it seems like it should just work:
Ruff and Black: https://beta.ruff.rs/docs/faq/#is-ruff-compatible-with-black
Ruff and Isort: https://beta.ruff.rs/docs/faq/#how-does-ruffs-import-sorting-compare-to-isort
from deutschland.
You could also entirely replace black with ruff. We've done that multiple times and, subjectively, results stayed the same
from deutschland.
Isn't black basically doing the job of an opinionated linter already for us? But in a style thats encouraged by the psf?
from deutschland.
Isn't black basically doing the job of an opinionated linter already for us? But in a style thats encouraged by the psf?
I'm not sure that ruff can not be configured to mimic black-formatter behaviour - so you'd keep the style encouraged by the psf!
On top of that, I think the main advantages are, that it comes with so much more than just formatting (black and isort).
Configured correctly, it can, among much more, inform you on upgrade-compitability - one of my personal favourites.
from deutschland.
As of version 0.1.2 ruff
also comes with a formatter that should serve as a drop-in replacement for black
. In our company, we have gotten rid of black
and isort
and just use ruff
now as it reduces dependencies and also the pain of having compatibility issues between these tools (import sorting usually gets conflicts). There are rare differences between black
and ruff
formatting, but these were neglegible in the cases I encountered.
from deutschland.
Related Issues (20)
- Create new release HOT 2
- Bundesanzeiger: query of a string starting with a number returns an error HOT 5
- Accessing and downloading (xml, pdf ) files from handelsregister API HOT 2
- Python 3.11 compatability - Dependency Pillow HOT 8
- destatis - Ergebnis?! HOT 2
- Bundesanzeiger - nur Suche bei Rechnungslegung/Finanzberichte möglich? HOT 1
- Link outdated, error 404 HOT 1
- Bundesanzeiger not working properly anymore HOT 6
- Database HOT 1
- Python 3.12 not supported? HOT 4
- Including Unternehmensregister (no new data in Bundesanzeiger for 31.12.2021 onwards)
- Idee: Inflationsraten (VPI) HOT 2
- bundesanzeiger error on widows use the example from MD regex isuue
- Verena test fails for windows
- Bundesanzeiger: Only 1 item is returned for reports w/ same name HOT 2
- Hey,I'm-Jeremy-i-comimg-from-the-shit-land-of-this-world-german
- Geo tests are failing HOT 1
- Handelsregister tests are failing HOT 1
- Get PDF- Documents from Results in "Bundesanzeiger" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deutschland.