Wenn du dir nicht sicher bist, in welchem der anderen Foren du die Frage stellen sollst, dann bist du hier im Forum für allgemeine Fragen sicher richtig.
@Bright4.55: VSV kann das und es gibt entsprechende Plugins um das noch zu erweitern.
Gefühlt kann das aber jeder bessere Editor. Also wenn ds nicht gerade der Standardeditor von Windows.
„Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.“ — Brian W. Kernighan
Jeder sinnvolle Editor weiß, dass man nach einem : die nächste Zeile um 4 Leerzeichen einrücken muß. Ob das "richtig" ist, muß aber die Person vor dem Bildschirm wissen.
Ansonsten gibt es noch etliche Projekte, die eine einheitliche Formatierung von Python-Dateien erreichen wollen. Das Thema heißt "linter".
(https://www.marketcalls.in/python/a-com ... ained.html)
Also zwischen Linter und Formatter gibt es eine ziemlich deutliche Grenze. Linter sagen einem nur was für Probleme sie im Code gefunden haben, und das geht deutlich über Meldungen zur Formatierung hinaus. Während Formatierer aktiv den Quelltext umformatieren, dafür aber keine Meldungen über andere, inhaltliche Probleme machen. Pylint kann als Linter nicht den Formatierer Black oder Ruff ersetzen und umgekehrt.
„Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.“ — Brian W. Kernighan
Das ist dann nach eigener Ansicht auch beides: „An extremely fast Python linter and code formatter, written in Rust.“
„Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.“ — Brian W. Kernighan