[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"use strict"

On 03/11/2019 01:00 PM, Abdur-Rahmaan Janhangeer wrote:
> the problem was that i was reviewing the code, since everything worked (no
> errors but wrong output for sure) it took sometimes to find that var. it
> was like someone telling me there is fish in that lake and i was throwing
> my line trying ...

Code review is precisely the sort of time when a linter should be run on
the code to try to flag potential problems like this.  Sure it will flag
things that don't really matter, but you can ignore those.

Additionally using the type annotations that are now a part of Python
(3) will help the linter be even more useful to you in this scenario.

> just a way to flag those types of vars when needed.

Until you forget to flag one sometime.  Or end up flagging every
variable, which takes us back around to type annotations and linters.

So no, the answer is probably still, use a linter.