mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-10 12:28:25 +00:00
Bump the pre-commit group across 1 directory with 3 updates (#8079)
- `astral-sh/ruff-pre-commit` 0.15.14 -> 0.17.2 - `codespell-project/codespell` 2.4.2 -> 2.4.3 - `rvben/rumdl-pre-commit` 0.2.58 -> 0.3.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: CarbonInfraBot <64870956+CarbonInfraBot@users.noreply.github.com>
This commit is contained in:
1 parent
45ed77af3b
commit
0b7059a360
6 files changed
+25
-23
No files matched your search
@@ -33,7 +33,7 @@ repos:
|
|||||||
# Run markdown linting early so that doc style and table-of-contents see the
|
# Run markdown linting early so that doc style and table-of-contents see the
|
||||||
# linted state.
|
# linted state.
|
||||||
- repo: https://github.com/rvben/rumdl-pre-commit
|
- repo: https://github.com/rvben/rumdl-pre-commit
|
||||||
rev: e95b9121d4c55bf12fb7ae52d08d2d8d64789899 # frozen: v0.2.58
|
rev: b0cff962ee693b9e612c097d22e71e0cba127447 # frozen: v0.3.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: rumdl
|
- id: rumdl
|
||||||
args: [--fix]
|
args: [--fix]
|
||||||
@@ -52,7 +52,7 @@ repos:
|
|||||||
# Re-run markdown linting to fix any issues caused by doc style and TOC. This
|
# 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.
|
# is very fast, so it shouldn't be problematic to run twice.
|
||||||
- repo: https://github.com/rvben/rumdl-pre-commit
|
- repo: https://github.com/rvben/rumdl-pre-commit
|
||||||
rev: e95b9121d4c55bf12fb7ae52d08d2d8d64789899 # frozen: v0.2.58
|
rev: b0cff962ee693b9e612c097d22e71e0cba127447 # frozen: v0.3.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: rumdl
|
- id: rumdl
|
||||||
args: [--fix]
|
args: [--fix]
|
||||||
@@ -68,7 +68,7 @@ repos:
|
|||||||
|
|
||||||
# Formatters should be run late so that they can re-format any prior changes.
|
# Formatters should be run late so that they can re-format any prior changes.
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: 0c7b6c989466a93942def1f84baf36ddfcd60c83 # frozen: v0.15.14
|
rev: 25bcf95026b96e2dd3c0aec3090c3d6ef6ca2e6c # frozen: v0.17.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff-check
|
- id: ruff-check
|
||||||
args: [--fix]
|
args: [--fix]
|
||||||
@@ -190,7 +190,7 @@ repos:
|
|||||||
files: ^.*/BUILD$
|
files: ^.*/BUILD$
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
- repo: https://github.com/codespell-project/codespell
|
- repo: https://github.com/codespell-project/codespell
|
||||||
rev: 2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a # frozen: v2.4.2
|
rev: 57b21406f092110c18776e39b0bda50d37c945c8 # frozen: v2.4.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: codespell
|
- id: codespell
|
||||||
args: ['-I', '.codespell_ignore', '--uri-ignore-words-list', '*']
|
args: ['-I', '.codespell_ignore', '--uri-ignore-words-list', '*']
|
||||||
|
|||||||
@@ -1176,8 +1176,8 @@ Assert((r as __Binding_C_F).(Call(()).Op)() == 9);
|
|||||||
|
|
||||||
How does this arise?
|
How does this arise?
|
||||||
|
|
||||||
1. First the simple member access evaluates `typeof(a).F`, which is `C.F` (`__C_F`
|
1. First the simple member access evaluates `typeof(a).F`, which is `C.F`
|
||||||
with type `__TypeOf_C_F`).
|
(`__C_F` with type `__TypeOf_C_F`).
|
||||||
2. It then looks at the expression to the left of the `.`:
|
2. It then looks at the expression to the left of the `.`:
|
||||||
- If it is a reference expression, the "member binding to reference"
|
- If it is a reference expression, the "member binding to reference"
|
||||||
(`BindToRef`) operator is applied.
|
(`BindToRef`) operator is applied.
|
||||||
|
|||||||
@@ -59,11 +59,11 @@ A few syntaxes that are likely to influence `if`/`else` are:
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
if x:
|
if x:
|
||||||
print("x is true");
|
print("x is true")
|
||||||
elif y:
|
elif y:
|
||||||
print("y is true");
|
print("y is true")
|
||||||
else:
|
else:
|
||||||
print("Neither was true");
|
print("Neither was true")
|
||||||
```
|
```
|
||||||
|
|
||||||
- Swift
|
- Swift
|
||||||
|
|||||||
@@ -53,17 +53,17 @@ similar in many languages, even if details may change.
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
while x:
|
while x:
|
||||||
DoSomething()
|
DoSomething()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
DoSomethingElse()
|
DoSomethingElse()
|
||||||
if not y:
|
if not y:
|
||||||
break
|
break
|
||||||
|
|
||||||
while z:
|
while z:
|
||||||
print("z is true")
|
print("z is true")
|
||||||
else:
|
else:
|
||||||
print("z was never true")
|
print("z was never true")
|
||||||
```
|
```
|
||||||
|
|
||||||
- Swift: Swift uses `repeat` instead of `do`.
|
- Swift: Swift uses `repeat` instead of `do`.
|
||||||
|
|||||||
@@ -146,10 +146,11 @@ For exhaustive function examples:
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
def sum(a, b):
|
def sum(a, b):
|
||||||
return a + b
|
return a + b
|
||||||
|
|
||||||
|
|
||||||
def sum(a: int, b: int) -> int:
|
def sum(a: int, b: int) -> int:
|
||||||
return a + b
|
return a + b
|
||||||
```
|
```
|
||||||
|
|
||||||
- R
|
- R
|
||||||
|
|||||||
@@ -116,14 +116,15 @@ as the next value to the `for` loop. Iteration ends when the function returns.
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
def generate_fibonacci():
|
def generate_fibonacci():
|
||||||
yield 0;
|
yield 0
|
||||||
n1, n2 = 0, 1;
|
n1, n2 = 0, 1
|
||||||
while True:
|
while True:
|
||||||
n1, n2 = n2, n1+n2;
|
n1, n2 = n2, n1 + n2
|
||||||
yield n1;
|
yield n1
|
||||||
|
|
||||||
|
|
||||||
for n in generate():
|
for n in generate():
|
||||||
print(n);
|
print(n)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Rust
|
#### Rust
|
||||||
|
|||||||
Reference in new issue
Block a user