Linters

linters.Linters()

Checks if requested linter (or static type checker) is available.

Attributes

Name Type Description
supported dict Dictionary of supported linters - key is the name of the package, and value is the command that users would run before specifying files (e.g. “radon cc” - full command would then be “radon cc [file/dir]”).

Methods

Name Description
check_available Check if a linter is available in the user’s system.
check_supported Check if linter is supported by lintquarto.

check_available

linters.Linters.check_available(linter_name)

Check if a linter is available in the user’s system.

Parameters

Name Type Description Default
linter_name str Name of the linter to check. required

Raises

Name Type Description
FileNotFoundError If the linter’s command is not found in the user’s PATH.

check_supported

linters.Linters.check_supported(linter_name)

Check if linter is supported by lintquarto.

Parameters

Name Type Description Default
linter_name str Name of the linter to check. required

Raises

Name Type Description
ValueError If linter is not supported.