[MASTER]
# Ignore virtual environment and generated files
ignore=.venv,__pycache__,.git,monkey-coach,archive

[MESSAGES CONTROL]
# Disable warnings that conflict with physics research or are false positives
disable=
    # Environment-related (linter can't see venv)
    import-error,
    no-member,
    no-name-in-module,

    # Cosmetic - don't enforce strictly for research code
    line-too-long,
    too-many-arguments,
    too-many-locals,
    too-many-instance-attributes,
    too-many-statements,
    too-many-branches,
    too-few-public-methods,
    too-many-lines,

    # Physics-specific - intentional design choices
    invalid-name,  # Allow short variable names like κ, β, Φ
    non-ascii-name,  # Allow Greek letters (Φ, Γ, κ, β) for physics notation
    redefined-outer-name,  # OK for validation functions

    # Documentation - will add docstrings iteratively
    missing-module-docstring,
    missing-class-docstring,
    missing-function-docstring,

    # Type hints - PyTorch doesn't always play nice with type checkers
    unsubscriptable-object,
    unsupported-assignment-operation,
    not-callable,  # False positives on torch.Tensor operations

    # Other reasonable exceptions for research code
    protected-access,  # Sometimes needed for PyTorch internals
    broad-except,  # Intentional for robustness
    bare-except,  # Fallback error handling with logging
    consider-using-f-string,  # Already using f-strings where appropriate

    # Import organization - validation/test scripts use non-standard patterns
    wrong-import-position,  # sys.path.insert before imports is intentional
    import-outside-toplevel,  # Lazy imports for optional features
    relative-beyond-top-level,  # Module structure is correct
    wrong-import-order,  # Import order handled by isort
    ungrouped-imports,  # Import grouping handled by isort
    reimported,  # Conditional reimports are intentional

    # Code style - acceptable for research
    unused-variable,  # May keep for clarity (e.g., unpacking)
    unused-argument,  # API compatibility
    unused-import,  # May be used in comments/type hints
    unspecified-encoding,  # UTF-8 is default in Python 3
    attribute-defined-outside-init,  # Dynamic setup in trainer
    possibly-used-before-assignment,  # False positive from conditional imports
    redefined-builtin,  # OK for locals like 'type', 'id', etc.
    f-string-without-interpolation,  # Intentional for consistency
    fixme,  # TODOs are fine in research code
    unnecessary-pass,  # Sometimes needed for structure
    unbalanced-tuple-unpacking,  # scipy.optimize returns vary
    superfluous-parens,  # Style preference
    consider-using-dict-items,  # Style preference

    # Method signatures - intentional API design
    unexpected-keyword-arg,  # Linter confusion with dynamic args
    no-value-for-parameter,  # Linter confusion with default args
    used-before-assignment,  # False positive in error recovery paths

    # Torch-specific false positives
    unsupported-membership-test,  # torch tensor operations
    unsupported-binary-operation,  # torch operator overloading
    invalid-unary-operand-type,  # torch unary operations

[FORMAT]
max-line-length=120
indent-string='    '

[DESIGN]
max-args=10
max-locals=20
max-attributes=15

[BASIC]
# Allow physics notation
good-names=i,j,k,x,y,z,Q,K,V,d,n,L,S,C,Phi,kappa,beta,alpha

[TYPECHECK]
# Don't check torch module internals
ignored-modules=torch,torch.nn,torch.nn.functional

[SIMILARITIES]
# Disable duplicate code warnings for now
min-similarity-lines=100
