Skip to content

Config

This section contains the reference for the implementation of tokei's Config struct.

Config

Config() -> None

A configuration struct for how Languages.get_statistics searches and counts languages.

References

tokei reference

Examples

>>> conf = pytokei.Config()
>>> conf
Config()

columns property

columns() -> int

Width of columns to be printed to the terminal. This option is ignored in the library. Default: Auto detected width of the terminal. tokei reference.

from_config_files staticmethod

from_config_files() -> Config

Creates a Config from three configuration files if they are available. tokei reference.

hidden property

hidden() -> bool

Count hidden files and directories. Default: false. tokei reference.

no_ignore property

no_ignore() -> bool

Don't respect ignore files (.gitignore, .ignore, etc.). tokei reference.

no_ignore_dot property

no_ignore_dot() -> bool

Don't respect .ignore and .tokeignore files, including those in parent directories. Default: false. tokei reference.

no_ignore_parent property

no_ignore_parent() -> bool

Don't respect ignore files (.gitignore, .ignore, etc.) in parent directories. Default: false. tokei reference.

no_ignore_vcs property

no_ignore_vcs() -> bool

Don't respect VCS ignore files (.gitignore, .hgignore, etc.), including those in parent directories. Default: false. tokei reference.

treat_doc_strings_as_comments property

treat_doc_strings_as_comments() -> bool

Whether to treat doc strings in languages as comments. Default: false. tokei reference.