I have noticed my code would very very rarely skip certain lines that it should run. It would all run fine for weeks then suddenly there would be an error somewhere because some variable did not get updated because that part was skipped. Today I spent hours researching and came across the async programming concept. There it says that sometimes line are indeed skipped and this perfectly explains my situation.
So my question is, does Kite API use async programming concept and if it does, how do I make sure no lines are skipped in execution?
As you are using Pykiteconnect here, these APIs are synchronous by default. It internally uses requests HTTP library, which makes synchronous requests.
how do I make sure that all lines of any function are being run?
You need to debug this on your end. Check if these lines are conditionally skipped, etc.
It is impossible for them to be skipped on a conditional basis. They are just lines inside a function that has no if statement or return or anything that could cause the lines to skip over.