content: # This file is part of the tschm/.config-templates repository
  # (https://github.com/tschm/.config-templates).
  #
  # Maximum line length for the entire project
  line-length = 120
  # Target Python version
  target-version = "py311"
  
  # Exclude directories with Jinja template variables in their names
  exclude = ["**/[{][{]*/", "**/*[}][}]*/"]
  
  [lint]
  # Available rule sets in Ruff:
  # A: flake8-builtins - Check for python builtins being used as variables or parameters
  # B: flake8-bugbear - Find likely bugs and design problems
  # C4: flake8-comprehensions - Helps write better list/set/dict comprehensions
  # D: pydocstyle - Check docstring style
  # E: pycodestyle errors - PEP 8 style guide
  # ERA: eradicate - Find commented out code
  # F: pyflakes - Detect logical errors
  # I: isort - Sort imports
  # N: pep8-naming - Check PEP 8 naming conventions
  # PT: flake8-pytest-style - Check pytest best practices
  # RUF: Ruff-specific rules
  # S: flake8-bandit - Find security issues
  # SIM: flake8-simplify - Simplify code
  # T10: flake8-debugger - Check for debugger imports and calls
  # UP: pyupgrade - Upgrade syntax for newer Python
  # W: pycodestyle warnings - PEP 8 style guide warnings
  # ANN: flake8-annotations - Type annotation checks
  # ARG: flake8-unused-arguments - Unused arguments
  # BLE: flake8-blind-except - Check for blind except statements
  # COM: flake8-commas - Trailing comma enforcement
  # DTZ: flake8-datetimez - Ensure timezone-aware datetime objects
  # EM: flake8-errmsg - Check error message strings
  # FBT: flake8-boolean-trap - Boolean argument checks
  # ICN: flake8-import-conventions - Import convention enforcement
  # ISC: flake8-implicit-str-concat - Implicit string concatenation
  # NPY: NumPy-specific rules
  # PD: pandas-specific rules
  # PGH: pygrep-hooks - Grep-based checks
  # PIE: flake8-pie - Miscellaneous rules
  # PL: Pylint rules
  # Q: flake8-quotes - Quotation style enforcement
  # RSE: flake8-raise - Raise statement checks
  # RET: flake8-return - Return statement checks
  # SLF: flake8-self - Check for self references
  # TCH: flake8-type-checking - Type checking imports
  # TID: flake8-tidy-imports - Import tidying
  # TRY: flake8-try-except-raise - Try/except/raise checks
  # YTT: flake8-2020 - Python 2020+ compatibility
  
  # Selected rule sets to enforce:
  # D: pydocstyle - Check docstring style
  # E: pycodestyle errors - PEP 8 style guide
  # F: pyflakes - Detect logical errors
  # I: isort - Sort imports
  # N: pep8-naming - Check PEP 8 naming conventions
  # W: pycodestyle warnings - PEP 8 style guide warnings
  # UP: pyupgrade - Upgrade syntax for newer Python
  select = ["D", "E", "F", "I", "N", "W", "UP"]
  
  [lint.pydocstyle]
  convention = "google"
  
  # Formatting configuration
  [format]
  # Use double quotes for strings
  quote-style = "double"
  # Use spaces for indentation
  indent-style = "space"
  # Automatically detect and use the appropriate line ending
  line-ending = "auto"
  
  # File-specific rule exceptions
  [lint.per-file-ignores]
  "tests/**/*.py" = ["S101"]        # Allow assert statements in tests
  "book/marimo/*.py" = ["N803", "S101"] # Allow non-lowercase variable names (N803)
                                        # and assert statements in marimo files
  