I committed some of my server side code into my Anvil’s project repository. These codes was written by VSCode on my computer and was running locally on my computer as uplink code.
As a results - I assume it is the reason -, I can see these codes within my Anvil’s project under Server Codes.
When I try to modify that code using Anvil’s editor, I’ve got “Syntax Error: Unindent does not match any outer indentation level”
As I can see does not matter what am I doing it is always wrong, so the only thing I can think about is spaces vs tab.
In VSCode I use tabs, but it seems this does not work within Anvil’s editor. Not sure if this is the problem, but every line I modify trigger this error.
I could convert all of my codes to space using VSCode but I rather not. There is reasons why I am preferring tabs over spaces.
Yes, tabs are not compatible with spaces in python.
If the problem is uplink scripts, then you can solve it by putting those in a different folder, as mentioned on the other post.
If the problem is that you opened one of the app files in vs and ended up with some tabs in it, then you need to convert the tabs back to spaces, because the Anvil ide would fight it back and add spaces.
Then you can just use black everywhere and never worry about this again and actually have your git blame and diffs work as intended for once (as long as everyone else uses black also)
Also you can set VScode to autoformat with black on save.