diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29ebe7d66420..ea6ffe7a87e4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: # Run markdown linting early so that doc style and table-of-contents see the # linted state. - repo: https://github.com/rvben/rumdl-pre-commit - rev: e95b9121d4c55bf12fb7ae52d08d2d8d64789899 # frozen: v0.2.58 + rev: b0cff962ee693b9e612c097d22e71e0cba127447 # frozen: v0.3.2 hooks: - id: rumdl args: [--fix] @@ -52,7 +52,7 @@ repos: # Re-run markdown linting to fix any issues caused by doc style and TOC. This # is very fast, so it shouldn't be problematic to run twice. - repo: https://github.com/rvben/rumdl-pre-commit - rev: e95b9121d4c55bf12fb7ae52d08d2d8d64789899 # frozen: v0.2.58 + rev: b0cff962ee693b9e612c097d22e71e0cba127447 # frozen: v0.3.2 hooks: - id: rumdl args: [--fix] @@ -68,7 +68,7 @@ repos: # Formatters should be run late so that they can re-format any prior changes. - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 0c7b6c989466a93942def1f84baf36ddfcd60c83 # frozen: v0.15.14 + rev: 25bcf95026b96e2dd3c0aec3090c3d6ef6ca2e6c # frozen: v0.17.3 hooks: - id: ruff-check args: [--fix] @@ -190,7 +190,7 @@ repos: files: ^.*/BUILD$ pass_filenames: false - repo: https://github.com/codespell-project/codespell - rev: 2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a # frozen: v2.4.2 + rev: 57b21406f092110c18776e39b0bda50d37c945c8 # frozen: v2.4.3 hooks: - id: codespell args: ['-I', '.codespell_ignore', '--uri-ignore-words-list', '*'] diff --git a/docs/design/expressions/member_access.md b/docs/design/expressions/member_access.md index f8eb80273719..75ee7806734b 100644 --- a/docs/design/expressions/member_access.md +++ b/docs/design/expressions/member_access.md @@ -1176,8 +1176,8 @@ Assert((r as __Binding_C_F).(Call(()).Op)() == 9); How does this arise? -1. First the simple member access evaluates `typeof(a).F`, which is `C.F` (`__C_F` - with type `__TypeOf_C_F`). +1. First the simple member access evaluates `typeof(a).F`, which is `C.F` + (`__C_F` with type `__TypeOf_C_F`). 2. It then looks at the expression to the left of the `.`: - If it is a reference expression, the "member binding to reference" (`BindToRef`) operator is applied. diff --git a/proposals/p000285-if-else.md b/proposals/p000285-if-else.md index bed42e435437..f88b0453c271 100644 --- a/proposals/p000285-if-else.md +++ b/proposals/p000285-if-else.md @@ -59,11 +59,11 @@ A few syntaxes that are likely to influence `if`/`else` are: ```python if x: - print("x is true"); + print("x is true") elif y: - print("y is true"); + print("y is true") else: - print("Neither was true"); + print("Neither was true") ``` - Swift diff --git a/proposals/p000340-while-loops.md b/proposals/p000340-while-loops.md index 2c3341783a2f..66419d2bc331 100644 --- a/proposals/p000340-while-loops.md +++ b/proposals/p000340-while-loops.md @@ -53,17 +53,17 @@ similar in many languages, even if details may change. ```python while x: - DoSomething() + DoSomething() while True: - DoSomethingElse() - if not y: - break + DoSomethingElse() + if not y: + break while z: - print("z is true") + print("z is true") else: - print("z was never true") + print("z was never true") ``` - Swift: Swift uses `repeat` instead of `do`. diff --git a/proposals/p000438-functions.md b/proposals/p000438-functions.md index 446271155585..a8514be3f70b 100644 --- a/proposals/p000438-functions.md +++ b/proposals/p000438-functions.md @@ -146,10 +146,11 @@ For exhaustive function examples: ```python def sum(a, b): - return a + b + return a + b + def sum(a: int, b: int) -> int: - return a + b + return a + b ``` - R diff --git a/proposals/p001885-for-statement-and-user-types.md b/proposals/p001885-for-statement-and-user-types.md index eca5dc774906..c0cd2a51490c 100644 --- a/proposals/p001885-for-statement-and-user-types.md +++ b/proposals/p001885-for-statement-and-user-types.md @@ -116,14 +116,15 @@ as the next value to the `for` loop. Iteration ends when the function returns. ```python def generate_fibonacci(): - yield 0; - n1, n2 = 0, 1; - while True: - n1, n2 = n2, n1+n2; - yield n1; + yield 0 + n1, n2 = 0, 1 + while True: + n1, n2 = n2, n1 + n2 + yield n1 + for n in generate(): - print(n); + print(n) ``` #### Rust