Skip to content

Clean up types in the Library code #279

Open

Description

@rozyczko

Go through the code and fix type warnings reported by e.g. Pylance in VS Code

Activity

  1. added
    chore
    on Oct 20, 2025
  2. added
    [scope] maintenance
    [priority] medium
    on Oct 20, 2025
  3. rozyczko commented on May 26, 2026

    @rozyczko
    MemberAuthor

    We should start enabling these rules, as in diffraction-lib:

    select = [
      # Various rules
      'C90',  # https://docs.astral.sh/ruff/rules/#mccabe-c90
      'D',    # https://docs.astral.sh/ruff/rules/#pydocstyle-d
      'F',    # https://docs.astral.sh/ruff/rules/#pyflakes-f
      'FLY',  # https://docs.astral.sh/ruff/rules/#flynt-fly
      'FURB', # https://docs.astral.sh/ruff/rules/#refurb-furb
      'I',    # https://docs.astral.sh/ruff/rules/#isort-i
      'N',    # https://docs.astral.sh/ruff/rules/#pep8-naming-n
      'NPY',  # https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy
      'PGH',  # https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh
      'PERF', # https://docs.astral.sh/ruff/rules/#perflint-perf
      'RUF',  # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
      'TRY',  # https://docs.astral.sh/ruff/rules/#tryceratops-try
      'UP',   # https://docs.astral.sh/ruff/rules/#pyupgrade-up
      # pycodestyle (E, W) rules
      'E', # https://docs.astral.sh/ruff/rules/#error-e
      'W', # https://docs.astral.sh/ruff/rules/#warning-w
      # Pylint (PL) rules
      'PLC', # https://docs.astral.sh/ruff/rules/#convention-plc
      'PLE', # https://docs.astral.sh/ruff/rules/#error-ple
      'PLR', # https://docs.astral.sh/ruff/rules/#refactor-plr
      'PLW', # https://docs.astral.sh/ruff/rules/#warning-plw
      # flake8 rules
      #'A',     # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
      'ANN',   # https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
      'ARG',   # https://docs.astral.sh/ruff/rules/#flake8-unused-arguments-arg
      'ASYNC', # https://docs.astral.sh/ruff/rules/#flake8-async-async
      'B',     # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
      'BLE',   # https://docs.astral.sh/ruff/rules/#flake8-blind-except-ble
      'C4',    # https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
      'COM',   # https://docs.astral.sh/ruff/rules/#flake8-commas-com
      'DTZ',   # https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
      'EM',    # https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
      'FA',    # https://docs.astral.sh/ruff/rules/#flake8-future-annotations-fa
      'FBT',   # https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt
      #'FIX',   # https://docs.astral.sh/ruff/rules/#flake8-fixme-fix
      'G',   # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
      'ICN', # https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn
      'INP', # https://docs.astral.sh/ruff/rules/#flake8-no-pep420-inp
      'ISC', # https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
      'LOG', # https://docs.astral.sh/ruff/rules/#flake8-logging-log
      'PIE', # https://docs.astral.sh/ruff/rules/#flake8-pie-pie
      'PT',  # https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
      'PTH', # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
      'PYI', # https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi
      'RET', # https://docs.astral.sh/ruff/rules/#flake8-return-ret
      'RSE', # https://docs.astral.sh/ruff/rules/#flake8-raise-rse
      'S',   # https://docs.astral.sh/ruff/rules/#flake8-bandit-s
      'SIM', # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
      #'SLF',   # https://docs.astral.sh/ruff/rules/#flake8-self-slf
      'SLOT', # https://docs.astral.sh/ruff/rules/#flake8-slots-slot
      #'T20',   # https://docs.astral.sh/ruff/rules/#flake8-print-t20
      'TC', # https://docs.astral.sh/ruff/rules/#flake8-type-checking-tc
      #'TD',    # https://docs.astral.sh/ruff/rules/#flake8-todos-td
      'TID', # https://docs.astral.sh/ruff/rules/#flake8-tidy-imports-tid
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [priority] medium[scope] maintenancechore

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions