glob_linters.utils package#
Submodules#
glob_linters.utils.io module#
IO functions
- glob_linters.utils.io.scan(target_dirs: list[str], suffixes: list[str]) dict[str, list[str]][source]#
Scan directories to obtain target files
- Parameters:
target_dirs (list[str]) – Directories to be scanned
suffix (list[str]) – Expected file suffix
- Returns:
Absolute paths of target files
- Return type:
dict[str, list[str]]
glob_linters.utils.settings module#
Configuration
- class glob_linters.utils.settings.Configs[source]#
Bases:
objectClass to store configs/settings
- available_configs: ClassVar[dict[str, list[str]]] = {'.cpp': ['enabled_linters', 'disabled_linters'], '.cpp:clang_format': ['executable', 'options', 'config_file'], '.cpp:cpplint': ['executable', 'options', 'config_file'], '.py': ['enabled_linters', 'disabled_linters'], '.py:black': ['executable', 'options', 'config_file'], '.py:flake8': ['executable', 'options', 'config_file'], '.py:isort': ['executable', 'options', 'config_file'], '.py:mypy': ['executable', 'options', 'config_file'], '.py:pylint': ['executable', 'options', 'config_file'], 'DEFAULT': [], 'env': ['debug', 'extra_python_package_requirements'], 'target': ['dirs', 'suffixes']}#
- available_suffix_linters: ClassVar[list[str]] = ['.cpp:cpplint', '.cpp:clang_format', '.py:pylint', '.py:flake8', '.py:black', '.py:isort', '.py:mypy']#
- clang_format: ClassVar[ClangFormat] = <glob_linters.linters.ClangFormat object>#
- debug: ClassVar[bool] = False#
- has_read_config_file: ClassVar[bool] = False#
- linters_enabled: ClassVar[dict[str, list[str]]] = {'.cpp': ['cpplint', 'clang_format'], '.py': ['pylint', 'flake8', 'black', 'isort', 'mypy']}#
- return_code: ClassVar[int] = 0#
- target_dirs: ClassVar[list[str]] = ['.']#
- target_suffixes: ClassVar[list[str]] = ['.cpp', '.py']#