You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In python doc-comments are defined using the multi-line string literal syntax """ xxx """" at the beginning of a module, function, class or method. Tried out tokei on a few of my projects and it grossly miscalculates SLOC because of this, for reference pygount is very accurate.
The text was updated successfully, but these errors were encountered:
@Hultner Thank you for your issue! I'm closing this as a duplicate of #185. Here is what I've said on this issue previously.
Python docstrings are considered code as syntactically they are strings and it requires parsing the code into a Abstract Syntax Tree in order to correctly to determine whether the given """hello world""" is actually code or comments. This might hopefully be resolved when there is a good solution to #67 and there can then be an option for you as the user to decide whether to treat them as code or comments, until then I'm marking this as wontfix.
@Hultner There is now a workaround for this issue: the tokei configuration file (.tokeirc or tokei.toml in the current directory) has an option treat_doc_strings_as_comments = true that enables this behavior.
In python doc-comments are defined using the multi-line string literal syntax
""" xxx """"
at the beginning of a module, function, class or method. Tried out tokei on a few of my projects and it grossly miscalculates SLOC because of this, for reference pygount is very accurate.The text was updated successfully, but these errors were encountered: