While trying to add the @typechecked
property above all (of the 487) functions, I was experiencing some difficulties with finding the right replace command. I intend to go from:
def some_function(
to:
@typechecked
def some_function(
However, when I do Ctrl+H
and replace def
with:
@typechecked
def
The indentation of the def gets lost.
Hence I would like to ask:
How can I add the property typechecked above all functions in all
.py` files in vscode?
2
Answers
use
Find:
^(s*)def
Replace:
$1@typecheckedn$1def
Do a find/replace in VSCode with the following find and replace values: