mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-10 12:38:28 +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
|
||||
# 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', '*']
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user