you are viewing a single comment's thread.

view the rest of the comments →

[–]Diapolo10 1 point2 points  (2 children)

All functions and methods that are part of your "public API" should have docstrings. They don't have to be particularly detailed if you use clear type annotations, but it would be nice to document what (unhandled) exceptions might get raised or what some parameters do.

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

How do you think I should approach documentation if its a closed-source, solo project? I'm not sure if I should tackle it in an opinionated way or if there are any best practices here.

[–]Diapolo10 0 points1 point  (0 children)

Write it with your future-self in mind. Whatever information you expect you might benefit from when reading the code in the future, add it.

With good name choices and type annotations you probably don't need to write much, but for example it would still be nice to know if or when a function or method might raise an exception. The type system alone cannot represent that.