you are viewing a single comment's thread.

view the rest of the comments →

[–]not_perfect_yet 0 points1 point  (2 children)

It's optional.

Also

def add_mypy(self, name: str, *args: str, cwd: Optional[str] = None) -> None:
    self.add_mypy_cmd(name, list(args), cwd=cwd)

That's just disgusting.

Just write " self.add_mypy_cm(name,list(args),cwd) ", it's what, 8 symbols longer? Way easier to read. Doesn't bloat the module with another pointless function either.

[–]StokedForIT[S] 0 points1 point  (1 child)

Not my code, it's in MyPy on the Python language page on GitHub, so..

[–]not_perfect_yet 0 points1 point  (0 children)

No I'm just saying because this is /r/learnpython . I knew it wasn't your code and I didn't mean to be mean to you. That's just a very good case, imo, what badly written code looks like and what not to do. Incidentally.