Skip to content

Commit 01e1211

Browse files
authored
Auto-update pre-commit repositories and fix. (#3427)
The version of `flake8` was too old to support with Python 3.12 -- there is new F-string support that caused false positives sadly. The updated version has fixes for all of these. This in turn updates codespell which has picked up several new fixes that actually fire in our code, so also fix everything. While we don't do more in-depth updates to old proposals, similar to simply fixing broken links, fixing automatically detected typos seems scalable and fine. All edits were automatically generated here.
1 parent a307e7a commit 01e1211

File tree

9 files changed

+22
-22
lines changed

9 files changed

+22
-22
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ default_language_version:
1212

1313
repos:
1414
- repo: https://github.com/pre-commit/pre-commit-hooks
15-
rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 # frozen: v4.4.0
15+
rev: c4a0b883114b00d8d76b479c820ce7950211c99b # frozen: v4.5.0
1616
hooks:
1717
- id: check-added-large-files
1818
- id: check-case-conflict
@@ -45,11 +45,11 @@ repos:
4545

4646
# Formatters should be run late so that they can re-format any prior changes.
4747
- repo: https://github.com/psf/black
48-
rev: 193ee766ca496871f93621d6b58d57a6564ff81b # frozen: 23.7.0
48+
rev: 2a1c67e0b2f81df602ec1f6e7aeb030b9709dc7c # frozen: 23.11.0
4949
hooks:
5050
- id: black
5151
- repo: https://github.com/pre-commit/mirrors-prettier
52-
rev: efd8b1e16f05132acf6edcf2827eeab21e0e00db # frozen: v3.0.0
52+
rev: ffb6a759a979008c0e6dff86e39f4745a2d9eac4 # frozen: v3.1.0
5353
hooks:
5454
- id: prettier
5555
- repo: local
@@ -119,11 +119,11 @@ repos:
119119
files: ^.*/BUILD$
120120
pass_filenames: false
121121
- repo: https://github.com/PyCQA/flake8
122-
rev: c838a5e98878f17889cfce311e1406d252f87ec5 # frozen: 6.0.0
122+
rev: 10f4af6dbcf93456ba7df762278ae61ba3120dc6 # frozen: 6.1.0
123123
hooks:
124124
- id: flake8
125125
- repo: https://github.com/pre-commit/mirrors-mypy
126-
rev: '6e63c9e9c65e1df04465cdcda0f2490e89291f58' # frozen: v1.4.1
126+
rev: '4daa14b20c0f48f472528c2b5f5bca28a18a7ce0' # frozen: v1.7.1
127127
hooks:
128128
- id: mypy
129129
# Use setup.cfg to match the command line.
@@ -145,7 +145,7 @@ repos:
145145
.*_test\.py
146146
)$
147147
- repo: https://github.com/codespell-project/codespell
148-
rev: 355e50e14fd03fe83e4ed9aa0489824b150b3b58 # frozen: v2.2.5
148+
rev: 6e41aba91fb32e9feb741a6258eefeb9c6e4a482 # frozen: v2.2.6
149149
hooks:
150150
- id: codespell
151151
args: ['-I', '.codespell_ignore', '--uri-ignore-words-list', '*']

docs/design/generics/details.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,7 @@ checks, like `ValidDate` with the same data layout as `Date`. Or to record the
19811981
units associated with a value, such as `Seconds` versus `Milliseconds` or `Feet`
19821982
versus `Meters`. We should have some way of restricting the casts between a type
19831983
and an adapter to address this use case. One possibility would be to add the
1984-
keyword `private` before `adpat`, so you might write
1984+
keyword `private` before `adapt`, so you might write
19851985
`extend private adapt Date;`.
19861986

19871987
## Associated constants

docs/design/interoperability/philosophy_and_goals.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,11 @@ high cost feature to achieve full parity for mixed toolchains. Requiring bridge
343343
code for mixed toolchains is the likely solution to avoid this cost.
344344

345345
Note that this issue differs when considering interoperability for Carbon code
346-
instantiating C++ templates. The C++ templates must be in C++ headers for
347-
re-use, which in turn must compile with the Carbon toolchain to re-use the built
348-
C++ code, regardless of whether a separate C++ toolchain is in use. This may
349-
also be considered a constraint on mixed toolchain interoperability, but it's
350-
simpler to address and less likely to burden developers.
346+
instantiating C++ templates. The C++ templates must be in C++ headers for reuse,
347+
which in turn must compile with the Carbon toolchain to reuse the built C++
348+
code, regardless of whether a separate C++ toolchain is in use. This may also be
349+
considered a constraint on mixed toolchain interoperability, but it's simpler to
350+
address and less likely to burden developers.
351351

352352
To summarize, developers should expect that while _most_ features will work
353353
equivalently for mixed toolchains, there will never be full parity.

docs/project/principles/safety_strategy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ Strong testing is more than good test coverage. It means a combination of:
392392
These practices are necessary for reliable, large-scale software engineering.
393393
Maintaining correctness of business logic over time requires continuous and
394394
thorough testing. Without it, such software systems cannot be changed and
395-
evolved over time reliably. Carbon will re-use these practices in conjunction
395+
evolved over time reliably. Carbon will reuse these practices in conjunction
396396
with checking build modes to mitigate the limitations of Carbon's safety
397397
guarantees without imposing overhead on production systems.
398398

explorer/interpreter/pattern_analysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ auto PatternMatrix::FirstColumnDiscriminators() const -> DiscriminatorSet {
196196
num_discrims = choice->declaration().alternatives().size();
197197
elem_size = 1;
198198
} else if (isa<BoolType>(type)) {
199-
// `bool` behaves like a choice type with two alternativs,
199+
// `bool` behaves like a choice type with two alternatives,
200200
// and with no nested patterns for either of them.
201201
num_discrims = 2;
202202
elem_size = 0;

migrate_cpp/rewriter_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Annotations {
5656
// Rewrites the `cpp_code`, return the Carbon equivalent. If the text has no
5757
// source range annotated with $[[...]]$, the entire translation unit will be
5858
// migrated and output. Otherwise, only the migrated output corresponding to the
59-
// annotated range will be be output. No more than one range may be annoated at
59+
// annotated range will be be output. No more than one range may be annotated at
6060
// all.
6161
//
6262
// This annotation mechanism is useful in that it allows us to specifically test

proposals/p0175.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,11 @@ high cost feature to achieve full parity for mixed toolchains. Requiring bridge
350350
code for mixed toolchains is the likely solution to avoid this cost.
351351

352352
Note that this issue differs when considering interoperability for Carbon code
353-
instantiating C++ templates. The C++ templates must be in C++ headers for
354-
re-use, which in turn must compile with the Carbon toolchain to re-use the built
355-
C++ code, regardless of whether a separate C++ toolchain is in use. This may
356-
also be considered a constraint on mixed toolchain interoperability, but it's
357-
simpler to address and less likely to burden developers.
353+
instantiating C++ templates. The C++ templates must be in C++ headers for reuse,
354+
which in turn must compile with the Carbon toolchain to reuse the built C++
355+
code, regardless of whether a separate C++ toolchain is in use. This may also be
356+
considered a constraint on mixed toolchain interoperability, but it's simpler to
357+
address and less likely to burden developers.
358358

359359
To summarize, developers should expect that while _most_ features will work
360360
equivalently for mixed toolchains, there will never be full parity.

proposals/p1964.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ determined, and how we are encoding character literals. When declaring a
310310
character literal, the type is based on the contents of the character so that
311311
`var c: u8 = 'a'` is a valid character that can be converted to `u8`, in order
312312
to support prefix declarations we would need to extend our type system to have
313-
other exlpicit type checks like in C++; a UTF-16 `u'`, UTF-32 `U'`, and wide
313+
other explicit type checks like in C++; a UTF-16 `u'`, UTF-32 `U'`, and wide
314314
characters `L'`. This would be more familiar for individuals coming to Carbon
315315
from a C++ background, and simplify our approach for C++ Interoperability. At
316316
the cost of diverge from existing standards, for example

proposals/p2200.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ fn F[template T:! I](x: T) {
750750
- If generic name lookup would succeed, in this example it would be because
751751
`G` is a member of `I`, then the result of name lookup is template validity
752752
dependent. This means that template instantiation may fail if `T` has a
753-
member `G` different than `T.(I.G)`. Assuming it succceeds, though, it will
753+
member `G` different than `T.(I.G)`. Assuming it succeeds, though, it will
754754
definitely have meaning determined by `I.G`. There may still be ambiguity
755755
making the result dependent if it is not known whether `x` is a type and
756756
`I.G` is a method and so has an implicit `me` parameter.

0 commit comments

Comments
 (0)