# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). # All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause [tool.ruff] line-length = 120 target-version = "py310" # Exclude directories extend-exclude = [ "logs", "_isaac_sim", ".vscode", "_*", ".git", ] [tool.ruff.lint] # Enable flake8 rules and other useful ones select = [ "E", # pycodestyle errors "W", # pycodestyle warnings "F", # pyflakes "I", # isort "UP", # pyupgrade "C90", # mccabe complexity # "D", # pydocstyle "SIM", # flake8-simplify "RET", # flake8-return ] # Ignore specific rules (matching your flake8 config) ignore = [ "E402", # Module level import not at top of file "D401", # First line should be in imperative mood "RET504", # Unnecessary variable assignment before return statement "RET505", # Unnecessary elif after return statement "SIM102", # Use a single if-statement instead of nested if-statements "SIM103", # Return the negated condition directly "SIM108", # Use ternary operator instead of if-else statement "SIM117", # Merge with statements for context managers "SIM118", # Use {key} in {dict} instead of {key} in {dict}.keys() "UP006", # Use 'dict' instead of 'Dict' type annotation "UP018", # Unnecessary `float` call (rewrite as a literal) ] [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] # Allow unused imports in __init__.py files [tool.ruff.lint.mccabe] max-complexity = 30 [tool.ruff.lint.pydocstyle] convention = "google" [tool.ruff.lint.isort] # Custom import sections with separate sections for each Isaac Lab extension section-order = [ "future", "standard-library", "third-party", # Group omniverse extensions separately since they are run-time dependencies # which are pulled in by Isaac Lab extensions "omniverse-extensions", # Group Isaac Lab extensions together since they are all part of the Isaac Lab project "isaaclab", "isaaclab-rl", "isaaclab-mimic", "isaaclab-tasks", "isaaclab-assets", # First-party is reserved for project templates "first-party", "local-folder", ] [tool.ruff.lint.isort.sections] # Define what belongs in each custom section "omniverse-extensions" = [ "isaacsim", "omni", "pxr", "carb", "usdrt", "Semantics", "curobo", ] "isaaclab" = ["isaaclab"] "isaaclab-assets" = ["isaaclab_assets"] "isaaclab-rl" = ["isaaclab_rl"] "isaaclab-mimic" = ["isaaclab_mimic"] "isaaclab-tasks" = ["isaaclab_tasks"] [tool.ruff.format] docstring-code-format = true [tool.pyright] include = ["source", "scripts"] exclude = [ "**/__pycache__", "**/_isaac_sim", "**/docs", "**/logs", ".git", ".vscode", ] typeCheckingMode = "basic" pythonVersion = "3.11" pythonPlatform = "Linux" enableTypeIgnoreComments = true # This is required as the CI pre-commit does not download the module (i.e. numpy, torch, prettytable) # Therefore, we have to ignore missing imports reportMissingImports = "none" # This is required to ignore for type checks of modules with stubs missing. reportMissingModuleSource = "none" # -> most common: prettytable in mdp managers reportGeneralTypeIssues = "none" # -> raises 218 errors (usage of literal MISSING in dataclasses) reportOptionalMemberAccess = "warning" # -> raises 8 errors reportPrivateUsage = "warning" [tool.codespell] skip = '*.usd,*.usda,*.usdz,*.svg,*.png,_isaac_sim*,*.bib,*.css,*/_build' quiet-level = 0 # the world list should always have words in lower case ignore-words-list = "haa,slq,collapsable,buss,reacher,thirdparty" [tool.pytest.ini_options] markers = [ "isaacsim_ci: mark test to run in isaacsim ci", ]