[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-astral-ruff":3,"mdc--a17p6h-key":27,"related-org-astral-ruff":1252,"related-repo-astral-ruff":1280},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":17,"repoUrl":18,"updatedAt":19,"license":20,"forks":21,"topics":22,"repo":23,"sourceUrl":25,"mdContent":26},"ruff","lint and format Python code with ruff","Guide for using ruff, the extremely fast Python linter and formatter. Use this when linting, formatting, or fixing Python code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"astral","Astral (uv, Ruff)","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fastral.png","astral-sh",[13],{"name":14,"slug":15,"type":16},"Python","python","tag",286,"https:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fclaude-code-plugins","2026-07-12T08:08:46.65062",null,12,[],{"repoUrl":18,"stars":17,"forks":21,"topics":24,"description":20},[],"https:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fclaude-code-plugins\u002Ftree\u002FHEAD\u002Fplugins\u002Fastral\u002Fskills\u002Fruff","---\nname: ruff\ndescription:\n  Guide for using ruff, the extremely fast Python linter and formatter. Use this\n  when linting, formatting, or fixing Python code.\n---\n\n# ruff\n\nRuff is an extremely fast Python linter and code formatter. It replaces Flake8,\nisort, Black, pyupgrade, autoflake, and dozens of other tools.\n\n## When to use ruff\n\n**Always use ruff for Python linting and formatting**, especially if you see:\n\n- `[tool.ruff]` section in `pyproject.toml`\n- A `ruff.toml` or `.ruff.toml` configuration file\n\nHowever, avoid making unnecessary changes:\n\n- **Don't format unformatted code** - If `ruff format --diff` shows changes\n  throughout an entire file, the project likely isn't using ruff for formatting.\n  Skip formatting to avoid obscuring actual changes.\n- **Scope fixes to code being edited** - Use `ruff check --diff` to see fixes\n  relevant to the code you're changing. Only apply fixes to files you're\n  modifying unless the user explicitly asks for broader fixes.\n\n## How to invoke ruff\n\n- `uv run ruff ...` - Use when ruff is in the project's dependencies to ensure\n  you use the pinned version\n- `uvx ruff ...` - Use when ruff is not a project dependency, or for quick\n  one-off checks\n- `ruff ...` - Use if ruff is installed globally\n\n## Commands\n\n### Linting\n\n```bash\nruff check .                  # Check all files in current directory\nruff check path\u002Fto\u002Ffile.py    # Check specific file\nruff check --fix .            # Auto-fix fixable violations\nruff check --fix --unsafe-fixes .  # Include unsafe fixes (review changes!)\nruff check --watch .          # Watch for changes and re-lint\nruff check --select E,F .     # Only check specific rules\nruff check --ignore E501 .    # Ignore specific rules\nruff rule E501                # Explain a specific rule\nruff linter                   # List available linters\n```\n\n### Formatting\n\n```bash\nruff format .                 # Format all files\nruff format path\u002Fto\u002Ffile.py   # Format specific file\nruff format --check .         # Check if files are formatted (no changes)\nruff format --diff .          # Show formatting diff without applying\n```\n\n## Configuration\n\nRuff is configured in `pyproject.toml` or `ruff.toml`:\n\n```toml\n# pyproject.toml\n[tool.ruff.lint]\nselect = [\"E\", \"F\", \"I\", \"UP\"]  # Enable specific rule sets\nignore = [\"E501\"]               # Ignore specific rules\n\n[tool.ruff.lint.isort]\nknown-first-party = [\"myproject\"]\n```\n\n## Migrating from other tools\n\n### Black → ruff format\n\n```bash\nblack .                       → ruff format .\nblack --check .               → ruff format --check .\nblack --diff .                → ruff format --diff .\n```\n\n### Flake8 → ruff check\n\n```bash\nflake8 .                      → ruff check .\nflake8 --select E,F .         → ruff check --select E,F .\nflake8 --ignore E501 .        → ruff check --ignore E501 .\n```\n\n### isort → ruff check\n\n```bash\nisort .                       → ruff check --select I --fix .\nisort --check .               → ruff check --select I .\nisort --diff .                → ruff check --select I --diff .\n```\n\n## Common patterns\n\n### Apply lint fixes before formatting\n\nRun `ruff check --fix` before `ruff format`. Lint fixes can change code\nstructure (e.g., reordering imports), which formatting then cleans up.\n\n```bash\nruff check --fix .\nruff format .\n```\n\n### Applying and reviewing unsafe fixes\n\nRuff categorizes some auto-fixes as \"unsafe\" because they may change code\nbehavior, not just style. For example, removing unused imports could break code\nthat relies on side effects.\n\n```bash\nruff check --fix --unsafe-fixes --diff .  # Preview changes first\nruff check --fix --unsafe-fixes .         # Apply changes\n```\n\n**Always review changes before applying `--unsafe-fixes`:**\n\n- Use `ruff rule \u003CCODE>` to understand why the fix is considered unsafe\n- Verify the fix doesn't violate those assumptions in your code\n\n## Documentation\n\nFor detailed information, read the official documentation:\n\n- https:\u002F\u002Fdocs.astral.sh\u002Fruff\u002F\n",{"data":28,"body":29},{"name":4,"description":6},{"type":30,"children":31},"root",[32,39,45,52,63,107,112,151,157,193,199,206,451,457,555,561,579,645,651,657,767,773,897,903,1033,1039,1045,1066,1107,1113,1118,1185,1200,1221,1227,1232,1246],{"type":33,"tag":34,"props":35,"children":36},"element","h1",{"id":4},[37],{"type":38,"value":4},"text",{"type":33,"tag":40,"props":41,"children":42},"p",{},[43],{"type":38,"value":44},"Ruff is an extremely fast Python linter and code formatter. It replaces Flake8,\nisort, Black, pyupgrade, autoflake, and dozens of other tools.",{"type":33,"tag":46,"props":47,"children":49},"h2",{"id":48},"when-to-use-ruff",[50],{"type":38,"value":51},"When to use ruff",{"type":33,"tag":40,"props":53,"children":54},{},[55,61],{"type":33,"tag":56,"props":57,"children":58},"strong",{},[59],{"type":38,"value":60},"Always use ruff for Python linting and formatting",{"type":38,"value":62},", especially if you see:",{"type":33,"tag":64,"props":65,"children":66},"ul",{},[67,86],{"type":33,"tag":68,"props":69,"children":70},"li",{},[71,78,80],{"type":33,"tag":72,"props":73,"children":75},"code",{"className":74},[],[76],{"type":38,"value":77},"[tool.ruff]",{"type":38,"value":79}," section in ",{"type":33,"tag":72,"props":81,"children":83},{"className":82},[],[84],{"type":38,"value":85},"pyproject.toml",{"type":33,"tag":68,"props":87,"children":88},{},[89,91,97,99,105],{"type":38,"value":90},"A ",{"type":33,"tag":72,"props":92,"children":94},{"className":93},[],[95],{"type":38,"value":96},"ruff.toml",{"type":38,"value":98}," or ",{"type":33,"tag":72,"props":100,"children":102},{"className":101},[],[103],{"type":38,"value":104},".ruff.toml",{"type":38,"value":106}," configuration file",{"type":33,"tag":40,"props":108,"children":109},{},[110],{"type":38,"value":111},"However, avoid making unnecessary changes:",{"type":33,"tag":64,"props":113,"children":114},{},[115,133],{"type":33,"tag":68,"props":116,"children":117},{},[118,123,125,131],{"type":33,"tag":56,"props":119,"children":120},{},[121],{"type":38,"value":122},"Don't format unformatted code",{"type":38,"value":124}," - If ",{"type":33,"tag":72,"props":126,"children":128},{"className":127},[],[129],{"type":38,"value":130},"ruff format --diff",{"type":38,"value":132}," shows changes\nthroughout an entire file, the project likely isn't using ruff for formatting.\nSkip formatting to avoid obscuring actual changes.",{"type":33,"tag":68,"props":134,"children":135},{},[136,141,143,149],{"type":33,"tag":56,"props":137,"children":138},{},[139],{"type":38,"value":140},"Scope fixes to code being edited",{"type":38,"value":142}," - Use ",{"type":33,"tag":72,"props":144,"children":146},{"className":145},[],[147],{"type":38,"value":148},"ruff check --diff",{"type":38,"value":150}," to see fixes\nrelevant to the code you're changing. Only apply fixes to files you're\nmodifying unless the user explicitly asks for broader fixes.",{"type":33,"tag":46,"props":152,"children":154},{"id":153},"how-to-invoke-ruff",[155],{"type":38,"value":156},"How to invoke ruff",{"type":33,"tag":64,"props":158,"children":159},{},[160,171,182],{"type":33,"tag":68,"props":161,"children":162},{},[163,169],{"type":33,"tag":72,"props":164,"children":166},{"className":165},[],[167],{"type":38,"value":168},"uv run ruff ...",{"type":38,"value":170}," - Use when ruff is in the project's dependencies to ensure\nyou use the pinned version",{"type":33,"tag":68,"props":172,"children":173},{},[174,180],{"type":33,"tag":72,"props":175,"children":177},{"className":176},[],[178],{"type":38,"value":179},"uvx ruff ...",{"type":38,"value":181}," - Use when ruff is not a project dependency, or for quick\none-off checks",{"type":33,"tag":68,"props":183,"children":184},{},[185,191],{"type":33,"tag":72,"props":186,"children":188},{"className":187},[],[189],{"type":38,"value":190},"ruff ...",{"type":38,"value":192}," - Use if ruff is installed globally",{"type":33,"tag":46,"props":194,"children":196},{"id":195},"commands",[197],{"type":38,"value":198},"Commands",{"type":33,"tag":200,"props":201,"children":203},"h3",{"id":202},"linting",[204],{"type":38,"value":205},"Linting",{"type":33,"tag":207,"props":208,"children":213},"pre",{"className":209,"code":210,"language":211,"meta":212,"style":212},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","ruff check .                  # Check all files in current directory\nruff check path\u002Fto\u002Ffile.py    # Check specific file\nruff check --fix .            # Auto-fix fixable violations\nruff check --fix --unsafe-fixes .  # Include unsafe fixes (review changes!)\nruff check --watch .          # Watch for changes and re-lint\nruff check --select E,F .     # Only check specific rules\nruff check --ignore E501 .    # Ignore specific rules\nruff rule E501                # Explain a specific rule\nruff linter                   # List available linters\n","bash","",[214],{"type":33,"tag":72,"props":215,"children":216},{"__ignoreMap":212},[217,245,267,293,323,349,380,411,433],{"type":33,"tag":218,"props":219,"children":222},"span",{"class":220,"line":221},"line",1,[223,228,234,239],{"type":33,"tag":218,"props":224,"children":226},{"style":225},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[227],{"type":38,"value":4},{"type":33,"tag":218,"props":229,"children":231},{"style":230},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[232],{"type":38,"value":233}," check",{"type":33,"tag":218,"props":235,"children":236},{"style":230},[237],{"type":38,"value":238}," .",{"type":33,"tag":218,"props":240,"children":242},{"style":241},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[243],{"type":38,"value":244},"                  # Check all files in current directory\n",{"type":33,"tag":218,"props":246,"children":248},{"class":220,"line":247},2,[249,253,257,262],{"type":33,"tag":218,"props":250,"children":251},{"style":225},[252],{"type":38,"value":4},{"type":33,"tag":218,"props":254,"children":255},{"style":230},[256],{"type":38,"value":233},{"type":33,"tag":218,"props":258,"children":259},{"style":230},[260],{"type":38,"value":261}," path\u002Fto\u002Ffile.py",{"type":33,"tag":218,"props":263,"children":264},{"style":241},[265],{"type":38,"value":266},"    # Check specific file\n",{"type":33,"tag":218,"props":268,"children":270},{"class":220,"line":269},3,[271,275,279,284,288],{"type":33,"tag":218,"props":272,"children":273},{"style":225},[274],{"type":38,"value":4},{"type":33,"tag":218,"props":276,"children":277},{"style":230},[278],{"type":38,"value":233},{"type":33,"tag":218,"props":280,"children":281},{"style":230},[282],{"type":38,"value":283}," --fix",{"type":33,"tag":218,"props":285,"children":286},{"style":230},[287],{"type":38,"value":238},{"type":33,"tag":218,"props":289,"children":290},{"style":241},[291],{"type":38,"value":292},"            # Auto-fix fixable violations\n",{"type":33,"tag":218,"props":294,"children":296},{"class":220,"line":295},4,[297,301,305,309,314,318],{"type":33,"tag":218,"props":298,"children":299},{"style":225},[300],{"type":38,"value":4},{"type":33,"tag":218,"props":302,"children":303},{"style":230},[304],{"type":38,"value":233},{"type":33,"tag":218,"props":306,"children":307},{"style":230},[308],{"type":38,"value":283},{"type":33,"tag":218,"props":310,"children":311},{"style":230},[312],{"type":38,"value":313}," --unsafe-fixes",{"type":33,"tag":218,"props":315,"children":316},{"style":230},[317],{"type":38,"value":238},{"type":33,"tag":218,"props":319,"children":320},{"style":241},[321],{"type":38,"value":322},"  # Include unsafe fixes (review changes!)\n",{"type":33,"tag":218,"props":324,"children":326},{"class":220,"line":325},5,[327,331,335,340,344],{"type":33,"tag":218,"props":328,"children":329},{"style":225},[330],{"type":38,"value":4},{"type":33,"tag":218,"props":332,"children":333},{"style":230},[334],{"type":38,"value":233},{"type":33,"tag":218,"props":336,"children":337},{"style":230},[338],{"type":38,"value":339}," --watch",{"type":33,"tag":218,"props":341,"children":342},{"style":230},[343],{"type":38,"value":238},{"type":33,"tag":218,"props":345,"children":346},{"style":241},[347],{"type":38,"value":348},"          # Watch for changes and re-lint\n",{"type":33,"tag":218,"props":350,"children":352},{"class":220,"line":351},6,[353,357,361,366,371,375],{"type":33,"tag":218,"props":354,"children":355},{"style":225},[356],{"type":38,"value":4},{"type":33,"tag":218,"props":358,"children":359},{"style":230},[360],{"type":38,"value":233},{"type":33,"tag":218,"props":362,"children":363},{"style":230},[364],{"type":38,"value":365}," --select",{"type":33,"tag":218,"props":367,"children":368},{"style":230},[369],{"type":38,"value":370}," E,F",{"type":33,"tag":218,"props":372,"children":373},{"style":230},[374],{"type":38,"value":238},{"type":33,"tag":218,"props":376,"children":377},{"style":241},[378],{"type":38,"value":379},"     # Only check specific rules\n",{"type":33,"tag":218,"props":381,"children":383},{"class":220,"line":382},7,[384,388,392,397,402,406],{"type":33,"tag":218,"props":385,"children":386},{"style":225},[387],{"type":38,"value":4},{"type":33,"tag":218,"props":389,"children":390},{"style":230},[391],{"type":38,"value":233},{"type":33,"tag":218,"props":393,"children":394},{"style":230},[395],{"type":38,"value":396}," --ignore",{"type":33,"tag":218,"props":398,"children":399},{"style":230},[400],{"type":38,"value":401}," E501",{"type":33,"tag":218,"props":403,"children":404},{"style":230},[405],{"type":38,"value":238},{"type":33,"tag":218,"props":407,"children":408},{"style":241},[409],{"type":38,"value":410},"    # Ignore specific rules\n",{"type":33,"tag":218,"props":412,"children":414},{"class":220,"line":413},8,[415,419,424,428],{"type":33,"tag":218,"props":416,"children":417},{"style":225},[418],{"type":38,"value":4},{"type":33,"tag":218,"props":420,"children":421},{"style":230},[422],{"type":38,"value":423}," rule",{"type":33,"tag":218,"props":425,"children":426},{"style":230},[427],{"type":38,"value":401},{"type":33,"tag":218,"props":429,"children":430},{"style":241},[431],{"type":38,"value":432},"                # Explain a specific rule\n",{"type":33,"tag":218,"props":434,"children":436},{"class":220,"line":435},9,[437,441,446],{"type":33,"tag":218,"props":438,"children":439},{"style":225},[440],{"type":38,"value":4},{"type":33,"tag":218,"props":442,"children":443},{"style":230},[444],{"type":38,"value":445}," linter",{"type":33,"tag":218,"props":447,"children":448},{"style":241},[449],{"type":38,"value":450},"                   # List available linters\n",{"type":33,"tag":200,"props":452,"children":454},{"id":453},"formatting",[455],{"type":38,"value":456},"Formatting",{"type":33,"tag":207,"props":458,"children":460},{"className":209,"code":459,"language":211,"meta":212,"style":212},"ruff format .                 # Format all files\nruff format path\u002Fto\u002Ffile.py   # Format specific file\nruff format --check .         # Check if files are formatted (no changes)\nruff format --diff .          # Show formatting diff without applying\n",[461],{"type":33,"tag":72,"props":462,"children":463},{"__ignoreMap":212},[464,485,505,530],{"type":33,"tag":218,"props":465,"children":466},{"class":220,"line":221},[467,471,476,480],{"type":33,"tag":218,"props":468,"children":469},{"style":225},[470],{"type":38,"value":4},{"type":33,"tag":218,"props":472,"children":473},{"style":230},[474],{"type":38,"value":475}," format",{"type":33,"tag":218,"props":477,"children":478},{"style":230},[479],{"type":38,"value":238},{"type":33,"tag":218,"props":481,"children":482},{"style":241},[483],{"type":38,"value":484},"                 # Format all files\n",{"type":33,"tag":218,"props":486,"children":487},{"class":220,"line":247},[488,492,496,500],{"type":33,"tag":218,"props":489,"children":490},{"style":225},[491],{"type":38,"value":4},{"type":33,"tag":218,"props":493,"children":494},{"style":230},[495],{"type":38,"value":475},{"type":33,"tag":218,"props":497,"children":498},{"style":230},[499],{"type":38,"value":261},{"type":33,"tag":218,"props":501,"children":502},{"style":241},[503],{"type":38,"value":504},"   # Format specific file\n",{"type":33,"tag":218,"props":506,"children":507},{"class":220,"line":269},[508,512,516,521,525],{"type":33,"tag":218,"props":509,"children":510},{"style":225},[511],{"type":38,"value":4},{"type":33,"tag":218,"props":513,"children":514},{"style":230},[515],{"type":38,"value":475},{"type":33,"tag":218,"props":517,"children":518},{"style":230},[519],{"type":38,"value":520}," --check",{"type":33,"tag":218,"props":522,"children":523},{"style":230},[524],{"type":38,"value":238},{"type":33,"tag":218,"props":526,"children":527},{"style":241},[528],{"type":38,"value":529},"         # Check if files are formatted (no changes)\n",{"type":33,"tag":218,"props":531,"children":532},{"class":220,"line":295},[533,537,541,546,550],{"type":33,"tag":218,"props":534,"children":535},{"style":225},[536],{"type":38,"value":4},{"type":33,"tag":218,"props":538,"children":539},{"style":230},[540],{"type":38,"value":475},{"type":33,"tag":218,"props":542,"children":543},{"style":230},[544],{"type":38,"value":545}," --diff",{"type":33,"tag":218,"props":547,"children":548},{"style":230},[549],{"type":38,"value":238},{"type":33,"tag":218,"props":551,"children":552},{"style":241},[553],{"type":38,"value":554},"          # Show formatting diff without applying\n",{"type":33,"tag":46,"props":556,"children":558},{"id":557},"configuration",[559],{"type":38,"value":560},"Configuration",{"type":33,"tag":40,"props":562,"children":563},{},[564,566,571,572,577],{"type":38,"value":565},"Ruff is configured in ",{"type":33,"tag":72,"props":567,"children":569},{"className":568},[],[570],{"type":38,"value":85},{"type":38,"value":98},{"type":33,"tag":72,"props":573,"children":575},{"className":574},[],[576],{"type":38,"value":96},{"type":38,"value":578},":",{"type":33,"tag":207,"props":580,"children":584},{"className":581,"code":582,"language":583,"meta":212,"style":212},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# pyproject.toml\n[tool.ruff.lint]\nselect = [\"E\", \"F\", \"I\", \"UP\"]  # Enable specific rule sets\nignore = [\"E501\"]               # Ignore specific rules\n\n[tool.ruff.lint.isort]\nknown-first-party = [\"myproject\"]\n","toml",[585],{"type":33,"tag":72,"props":586,"children":587},{"__ignoreMap":212},[588,596,604,612,620,629,637],{"type":33,"tag":218,"props":589,"children":590},{"class":220,"line":221},[591],{"type":33,"tag":218,"props":592,"children":593},{},[594],{"type":38,"value":595},"# pyproject.toml\n",{"type":33,"tag":218,"props":597,"children":598},{"class":220,"line":247},[599],{"type":33,"tag":218,"props":600,"children":601},{},[602],{"type":38,"value":603},"[tool.ruff.lint]\n",{"type":33,"tag":218,"props":605,"children":606},{"class":220,"line":269},[607],{"type":33,"tag":218,"props":608,"children":609},{},[610],{"type":38,"value":611},"select = [\"E\", \"F\", \"I\", \"UP\"]  # Enable specific rule sets\n",{"type":33,"tag":218,"props":613,"children":614},{"class":220,"line":295},[615],{"type":33,"tag":218,"props":616,"children":617},{},[618],{"type":38,"value":619},"ignore = [\"E501\"]               # Ignore specific rules\n",{"type":33,"tag":218,"props":621,"children":622},{"class":220,"line":325},[623],{"type":33,"tag":218,"props":624,"children":626},{"emptyLinePlaceholder":625},true,[627],{"type":38,"value":628},"\n",{"type":33,"tag":218,"props":630,"children":631},{"class":220,"line":351},[632],{"type":33,"tag":218,"props":633,"children":634},{},[635],{"type":38,"value":636},"[tool.ruff.lint.isort]\n",{"type":33,"tag":218,"props":638,"children":639},{"class":220,"line":382},[640],{"type":33,"tag":218,"props":641,"children":642},{},[643],{"type":38,"value":644},"known-first-party = [\"myproject\"]\n",{"type":33,"tag":46,"props":646,"children":648},{"id":647},"migrating-from-other-tools",[649],{"type":38,"value":650},"Migrating from other tools",{"type":33,"tag":200,"props":652,"children":654},{"id":653},"black-ruff-format",[655],{"type":38,"value":656},"Black → ruff format",{"type":33,"tag":207,"props":658,"children":660},{"className":209,"code":659,"language":211,"meta":212,"style":212},"black .                       → ruff format .\nblack --check .               → ruff format --check .\nblack --diff .                → ruff format --diff .\n",[661],{"type":33,"tag":72,"props":662,"children":663},{"__ignoreMap":212},[664,695,731],{"type":33,"tag":218,"props":665,"children":666},{"class":220,"line":221},[667,672,676,681,686,690],{"type":33,"tag":218,"props":668,"children":669},{"style":225},[670],{"type":38,"value":671},"black",{"type":33,"tag":218,"props":673,"children":674},{"style":230},[675],{"type":38,"value":238},{"type":33,"tag":218,"props":677,"children":678},{"style":230},[679],{"type":38,"value":680},"                       →",{"type":33,"tag":218,"props":682,"children":683},{"style":230},[684],{"type":38,"value":685}," ruff",{"type":33,"tag":218,"props":687,"children":688},{"style":230},[689],{"type":38,"value":475},{"type":33,"tag":218,"props":691,"children":692},{"style":230},[693],{"type":38,"value":694}," .\n",{"type":33,"tag":218,"props":696,"children":697},{"class":220,"line":247},[698,702,706,710,715,719,723,727],{"type":33,"tag":218,"props":699,"children":700},{"style":225},[701],{"type":38,"value":671},{"type":33,"tag":218,"props":703,"children":704},{"style":230},[705],{"type":38,"value":520},{"type":33,"tag":218,"props":707,"children":708},{"style":230},[709],{"type":38,"value":238},{"type":33,"tag":218,"props":711,"children":712},{"style":230},[713],{"type":38,"value":714},"               →",{"type":33,"tag":218,"props":716,"children":717},{"style":230},[718],{"type":38,"value":685},{"type":33,"tag":218,"props":720,"children":721},{"style":230},[722],{"type":38,"value":475},{"type":33,"tag":218,"props":724,"children":725},{"style":230},[726],{"type":38,"value":520},{"type":33,"tag":218,"props":728,"children":729},{"style":230},[730],{"type":38,"value":694},{"type":33,"tag":218,"props":732,"children":733},{"class":220,"line":269},[734,738,742,746,751,755,759,763],{"type":33,"tag":218,"props":735,"children":736},{"style":225},[737],{"type":38,"value":671},{"type":33,"tag":218,"props":739,"children":740},{"style":230},[741],{"type":38,"value":545},{"type":33,"tag":218,"props":743,"children":744},{"style":230},[745],{"type":38,"value":238},{"type":33,"tag":218,"props":747,"children":748},{"style":230},[749],{"type":38,"value":750},"                →",{"type":33,"tag":218,"props":752,"children":753},{"style":230},[754],{"type":38,"value":685},{"type":33,"tag":218,"props":756,"children":757},{"style":230},[758],{"type":38,"value":475},{"type":33,"tag":218,"props":760,"children":761},{"style":230},[762],{"type":38,"value":545},{"type":33,"tag":218,"props":764,"children":765},{"style":230},[766],{"type":38,"value":694},{"type":33,"tag":200,"props":768,"children":770},{"id":769},"flake8-ruff-check",[771],{"type":38,"value":772},"Flake8 → ruff check",{"type":33,"tag":207,"props":774,"children":776},{"className":209,"code":775,"language":211,"meta":212,"style":212},"flake8 .                      → ruff check .\nflake8 --select E,F .         → ruff check --select E,F .\nflake8 --ignore E501 .        → ruff check --ignore E501 .\n",[777],{"type":33,"tag":72,"props":778,"children":779},{"__ignoreMap":212},[780,809,853],{"type":33,"tag":218,"props":781,"children":782},{"class":220,"line":221},[783,788,792,797,801,805],{"type":33,"tag":218,"props":784,"children":785},{"style":225},[786],{"type":38,"value":787},"flake8",{"type":33,"tag":218,"props":789,"children":790},{"style":230},[791],{"type":38,"value":238},{"type":33,"tag":218,"props":793,"children":794},{"style":230},[795],{"type":38,"value":796},"                      →",{"type":33,"tag":218,"props":798,"children":799},{"style":230},[800],{"type":38,"value":685},{"type":33,"tag":218,"props":802,"children":803},{"style":230},[804],{"type":38,"value":233},{"type":33,"tag":218,"props":806,"children":807},{"style":230},[808],{"type":38,"value":694},{"type":33,"tag":218,"props":810,"children":811},{"class":220,"line":247},[812,816,820,824,828,833,837,841,845,849],{"type":33,"tag":218,"props":813,"children":814},{"style":225},[815],{"type":38,"value":787},{"type":33,"tag":218,"props":817,"children":818},{"style":230},[819],{"type":38,"value":365},{"type":33,"tag":218,"props":821,"children":822},{"style":230},[823],{"type":38,"value":370},{"type":33,"tag":218,"props":825,"children":826},{"style":230},[827],{"type":38,"value":238},{"type":33,"tag":218,"props":829,"children":830},{"style":230},[831],{"type":38,"value":832},"         →",{"type":33,"tag":218,"props":834,"children":835},{"style":230},[836],{"type":38,"value":685},{"type":33,"tag":218,"props":838,"children":839},{"style":230},[840],{"type":38,"value":233},{"type":33,"tag":218,"props":842,"children":843},{"style":230},[844],{"type":38,"value":365},{"type":33,"tag":218,"props":846,"children":847},{"style":230},[848],{"type":38,"value":370},{"type":33,"tag":218,"props":850,"children":851},{"style":230},[852],{"type":38,"value":694},{"type":33,"tag":218,"props":854,"children":855},{"class":220,"line":269},[856,860,864,868,872,877,881,885,889,893],{"type":33,"tag":218,"props":857,"children":858},{"style":225},[859],{"type":38,"value":787},{"type":33,"tag":218,"props":861,"children":862},{"style":230},[863],{"type":38,"value":396},{"type":33,"tag":218,"props":865,"children":866},{"style":230},[867],{"type":38,"value":401},{"type":33,"tag":218,"props":869,"children":870},{"style":230},[871],{"type":38,"value":238},{"type":33,"tag":218,"props":873,"children":874},{"style":230},[875],{"type":38,"value":876},"        →",{"type":33,"tag":218,"props":878,"children":879},{"style":230},[880],{"type":38,"value":685},{"type":33,"tag":218,"props":882,"children":883},{"style":230},[884],{"type":38,"value":233},{"type":33,"tag":218,"props":886,"children":887},{"style":230},[888],{"type":38,"value":396},{"type":33,"tag":218,"props":890,"children":891},{"style":230},[892],{"type":38,"value":401},{"type":33,"tag":218,"props":894,"children":895},{"style":230},[896],{"type":38,"value":694},{"type":33,"tag":200,"props":898,"children":900},{"id":899},"isort-ruff-check",[901],{"type":38,"value":902},"isort → ruff check",{"type":33,"tag":207,"props":904,"children":906},{"className":209,"code":905,"language":211,"meta":212,"style":212},"isort .                       → ruff check --select I --fix .\nisort --check .               → ruff check --select I .\nisort --diff .                → ruff check --select I --diff .\n",[907],{"type":33,"tag":72,"props":908,"children":909},{"__ignoreMap":212},[910,951,990],{"type":33,"tag":218,"props":911,"children":912},{"class":220,"line":221},[913,918,922,926,930,934,938,943,947],{"type":33,"tag":218,"props":914,"children":915},{"style":225},[916],{"type":38,"value":917},"isort",{"type":33,"tag":218,"props":919,"children":920},{"style":230},[921],{"type":38,"value":238},{"type":33,"tag":218,"props":923,"children":924},{"style":230},[925],{"type":38,"value":680},{"type":33,"tag":218,"props":927,"children":928},{"style":230},[929],{"type":38,"value":685},{"type":33,"tag":218,"props":931,"children":932},{"style":230},[933],{"type":38,"value":233},{"type":33,"tag":218,"props":935,"children":936},{"style":230},[937],{"type":38,"value":365},{"type":33,"tag":218,"props":939,"children":940},{"style":230},[941],{"type":38,"value":942}," I",{"type":33,"tag":218,"props":944,"children":945},{"style":230},[946],{"type":38,"value":283},{"type":33,"tag":218,"props":948,"children":949},{"style":230},[950],{"type":38,"value":694},{"type":33,"tag":218,"props":952,"children":953},{"class":220,"line":247},[954,958,962,966,970,974,978,982,986],{"type":33,"tag":218,"props":955,"children":956},{"style":225},[957],{"type":38,"value":917},{"type":33,"tag":218,"props":959,"children":960},{"style":230},[961],{"type":38,"value":520},{"type":33,"tag":218,"props":963,"children":964},{"style":230},[965],{"type":38,"value":238},{"type":33,"tag":218,"props":967,"children":968},{"style":230},[969],{"type":38,"value":714},{"type":33,"tag":218,"props":971,"children":972},{"style":230},[973],{"type":38,"value":685},{"type":33,"tag":218,"props":975,"children":976},{"style":230},[977],{"type":38,"value":233},{"type":33,"tag":218,"props":979,"children":980},{"style":230},[981],{"type":38,"value":365},{"type":33,"tag":218,"props":983,"children":984},{"style":230},[985],{"type":38,"value":942},{"type":33,"tag":218,"props":987,"children":988},{"style":230},[989],{"type":38,"value":694},{"type":33,"tag":218,"props":991,"children":992},{"class":220,"line":269},[993,997,1001,1005,1009,1013,1017,1021,1025,1029],{"type":33,"tag":218,"props":994,"children":995},{"style":225},[996],{"type":38,"value":917},{"type":33,"tag":218,"props":998,"children":999},{"style":230},[1000],{"type":38,"value":545},{"type":33,"tag":218,"props":1002,"children":1003},{"style":230},[1004],{"type":38,"value":238},{"type":33,"tag":218,"props":1006,"children":1007},{"style":230},[1008],{"type":38,"value":750},{"type":33,"tag":218,"props":1010,"children":1011},{"style":230},[1012],{"type":38,"value":685},{"type":33,"tag":218,"props":1014,"children":1015},{"style":230},[1016],{"type":38,"value":233},{"type":33,"tag":218,"props":1018,"children":1019},{"style":230},[1020],{"type":38,"value":365},{"type":33,"tag":218,"props":1022,"children":1023},{"style":230},[1024],{"type":38,"value":942},{"type":33,"tag":218,"props":1026,"children":1027},{"style":230},[1028],{"type":38,"value":545},{"type":33,"tag":218,"props":1030,"children":1031},{"style":230},[1032],{"type":38,"value":694},{"type":33,"tag":46,"props":1034,"children":1036},{"id":1035},"common-patterns",[1037],{"type":38,"value":1038},"Common patterns",{"type":33,"tag":200,"props":1040,"children":1042},{"id":1041},"apply-lint-fixes-before-formatting",[1043],{"type":38,"value":1044},"Apply lint fixes before formatting",{"type":33,"tag":40,"props":1046,"children":1047},{},[1048,1050,1056,1058,1064],{"type":38,"value":1049},"Run ",{"type":33,"tag":72,"props":1051,"children":1053},{"className":1052},[],[1054],{"type":38,"value":1055},"ruff check --fix",{"type":38,"value":1057}," before ",{"type":33,"tag":72,"props":1059,"children":1061},{"className":1060},[],[1062],{"type":38,"value":1063},"ruff format",{"type":38,"value":1065},". Lint fixes can change code\nstructure (e.g., reordering imports), which formatting then cleans up.",{"type":33,"tag":207,"props":1067,"children":1069},{"className":209,"code":1068,"language":211,"meta":212,"style":212},"ruff check --fix .\nruff format .\n",[1070],{"type":33,"tag":72,"props":1071,"children":1072},{"__ignoreMap":212},[1073,1092],{"type":33,"tag":218,"props":1074,"children":1075},{"class":220,"line":221},[1076,1080,1084,1088],{"type":33,"tag":218,"props":1077,"children":1078},{"style":225},[1079],{"type":38,"value":4},{"type":33,"tag":218,"props":1081,"children":1082},{"style":230},[1083],{"type":38,"value":233},{"type":33,"tag":218,"props":1085,"children":1086},{"style":230},[1087],{"type":38,"value":283},{"type":33,"tag":218,"props":1089,"children":1090},{"style":230},[1091],{"type":38,"value":694},{"type":33,"tag":218,"props":1093,"children":1094},{"class":220,"line":247},[1095,1099,1103],{"type":33,"tag":218,"props":1096,"children":1097},{"style":225},[1098],{"type":38,"value":4},{"type":33,"tag":218,"props":1100,"children":1101},{"style":230},[1102],{"type":38,"value":475},{"type":33,"tag":218,"props":1104,"children":1105},{"style":230},[1106],{"type":38,"value":694},{"type":33,"tag":200,"props":1108,"children":1110},{"id":1109},"applying-and-reviewing-unsafe-fixes",[1111],{"type":38,"value":1112},"Applying and reviewing unsafe fixes",{"type":33,"tag":40,"props":1114,"children":1115},{},[1116],{"type":38,"value":1117},"Ruff categorizes some auto-fixes as \"unsafe\" because they may change code\nbehavior, not just style. For example, removing unused imports could break code\nthat relies on side effects.",{"type":33,"tag":207,"props":1119,"children":1121},{"className":209,"code":1120,"language":211,"meta":212,"style":212},"ruff check --fix --unsafe-fixes --diff .  # Preview changes first\nruff check --fix --unsafe-fixes .         # Apply changes\n",[1122],{"type":33,"tag":72,"props":1123,"children":1124},{"__ignoreMap":212},[1125,1157],{"type":33,"tag":218,"props":1126,"children":1127},{"class":220,"line":221},[1128,1132,1136,1140,1144,1148,1152],{"type":33,"tag":218,"props":1129,"children":1130},{"style":225},[1131],{"type":38,"value":4},{"type":33,"tag":218,"props":1133,"children":1134},{"style":230},[1135],{"type":38,"value":233},{"type":33,"tag":218,"props":1137,"children":1138},{"style":230},[1139],{"type":38,"value":283},{"type":33,"tag":218,"props":1141,"children":1142},{"style":230},[1143],{"type":38,"value":313},{"type":33,"tag":218,"props":1145,"children":1146},{"style":230},[1147],{"type":38,"value":545},{"type":33,"tag":218,"props":1149,"children":1150},{"style":230},[1151],{"type":38,"value":238},{"type":33,"tag":218,"props":1153,"children":1154},{"style":241},[1155],{"type":38,"value":1156},"  # Preview changes first\n",{"type":33,"tag":218,"props":1158,"children":1159},{"class":220,"line":247},[1160,1164,1168,1172,1176,1180],{"type":33,"tag":218,"props":1161,"children":1162},{"style":225},[1163],{"type":38,"value":4},{"type":33,"tag":218,"props":1165,"children":1166},{"style":230},[1167],{"type":38,"value":233},{"type":33,"tag":218,"props":1169,"children":1170},{"style":230},[1171],{"type":38,"value":283},{"type":33,"tag":218,"props":1173,"children":1174},{"style":230},[1175],{"type":38,"value":313},{"type":33,"tag":218,"props":1177,"children":1178},{"style":230},[1179],{"type":38,"value":238},{"type":33,"tag":218,"props":1181,"children":1182},{"style":241},[1183],{"type":38,"value":1184},"         # Apply changes\n",{"type":33,"tag":40,"props":1186,"children":1187},{},[1188],{"type":33,"tag":56,"props":1189,"children":1190},{},[1191,1193,1199],{"type":38,"value":1192},"Always review changes before applying ",{"type":33,"tag":72,"props":1194,"children":1196},{"className":1195},[],[1197],{"type":38,"value":1198},"--unsafe-fixes",{"type":38,"value":578},{"type":33,"tag":64,"props":1201,"children":1202},{},[1203,1216],{"type":33,"tag":68,"props":1204,"children":1205},{},[1206,1208,1214],{"type":38,"value":1207},"Use ",{"type":33,"tag":72,"props":1209,"children":1211},{"className":1210},[],[1212],{"type":38,"value":1213},"ruff rule \u003CCODE>",{"type":38,"value":1215}," to understand why the fix is considered unsafe",{"type":33,"tag":68,"props":1217,"children":1218},{},[1219],{"type":38,"value":1220},"Verify the fix doesn't violate those assumptions in your code",{"type":33,"tag":46,"props":1222,"children":1224},{"id":1223},"documentation",[1225],{"type":38,"value":1226},"Documentation",{"type":33,"tag":40,"props":1228,"children":1229},{},[1230],{"type":38,"value":1231},"For detailed information, read the official documentation:",{"type":33,"tag":64,"props":1233,"children":1234},{},[1235],{"type":33,"tag":68,"props":1236,"children":1237},{},[1238],{"type":33,"tag":1239,"props":1240,"children":1244},"a",{"href":1241,"rel":1242},"https:\u002F\u002Fdocs.astral.sh\u002Fruff\u002F",[1243],"nofollow",[1245],{"type":38,"value":1241},{"type":33,"tag":1247,"props":1248,"children":1249},"style",{},[1250],{"type":38,"value":1251},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1253,"total":269},[1254,1258,1266],{"slug":4,"name":4,"fn":5,"description":6,"org":1255,"tags":1256,"stars":17,"repoUrl":18,"updatedAt":19},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1257],{"name":14,"slug":15,"type":16},{"slug":1259,"name":1259,"fn":1260,"description":1261,"org":1262,"tags":1263,"stars":17,"repoUrl":18,"updatedAt":1265},"ty","type check Python code with ty","Guide for using ty, the extremely fast Python type checker and language server. Use this when type checking Python code or setting up type checking in Python projects.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1264],{"name":14,"slug":15,"type":16},"2026-07-12T08:08:45.153123",{"slug":1267,"name":1267,"fn":1268,"description":1269,"org":1270,"tags":1271,"stars":17,"repoUrl":18,"updatedAt":1279},"uv","manage Python projects with uv","Guide for using uv, the Python package and project manager. Use this when working with Python projects, scripts, packages, or tools.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1272,1275,1278],{"name":1273,"slug":1274,"type":16},"Engineering","engineering",{"name":1276,"slug":1277,"type":16},"Packaging","packaging",{"name":14,"slug":15,"type":16},"2026-07-12T08:08:43.925659",{"items":1281,"total":269},[1282,1286,1290],{"slug":4,"name":4,"fn":5,"description":6,"org":1283,"tags":1284,"stars":17,"repoUrl":18,"updatedAt":19},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1285],{"name":14,"slug":15,"type":16},{"slug":1259,"name":1259,"fn":1260,"description":1261,"org":1287,"tags":1288,"stars":17,"repoUrl":18,"updatedAt":1265},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1289],{"name":14,"slug":15,"type":16},{"slug":1267,"name":1267,"fn":1268,"description":1269,"org":1291,"tags":1292,"stars":17,"repoUrl":18,"updatedAt":1279},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1293,1294,1295],{"name":1273,"slug":1274,"type":16},{"name":1276,"slug":1277,"type":16},{"name":14,"slug":15,"type":16}]