{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":523043277,"defaultBranch":"main","name":"ruff","ownerLogin":"astral-sh","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2022-08-09T17:17:44.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/115962839?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1715799234.0","currentOid":""},"activityList":{"items":[{"before":"7ac9cabbff2132ffc3f3b9452d56f9556e522ce8","after":"d05347cfcbe812ceec1e2cf5d2ae111586844cb2","ref":"refs/heads/main","pushedAt":"2024-05-15T22:17:32.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"charliermarsh","name":"Charlie Marsh","path":"/charliermarsh","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1309177?s=80&v=4"},"commit":{"message":"Regenerate sys.rs with stdlibs==2024.5.15 (#11437)\n\n## Summary\r\n\r\nNow that 3.13.0 b1 is out some of the stdlib modules have changed names.\r\n\r\n## Test Plan\r\n\r\nWait for CI to run, expected to be pretty safe.","shortMessageHtmlLink":"Regenerate sys.rs with stdlibs==2024.5.15 (#11437)"}},{"before":"c9ac09b01066fa3caece3d6b8556750a113a3f96","after":"7706561af7564b6cf6ce46fee7751b720eea8512","ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-15T20:34:15.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"},"commit":{"message":"cargo insta review -- accept documentation change","shortMessageHtmlLink":"cargo insta review -- accept documentation change"}},{"before":null,"after":"c9ac09b01066fa3caece3d6b8556750a113a3f96","ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-15T18:53:54.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"},"commit":{"message":"cargo insta review -- accept doc changes","shortMessageHtmlLink":"cargo insta review -- accept doc changes"}},{"before":"c9ac09b01066fa3caece3d6b8556750a113a3f96","after":null,"ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-15T18:52:03.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"}},{"before":null,"after":"c9ac09b01066fa3caece3d6b8556750a113a3f96","ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-15T18:50:50.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"},"commit":{"message":"cargo insta review -- accept doc changes","shortMessageHtmlLink":"cargo insta review -- accept doc changes"}},{"before":"8a749fcac28e1015356bead4e64a583ab04befdb","after":null,"ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-15T18:49:30.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"}},{"before":null,"after":"8a749fcac28e1015356bead4e64a583ab04befdb","ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-15T18:46:49.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"},"commit":{"message":"cargo insta review -- accept doc changes","shortMessageHtmlLink":"cargo insta review -- accept doc changes"}},{"before":"8a749fcac28e1015356bead4e64a583ab04befdb","after":null,"ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-15T18:39:55.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"}},{"before":null,"after":"8a749fcac28e1015356bead4e64a583ab04befdb","ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-15T18:38:17.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"},"commit":{"message":"cargo insta review -- accept doc changes","shortMessageHtmlLink":"cargo insta review -- accept doc changes"}},{"before":"6963f75a14ac58886adf7302745fcda2b9fd3f21","after":"7ac9cabbff2132ffc3f3b9452d56f9556e522ce8","ref":"refs/heads/main","pushedAt":"2024-05-15T14:36:28.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"dhruvmanila","name":"Dhruv Manilawala","path":"/dhruvmanila","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/67177269?s=80&v=4"},"commit":{"message":"Update CONTRIBUTING.md to reflect the new parser (#11434)\n\n## Summary\r\n\r\nCONTRIBUTING.md says that `cargo dev print-ast` uses the old RuffPython\r\nparser, even though, as far as I can tell, it uses the shiny new parser.\r\nThis PR fixes this.\r\n\r\n## Test Plan\r\n\r\nCI jobs should do the trick -- I didn't modify any code.","shortMessageHtmlLink":"Update CONTRIBUTING.md to reflect the new parser (#11434)"}},{"before":"effe3ad4ef86d271b92f97e3635177b72b5642c8","after":"6963f75a14ac58886adf7302745fcda2b9fd3f21","ref":"refs/heads/main","pushedAt":"2024-05-15T11:40:27.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"AlexWaygood","name":"Alex Waygood","path":"/AlexWaygood","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/66076021?s=80&v=4"},"commit":{"message":"Move string-prefix enumerations to a separate submodule (#11425)\n\n## Summary\r\n\r\nThis moves the string-prefix enumerations in `ruff_python_ast` to a\r\nseparate submodule. I think this helps clarify that these prefixes are\r\npurely abstract: they only depend on each other, and do not depend on\r\nany of the other code in `nodes.rs` in any way. Moreover, while various\r\nAST nodes _use_ them, they're not really nodes themselves, so they feel\r\nslightly out of place in `nodes.rs`.\r\n\r\nI considered moving all of them to `str.rs`, but it felt like enough\r\ncode that it could be a separate submodule.\r\n\r\n## Test Plan\r\n\r\n`cargo test`","shortMessageHtmlLink":"Move string-prefix enumerations to a separate submodule (#11425)"}},{"before":"942967f13285170e9820a48e6b24e568cf231031","after":null,"ref":"refs/heads/dhruv/starts-at","pushedAt":"2024-05-15T11:28:46.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"dhruvmanila","name":"Dhruv Manilawala","path":"/dhruvmanila","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/67177269?s=80&v=4"}},{"before":"94c8d2dcfc5835f723d5b9517037ab311cfc5fd5","after":"2952263db62372df547dd9106d91ce8650697d25","ref":"refs/heads/dhruv/lazy-lexer","pushedAt":"2024-05-15T11:28:45.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"dhruvmanila","name":"Dhruv Manilawala","path":"/dhruvmanila","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/67177269?s=80&v=4"},"commit":{"message":"Fix starts at logic for the parser flow (#11433)\n\n## Summary\r\n\r\nThis PR fixes the parser flow for the starts at functionality.\r\n\r\nThe parser APIs are as follows:\r\n* `Parser::new`\r\n* `Parser::new_starts_at`\r\n\r\nThe `TokenSource` and `Lexer` will have the same function signature\r\nwhere they also accepts a start offset. This makes the APIs easier to\r\nreason about and avoids adding both variants for the token source and\r\nthe lexer.\r\n\r\nThe `*_starts_at` APIs now expect the entire source code and the lexer\r\nwill skip that many bytes as the offset. This will match the\r\n`*_starts_at` naming as well.\r\n\r\nThe high level APIs which are part of the public interface will be\r\nupdated to take in a range instead of the offset. Internally, we'll\r\nslice the source code up to the end range and pass this sub-string and\r\nthe start range value to the parser. This change will be done at the end\r\nas it affects all the downstream calls as well.\r\n\r\nSo, all in all, the final APIs will be:\r\n```rs\r\npub fn parse(source: &str, mode: Mode) -> Program {\r\n\tParser::new(source, mode).parse_program()\r\n}\r\n\r\npub fn parse_range(source: &str, mode: Mode, range: TextRange) -> Program {\r\n\tlet source = source[..range.end().to_usize()];\r\n\tParser::new_starts_at(source, mode, range.start()).parse_program()\r\n}\r\n```\r\n\r\nBoth the above APIs expect the entire source code. This is so that the\r\ncaller doesn't need to worry about slicing the correct part of the\r\nsource code.","shortMessageHtmlLink":"Fix starts at logic for the parser flow (#11433)"}},{"before":null,"after":"942967f13285170e9820a48e6b24e568cf231031","ref":"refs/heads/dhruv/starts-at","pushedAt":"2024-05-15T11:18:04.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"dhruvmanila","name":"Dhruv Manilawala","path":"/dhruvmanila","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/67177269?s=80&v=4"},"commit":{"message":"Fix starts at logic for the parser flow","shortMessageHtmlLink":"Fix starts at logic for the parser flow"}},{"before":"5bde6a08a0b59b00ee3911be4508c72cf31a2cc5","after":"94c8d2dcfc5835f723d5b9517037ab311cfc5fd5","ref":"refs/heads/dhruv/lazy-lexer","pushedAt":"2024-05-15T11:17:25.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dhruvmanila","name":"Dhruv Manilawala","path":"/dhruvmanila","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/67177269?s=80&v=4"},"commit":{"message":"Docs","shortMessageHtmlLink":"Docs"}},{"before":"3deeb3707c1c3e3af4acf67ca32bc13508ab3b34","after":null,"ref":"refs/heads/typeshedbot/sync-typeshed","pushedAt":"2024-05-15T00:46:42.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"AlexWaygood","name":"Alex Waygood","path":"/AlexWaygood","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/66076021?s=80&v=4"}},{"before":"bdc15a7cb9620c929e55fb2ce24937641ce9759c","after":"effe3ad4ef86d271b92f97e3635177b72b5642c8","ref":"refs/heads/main","pushedAt":"2024-05-15T00:46:41.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"AlexWaygood","name":"Alex Waygood","path":"/AlexWaygood","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/66076021?s=80&v=4"},"commit":{"message":"Sync vendored typeshed stubs (#11428)\n\nCo-authored-by: typeshedbot <>","shortMessageHtmlLink":"Sync vendored typeshed stubs (#11428)"}},{"before":null,"after":"3deeb3707c1c3e3af4acf67ca32bc13508ab3b34","ref":"refs/heads/typeshedbot/sync-typeshed","pushedAt":"2024-05-15T00:40:09.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"github-actions[bot]","name":null,"path":"/apps/github-actions","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/15368?s=80&v=4"},"commit":{"message":"Sync typeshed. Source commit: https://github.com/python/typeshed/commit/a9d7e861f7a46ae7acd56569326adef302e10f29","shortMessageHtmlLink":"Sync typeshed. Source commit: python/typeshed@a9d7e86"}},{"before":"da882b66574d176c9961082ee5e593ac8f9f225f","after":"bdc15a7cb9620c929e55fb2ce24937641ce9759c","ref":"refs/heads/main","pushedAt":"2024-05-15T00:39:31.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"AlexWaygood","name":"Alex Waygood","path":"/AlexWaygood","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/66076021?s=80&v=4"},"commit":{"message":"Add automation for updating our vendored typeshed stubs (#11427)","shortMessageHtmlLink":"Add automation for updating our vendored typeshed stubs (#11427)"}},{"before":"dde97562cf843300cf96bb78fa88c68989769502","after":null,"ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-15T00:02:34.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"}},{"before":"96f628862295f844e92ea581cbbb9b3247839bf6","after":"da882b66574d176c9961082ee5e593ac8f9f225f","ref":"refs/heads/main","pushedAt":"2024-05-15T00:02:33.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"},"commit":{"message":"F401 - Recommend adding unused import bindings to `__all__` (#11314)\n\nFollowup on #11168 and resolve #10391\r\n\r\n# User facing changes\r\n\r\n* F401 now recommends a fix to add unused import bindings to to\r\n`__all__` if a single `__all__` list or tuple is found in `__init__.py`.\r\n* If there are no `__all__` found in the file, fall back to recommending\r\nredundant-aliases.\r\n* If there are multiple `__all__` or only one but of the wrong type (non\r\nlist or tuple) then diagnostics are generated without fixes.\r\n* `fix_title` is updated to reflect what the fix/recommendation is.\r\n\r\nSubtlety: For a renamed import such as `import foo as bees`, we can\r\ngenerate a fix to add `bees` to `__all__` but cannot generate a fix to\r\nproduce a redundant import (because that would break uses of the binding\r\n`bees`).\r\n\r\n# Implementation changes\r\n\r\n* Add `name` field to `ImportBinding` to contain the name of the\r\n_binding_ we want to add to `__all__` (important for the `import foo as\r\nbees` case). It previously only contained the `AnyImport` which can give\r\nus information about the import but not the binding.\r\n* Add `binding` field to `UnusedImport` to contain the same. (Naming\r\nnote: the field `name` field already existed on `UnusedImport` and\r\ncontains the qualified name of the imported symbol/module)\r\n* Change `fix_by_reexporting` to branch on the size of `dunder_all:\r\nVec<&Expr>`\r\n* For length 0 call the edit-producing function `make_redundant_alias`.\r\n * For length 1 call edit-producing function `add_to_dunder_all`.\r\n * Otherwise, produce no fix.\r\n* Implement the edit-producing function `add_to_dunder_all` and add unit\r\ntests.\r\n* Implement several fixture tests: empty `__all__ = []`, nonempty\r\n`__all__ = [\"foo\"]`, mis-typed `__all__ = None`, plus-eq `__all__ +=\r\n[\"foo\"]`\r\n* `UnusedImportContext::Init` variant now has two fields: whether the\r\nfix is in `__init__.py` and how many `__all__` were found.\r\n\r\n# Other changes\r\n\r\n* Remove a spurious pattern match and instead use field lookups b/c the\r\naddition of a field would have required changing the unrelated pattern.\r\n* Tweak input type of `make_redundant_alias`\r\n\r\n---------\r\n\r\nCo-authored-by: Alex Waygood ","shortMessageHtmlLink":"F401 - Recommend adding unused import bindings to __all__ (#11314)"}},{"before":"0696df52aa86fb73496ddaf05e0d675895f4d8c8","after":"dde97562cf843300cf96bb78fa88c68989769502","ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-14T20:58:20.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"},"commit":{"message":"Revert \"remove the qualified-name field from UnusedImport in favor of the binding-name field (named as .name); update fixture test results\"\n\nThis reverts commit 0696df52aa86fb73496ddaf05e0d675895f4d8c8.","shortMessageHtmlLink":"Revert \"remove the qualified-name field from UnusedImport in favor of…"}},{"before":"548180b3ffb0bfcada85976777494a9c00269d57","after":"0696df52aa86fb73496ddaf05e0d675895f4d8c8","ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-14T18:34:15.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"},"commit":{"message":"remove the qualified-name field from UnusedImport in favor of the binding-name field (named as .name); update fixture test results","shortMessageHtmlLink":"remove the qualified-name field from UnusedImport in favor of the bin…"}},{"before":"527d3954b5e024bfb88f79f05185d408f0b4a089","after":"548180b3ffb0bfcada85976777494a9c00269d57","ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-14T18:20:58.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"},"commit":{"message":"collect only 2 `__all__` definitions and then stop pulling the iterator\n\nCo-authored-by: Alex Waygood ","shortMessageHtmlLink":"collect only 2 __all__ definitions and then stop pulling the iterator"}},{"before":"31dd04ddd2022157101a3cf599dbaa688baeb990","after":"527d3954b5e024bfb88f79f05185d408f0b4a089","ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-14T17:43:49.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"},"commit":{"message":"clippy fix -- replace closure with static reference to method","shortMessageHtmlLink":"clippy fix -- replace closure with static reference to method"}},{"before":"ace24d936ddc07848bbb4e60595d6985e5e8eb3f","after":"31dd04ddd2022157101a3cf599dbaa688baeb990","ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-14T17:37:26.000Z","pushType":"push","commitsCount":3,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"},"commit":{"message":"clippy fix -- replace closure with static reference to method","shortMessageHtmlLink":"clippy fix -- replace closure with static reference to method"}},{"before":"197263384598ca715dea905829bbf5eb1f9e1ad4","after":"ace24d936ddc07848bbb4e60595d6985e5e8eb3f","ref":"refs/heads/ruff.__all__","pushedAt":"2024-05-14T17:30:46.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"plredmond","name":null,"path":"/plredmond","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/51248199?s=80&v=4"},"commit":{"message":"readd erroneously removed newlines to fixture snaps","shortMessageHtmlLink":"readd erroneously removed newlines to fixture snaps"}},{"before":"9d3f5cf849b72bcf11e07eaddaa299fd021cea0b","after":null,"ref":"refs/heads/dhruv/extraneous-parens","pushedAt":"2024-05-14T17:28:05.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"dhruvmanila","name":"Dhruv Manilawala","path":"/dhruvmanila","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/67177269?s=80&v=4"}},{"before":"bb1c107afd193062253a54641c9b0dc44db8ac3e","after":"96f628862295f844e92ea581cbbb9b3247839bf6","ref":"refs/heads/main","pushedAt":"2024-05-14T17:28:04.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"dhruvmanila","name":"Dhruv Manilawala","path":"/dhruvmanila","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/67177269?s=80&v=4"},"commit":{"message":"Move `UP034` to use `TokenKind` instead of `Tok` (#11424)\n\n## Summary\r\n\r\nThis PR follows up from #11420 to move `UP034` to use `TokenKind`\r\ninstead of `Tok`.\r\n\r\nThe main reason to have a separate PR is so that the reviewing is easy.\r\nThis required a lot more updates because the rule used an index (`i`) to\r\nkeep track of the current position in the token vector. Now, as it's\r\njust an iterator, we just use `next` to move the iterator forward and\r\nextract the relevant information.\r\n\r\nThis is part of https://github.com/astral-sh/ruff/issues/11401\r\n\r\n## Test Plan\r\n\r\n`cargo test`","shortMessageHtmlLink":"Move UP034 to use TokenKind instead of Tok (#11424)"}},{"before":"04070b0a6912b0c7ad6443fbd9272120814bd03c","after":"9d3f5cf849b72bcf11e07eaddaa299fd021cea0b","ref":"refs/heads/dhruv/extraneous-parens","pushedAt":"2024-05-14T17:18:58.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dhruvmanila","name":"Dhruv Manilawala","path":"/dhruvmanila","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/67177269?s=80&v=4"},"commit":{"message":"Move `UP034` to use `TokenKind` instead of `Tok`","shortMessageHtmlLink":"Move UP034 to use TokenKind instead of Tok"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAESwXQBAA","startCursor":null,"endCursor":null}},"title":"Activity · astral-sh/ruff"}