The galois library uses pylint for static analysis and code formatting.


First, pylint needs to be installed on your system. Easily install it by installing the development dependencies.

$ python3 -m pip install .[dev]


Various nuisance pylint warnings are added to an ignore list in pyproject.toml.

ignore-paths = [
disable = [
    "comparison-with-callable",  # pylint doesn't understand metaclass properties
min-similarity-lines = 100
max-line-length = 120

line-length = 120
exclude = '''
    | src/galois/
# NOTE: You must use single-quoted strings in TOML for regular expressions. It's the equivalent of r-strings in Python.
# For some reason, this exclude line doesn't work when on a single line.

profile = "black"

Run from the command line

Run the linter manually from the command line.

$ python3 -m pylint src/galois/

Run from VS Code

Included is a VS Code configuration file .vscode/settings.json. This instructs VS Code about how to invoke pylint. VS Code will run the linter as you view and edit files.

Last update: May 07, 2023