Commit Graph
8 Commits
Author SHA1 Message Date
Chandler Carruth 824d7e3c83 Create a GitHub action to automatically handle dependent PRs (#7101)
This should detect when a PR has a dependency of another open PR and add
a comment and label describing it. The comment will even do a
best-effort to compute the best starting commit for review.

Whenever PRs are closed, it will also scan the open depnedent PRs and
try to either remove the PRs in the comment or if it reaches zero the
label.

It works to update a single comment on a PR rather than adding more
comments.

Assisted-by: Antigravity with Gemini
2026-04-24 19:52:07 +00:00
Jack McCluskeyandJon Ross-Perkins 319c3caf99 Convert Python type hinting to be PEP-585 Compliant (#4083)
Python [PEP-585](https://peps.python.org/pep-0585/) replaces a number of
`typing` module types with built-in equivalents and `collections.abc`
versions as of Python 3.9, with the aim of eventually removing the
`typing` module versions of these classes altogether. Since the minimum
required version of Python listed in the [Contribution Tools
document](https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/contribution_tools.md#main-tools)
is 3.9, the type hints in the various python files in the repo can be
updated to this style of type hint without a need for backwards
compatibility.

Feel free to close if this isn't a desired change at this time!

---------

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
2024-06-26 19:32:37 +00:00
Martim Martinsandmartimartins 31df852738 Remove non-needed Python 2.x inherit from object (#1622)
In Python 3.x it is not necessary to have `object` inheritance in classes, it may be useful to have `object` inheritance in classes if the code has support for Python 3.x, 2.x, but currently the present code does not contain support for python 2.x.

Co-authored-by: martimartins <martim13artins13@gmail.com>
2022-07-23 18:15:29 -07:00
Jon Meow 107848e30f Switch mypy approach to pre-commit (#1234)
I'm treating my PR to mypy bazel integration as dead in the water. Abandoning that approach, this seems to work reasonably well as a replacement. It's actually a slightly newer version of mypy too -- the bazel integration was stuck on an old version.

Note I don't think we're losing much: we shouldn't be writing too much python.
2022-05-09 09:54:12 -07:00
Jon Meow 3351443c8f Switch to a mypy fork that handles imports (#823)
I'm seeing if I can upstream thundergolfer/bazel-mypy-integration#43, but we can also point at my fork for the time being.

This should resolve conflicts with mypy treating imports as non-hermetic, creating inconsistent behavior if packages are/aren't installed locally.
2021-09-13 13:08:54 -07:00
Jon Meow 4cbf5c6ab9 Add typing hints to github_tools with mypy enforcement (#771) 2021-08-25 09:29:17 -07:00
Jon Meow a09693b38d Stop pulling the schema, it's optional and hits a github/gql incompatibility (not sure whose bug) (#306)
Should fix #300
2021-02-26 15:05:03 -08:00
Jon Meow 2efbe1074e Rename github to github_tools so that modules don't conflict with PyGithub (#223) 2020-12-08 09:06:28 -08:00