# .pylintrc
#
# This Pylint configuration file is designed to enforce Google's Python Style Guide.
# It addresses key aspects such as line length, naming conventions, and docstrings.
# For the full guide, see: https://google.github.io/styleguide/pyguide.html
#
# To use this file, save it as `.pylintrc` in the root directory of your project.
# Pylint will automatically detect and use it when you run `pylint your_file.py`.

[MESSAGES CONTROL]
# Disable some messages that are too aggressive or are not explicitly covered by the Google Style Guide.
# This list can be customized based on your project's specific needs.
disable=
    C0114,  # missing-module-docstring (often not needed for small scripts/internal modules)
    C0115,  # missing-class-docstring (optional for private classes)
    C0116,  # missing-function-docstring (optional for private methods)
    C0103,  # invalid-name (we will handle naming conventions more specifically below)
    C0301,  # line-too-long (handled in the [FORMAT] section)
    C0411,  # wrong-import-order (we will configure this explicitly below)
    R0903,  # too-few-public-methods (a class with few methods isn't an error)
    R0913,  # too-many-arguments (discouraged, but not a hard style violation)
    W0511,  # fixme (useful for temporary comments, not an error)
    W1203,  # logging-f-string-interpolation (use of f-strings in logging calls)
    W1201,  # logging-not-lazy (logging messages should be lazy-formatted)
    C0305,  # trailing-newlines (some editors add this automatically)
    C0303,  # trailing-whitespace (handled by many formatters, but let's be explicit)
    W0101,  # unreachable code (behind a "return" or "raise" statement)
    W0107,  # unnecessary-pass (unnecessary pass statement)
    W2301,  # unnecessary-ellipsis
    W0621,  # redefined-outer-name
    E1101,  # no-member



[BASIC]
# Naming conventions according to the Google Style Guide.
# 'snake_case' for functions, variables, and modules.
# 'CamelCase' for classes.
# 'CAPS_WITH_UNDERSCORES' for constants.
# 'mixedCase' is not used, so we disallow it for all variable types.

# Regular expression for a constant's name (e.g., CONST_NAME).
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$

# Regular expression for a function's name (e.g., function_name).
function-rgx=[a-z_][a-z0-9_]{2,30}$

# Regular expression for a variable's name (e.g., variable_name).
variable-rgx=[a-z_][a-z0-9_]{2,30}$

# Regular expression for a class's name (e.g., ClassName).
class-rgx=[A-Z_][a-zA-Z0-9]*$

# Regular expression for a method's name (e.g., method_name).
method-rgx=[a-z_][a-z0-9_]{2,30}$

# Regular expression for a module's name (e.g., module_name.py).
module-rgx=[a-z_][a-z0-9_]*$

# Names that are allowed to be single characters.
good-names=i,j,k,x,y,z,e,_,pk,id

[FORMAT]
# Indentation and line length are key components of the Google Style Guide.
# `max-line-length`: Google's recommendation is 80 characters.
# `indent-string`: Google's recommendation is 4 spaces.
max-line-length=80
indent-string='    '

[DESIGN]
# While not strictly enforced by the style guide, these settings help keep
# functions and classes from becoming too complex, which is good practice.
min-public-methods=1
max-args=5
max-locals=15
max-returns=6
max-attributes=7
max-statements=50

[REPORTS]
# `reports=no` will suppress the summary report, which is often verbose.
# `score=no` will suppress the final Pylint score.
reports=no
score=no

[TYPECHECK]
# We want to enable Pylint's type-checking capabilities.
enable=
    c-extension-no-member,
    no-name-in-module,
    unsubscriptable-object
