I need to have this line in the beginning of a python file:
#script_exec_time: 500
There should not be any space between the #
and script_exec_time
. This is because the python file is parsed by another script and it will not consider the script_exec_time
if there is a space.
I cannot modify the script that parses my python file because I do not have access to it.
Now when I lint using pylint, it automatically gives a space between the #
and script_exec_time
.
I tried using other linters like flake8, but even they do the same thing.
I still want to use the linter because it makes it much easier to code.
Is there any way to modify pylint settings so that it ignores comments from it's automatic formatting? Or is there any workaround I could use here?
Edit: I tried the same thing by disabling the linter. The problem persisted. It was not related to linter I think. Anyway I found a workaround and I am posting that as an answer.