Skip to content

Commit bbd8fb2

Browse files
authored
Merge pull request #4698 from youknowone/cspell
Update cspell
2 parents 2efc566 + 310a834 commit bbd8fb2

File tree

49 files changed

+481
-442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+481
-442
lines changed

.cspell.json

Lines changed: 146 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -26,120 +26,197 @@
2626
"words": [
2727
// Rust
2828
"ahash",
29-
"bitflags",
3029
"bindgen",
31-
"cstring",
30+
"bitflags",
3231
"chrono",
32+
"cstring",
3333
"flate2",
34+
"hasher",
35+
"idents",
36+
"indexmap",
3437
"insta",
35-
"peekable",
38+
"keccak",
3639
"lalrpop",
37-
"memmap",
40+
"libc",
3841
"Manually",
42+
"maplit",
43+
"memmap",
44+
"metas",
45+
"peekable",
46+
"prepended",
47+
"punct",
3948
"rustc",
49+
"rustfmt",
4050
"splitn",
41-
"unistd",
51+
"trai",
4252
"unic",
53+
"unistd",
4354
// Python
55+
"abstractmethods",
56+
"aiter",
57+
"anext",
58+
"basicsize",
4459
"cformat",
60+
"classcell",
61+
"codepoint",
4562
"cpython",
46-
"fspath",
47-
"kwarg",
48-
"kwargs",
49-
"vararg",
50-
"varargs",
51-
"metaclass",
52-
"metaclasses",
53-
"fstring",
54-
"fstrings",
63+
"defaultaction",
64+
"descr",
65+
"dictcomp",
5566
"docstring",
5667
"docstrings",
68+
"dunder",
69+
"eventmask",
70+
"fdel",
5771
"fileencoding",
72+
"finallyhandler",
73+
"fspath",
74+
"fstring",
75+
"fstrings",
76+
"genexpr",
77+
"getattro",
78+
"getformat",
79+
"getnewargs",
80+
"getweakrefcount",
81+
"getweakrefs",
82+
"idiv",
83+
"impls",
84+
"instancecheck",
85+
"instanceof",
86+
"itemsize",
87+
"iternext",
88+
"kwarg",
89+
"kwargs",
5890
"linearization",
5991
"linearize",
92+
"listcomp",
93+
"mappingproxy",
94+
"maxsplit",
95+
"MemoryView",
96+
"metaclass",
97+
"metaclasses",
98+
"metatype",
99+
"ndim",
100+
"nonbytes",
101+
"origname",
60102
"PYTHONDEBUG",
103+
"PYTHONHOME",
61104
"PYTHONINSPECT",
105+
"PYTHONOPTIMIZE",
62106
"PYTHONPATH",
63-
"PYTHONHOME",
64107
"PYTHONPATH",
65108
"PYTHONVERBOSE",
66-
"PYTHONOPTIMIZE",
67109
"PYTHONWARNINGS",
68-
"basicsize",
69-
"itemsize",
70-
"origname",
71-
"getattro",
72-
"setattro",
73-
"iternext",
74-
"maxsplit",
75-
"fdel",
76-
"subclasscheck",
77110
"qualname",
78-
"eventmask",
79-
"instanceof",
80-
"abstractmethods",
81-
"aiter",
82-
"anext",
83111
"rdiv",
84-
"idiv",
85-
"ndim",
112+
"setattro",
113+
"setcomp",
114+
"stacklevel",
115+
"subclasscheck",
116+
"subclasshook",
86117
"unionable",
118+
"unraisablehook",
119+
"vararg",
120+
"varargs",
87121
"varnames",
88-
"getweakrefs",
89-
"getweakrefcount",
90-
"stacklevel",
91-
"MemoryView",
92-
"metatype",
93122
"warningregistry",
94-
"defaultaction",
95-
"unraisablehook",
96-
"descr",
97-
"xopts",
98123
"warnopts",
99124
"weakproxy",
100-
"mappingproxy",
125+
"xopts",
101126
// RustPython
102-
"RustPython",
127+
"baseclass",
128+
"Bytecode",
129+
"cfgs",
130+
"codegen",
131+
"dedentations",
132+
"dedents",
133+
"deduped",
134+
"downcasted",
135+
"dumpable",
136+
"GetSet",
137+
"internable",
138+
"makeunicodedata",
139+
"miri",
140+
"notrace",
141+
"pyarg",
103142
"pyarg",
104143
"pyargs",
105-
"pygetset",
106-
"pyobj",
107-
"pystr",
144+
"PyAttr",
108145
"pyc",
109-
"pyref",
110-
"pyslot",
111-
"PyFunction",
112-
"PyMethod",
113-
"PyClassMethod",
114-
"PyStaticMethod",
115-
"PyProperty",
116146
"PyClass",
147+
"PyClassMethod",
148+
"PyException",
149+
"PyFunction",
150+
"pygetset",
117151
"pyimpl",
118-
"pyarg",
152+
"pymember",
153+
"PyMethod",
119154
"PyModule",
120-
"PyAttr",
121-
"PyResult",
155+
"pyname",
156+
"pyobj",
122157
"PyObject",
123-
"PyException",
124-
"GetSet",
125-
"zelf",
126-
"wasi",
127-
"Bytecode",
158+
"pypayload",
159+
"PyProperty",
160+
"pyref",
161+
"PyResult",
162+
"pyslot",
163+
"PyStaticMethod",
164+
"pystr",
165+
"pystruct",
166+
"pystructseq",
167+
"pytrace",
128168
"richcompare",
129-
"makeunicodedata",
130-
"unhashable",
131-
"unraisable",
169+
"RustPython",
170+
"struc",
171+
"tracebacks",
132172
"typealiases",
133173
"Unconstructible",
134-
"posonlyargs",
135-
"kwonlyargs",
174+
"unhashable",
136175
"uninit",
137-
"miri",
176+
"unraisable",
177+
"wasi",
178+
"zelf",
138179
// cpython
139-
"linearise",
180+
"argtypes",
181+
"asdl",
182+
"asname",
183+
"augassign",
184+
"badsyntax",
185+
"basetype",
186+
"boolop",
187+
"bxor",
188+
"cellarg",
189+
"cellvar",
190+
"cellvars",
191+
"cmpop",
140192
"dictoffset",
193+
"elts",
194+
"excepthandler",
195+
"finalbody",
196+
"freevar",
197+
"freevars",
198+
"fromlist",
141199
"heaptype",
142-
"IMMUTABLETYPE"
200+
"IMMUTABLETYPE",
201+
"kwonlyarg",
202+
"kwonlyargs",
203+
"linearise",
204+
"maxdepth",
205+
"mult",
206+
"nkwargs",
207+
"orelse",
208+
"patma",
209+
"posonlyarg",
210+
"posonlyargs",
211+
"prec",
212+
"stackdepth",
213+
"unaryop",
214+
"unparse",
215+
"unparser",
216+
"VARKEYWORDS",
217+
"varkwarg",
218+
"withitem",
219+
"withs"
143220
],
144221
// flagWords - list of words to be always considered incorrect
145222
"flagWords": [

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
echo "OPENSSL_DIR=C:\Program Files\OpenSSL-Win64" >>$GITHUB_ENV
128128
if: runner.os == 'Windows'
129129
- name: Set up the Mac environment
130-
run: brew install autoconf automake libtool openssl@3
130+
run: brew install autoconf automake libtool
131131
if: runner.os == 'macOS'
132132

133133
- uses: Swatinem/rust-cache@v2

compiler/ast/src/unparse.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ impl<'a> Unparser<'a> {
4848
}
4949

5050
fn unparse_expr<U>(&mut self, ast: &Expr<U>, level: u8) -> fmt::Result {
51-
macro_rules! opprec {
52-
($opty:ident, $x:expr, $enu:path, $($var:ident($op:literal, $prec:ident)),*$(,)?) => {
51+
macro_rules! op_prec {
52+
($op_ty:ident, $x:expr, $enu:path, $($var:ident($op:literal, $prec:ident)),*$(,)?) => {
5353
match $x {
54-
$(<$enu>::$var => (opprec!(@space $opty, $op), precedence::$prec),)*
54+
$(<$enu>::$var => (op_prec!(@space $op_ty, $op), precedence::$prec),)*
5555
}
5656
};
5757
(@space bin, $op:literal) => {
@@ -72,7 +72,7 @@ impl<'a> Unparser<'a> {
7272
}
7373
match &ast.node {
7474
ExprKind::BoolOp { op, values } => {
75-
let (op, prec) = opprec!(bin, op, Boolop, And("and", AND), Or("or", OR));
75+
let (op, prec) = op_prec!(bin, op, Boolop, And("and", AND), Or("or", OR));
7676
group_if!(prec, {
7777
let mut first = true;
7878
for val in values {
@@ -89,8 +89,8 @@ impl<'a> Unparser<'a> {
8989
})
9090
}
9191
ExprKind::BinOp { left, op, right } => {
92-
let rassoc = matches!(op, Operator::Pow);
93-
let (op, prec) = opprec!(
92+
let right_associative = matches!(op, Operator::Pow);
93+
let (op, prec) = op_prec!(
9494
bin,
9595
op,
9696
Operator,
@@ -109,13 +109,13 @@ impl<'a> Unparser<'a> {
109109
FloorDiv("//", TERM),
110110
);
111111
group_if!(prec, {
112-
self.unparse_expr(left, prec + rassoc as u8)?;
112+
self.unparse_expr(left, prec + right_associative as u8)?;
113113
self.p(op)?;
114-
self.unparse_expr(right, prec + !rassoc as u8)?;
114+
self.unparse_expr(right, prec + !right_associative as u8)?;
115115
})
116116
}
117117
ExprKind::UnaryOp { op, operand } => {
118-
let (op, prec) = opprec!(
118+
let (op, prec) = op_prec!(
119119
un,
120120
op,
121121
crate::Unaryop,
@@ -131,8 +131,8 @@ impl<'a> Unparser<'a> {
131131
}
132132
ExprKind::Lambda { args, body } => {
133133
group_if!(precedence::TEST, {
134-
let npos = args.args.len() + args.posonlyargs.len();
135-
self.p(if npos > 0 { "lambda " } else { "lambda" })?;
134+
let pos = args.args.len() + args.posonlyargs.len();
135+
self.p(if pos > 0 { "lambda " } else { "lambda" })?;
136136
self.unparse_args(args)?;
137137
write!(self, ": {}", **body)?;
138138
})
@@ -260,7 +260,7 @@ impl<'a> Unparser<'a> {
260260
[],
261261
) = (&**args, &**keywords)
262262
{
263-
// make sure a single genexp doesn't get double parens
263+
// make sure a single genexpr doesn't get double parens
264264
self.unparse_expr(elt, precedence::TEST)?;
265265
self.unparse_comp(generators)?;
266266
} else {
@@ -287,7 +287,7 @@ impl<'a> Unparser<'a> {
287287
conversion,
288288
format_spec,
289289
} => self.unparse_formatted(value, *conversion, format_spec.as_deref())?,
290-
ExprKind::JoinedStr { values } => self.unparse_joinedstr(values, false)?,
290+
ExprKind::JoinedStr { values } => self.unparse_joined_str(values, false)?,
291291
ExprKind::Constant { value, kind } => {
292292
if let Some(kind) = kind {
293293
self.p(kind)?;
@@ -490,7 +490,7 @@ impl<'a> Unparser<'a> {
490490
unreachable!()
491491
}
492492
}
493-
ExprKind::JoinedStr { values } => self.unparse_joinedstr(values, is_spec),
493+
ExprKind::JoinedStr { values } => self.unparse_joined_str(values, is_spec),
494494
ExprKind::FormattedValue {
495495
value,
496496
conversion,
@@ -505,7 +505,7 @@ impl<'a> Unparser<'a> {
505505
self.p(&s)
506506
}
507507

508-
fn unparse_joinedstr<U>(&mut self, values: &[Expr<U>], is_spec: bool) -> fmt::Result {
508+
fn unparse_joined_str<U>(&mut self, values: &[Expr<U>], is_spec: bool) -> fmt::Result {
509509
if is_spec {
510510
self.unparse_fstring_body(values, is_spec)
511511
} else {

0 commit comments

Comments
 (0)