Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
[Beta] Tinkering with Pythonista's internals using objc_util
-
@ccc Is that not what Analyze (pyflakes) tool does?
-
It is a difference between active and passive. The Pythonista editor is passive because I have to manually run pyflakes while VSCode is active because it updates the syntax highlighting as I type by running flake8. Given the speed of current iOS CPUs, active syntax highlighting might have acceptable performance.
-
@ccc Ok, I understand but I wanted to say in my answer is that current Pythonista Editor does not allow to intercept at typing, it only checks content with some easy rules.
-
@ccc Upon reflection, I think that it should be possible, via the delegate of the editor's TextView, to intercept the modifications of the source and to execute a code, like flak8, to check the syntax of the script. But it seems to be quite complex
-
It would not need be letter-by-letter, but it would be cool if fixers like "isort ; black ; pyupgrade ----py37-plus" were autorun on the code in the editor. The trick would be for the fixers to fail gracefully if the user is in mid-thought.
-