Skip to content

Commit 74cd508

Browse files
authored
[CodeStyle][Typos][C-[10-15]] Fix typo(CACH(4), catched(2), cuase(2), channles(1), channnel(2), cahr(1)) (#69562)
1 parent c2feed0 commit 74cd508

File tree

8 files changed

+13
-20
lines changed

8 files changed

+13
-20
lines changed

_typos.toml

-6
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ Uniqe = 'Uniqe'
155155
valuse = 'valuse'
156156
exsits = 'exsits'
157157
sucessfully = 'sucessfully'
158-
CACH = 'CACH'
159158
endianess = 'endianess'
160159
VAILD = 'VAILD'
161160
ues = 'ues'
@@ -201,7 +200,6 @@ sotring = 'sotring'
201200
overriden = 'overriden'
202201
Maxinum = 'Maxinum'
203202
caculate = 'caculate'
204-
cahr = 'cahr'
205203
occures = 'occures'
206204
framwork = 'framwork'
207205
localy = 'localy'
@@ -247,7 +245,6 @@ starup = 'starup'
247245
iy = 'iy'
248246
bindins = 'bindins'
249247
choses = 'choses'
250-
catched = 'catched'
251248
rewrited = 'rewrited'
252249
targt = 'targt'
253250
Theoritical = 'Theoritical'
@@ -337,7 +334,6 @@ funtion = 'funtion'
337334
optin = 'optin'
338335
defualt = 'defualt'
339336
envirnment = 'envirnment'
340-
cuase = 'cuase'
341337
fot = 'fot'
342338
coloumn = 'coloumn'
343339
inital = 'inital'
@@ -465,7 +461,6 @@ Leafs = 'Leafs'
465461
effecient = 'effecient'
466462
modifed = 'modifed'
467463
deserailize = 'deserailize'
468-
channnel = 'channnel'
469464
Suger = 'Suger'
470465
Actural = 'Actural'
471466
subsituted = 'subsituted'
@@ -777,7 +772,6 @@ varn = 'varn'
777772
exmaple = 'exmaple'
778773
happend = 'happend'
779774
sequentail = 'sequentail'
780-
channles = 'channles'
781775
Mutiply = 'Mutiply'
782776
Currenly = 'Currenly'
783777
dimention = 'dimention'

paddle/fluid/framework/data_feed.cc

+5-6
Original file line numberDiff line numberDiff line change
@@ -419,12 +419,11 @@ int InMemoryDataFeed<T>::Next() {
419419
PADDLE_ENFORCE_EQ(output_channel_ != nullptr,
420420
true,
421421
common::errors::InvalidArgument(
422-
"Output channnel should not be null, please check!"));
423-
PADDLE_ENFORCE_EQ(
424-
consume_channel_ != nullptr,
425-
true,
426-
common::errors::InvalidArgument(
427-
"Consume channnel should not be null, please check!"));
422+
"Output channel should not be null, please check!"));
423+
PADDLE_ENFORCE_EQ(consume_channel_ != nullptr,
424+
true,
425+
common::errors::InvalidArgument(
426+
"Consume channel should not be null, please check!"));
428427
VLOG(3) << "output_channel_ size=" << output_channel_->Size()
429428
<< ", consume_channel_ size=" << consume_channel_->Size()
430429
<< ", thread_id=" << thread_id_;

paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/unary_infer_sym.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2534,7 +2534,7 @@ bool PixelShuffleOpInferSymbolicShape(
25342534

25352535
const bool channel_last = (data_format == "NHWC");
25362536

2537-
// the number of channles shoule be able to be divided by the upscale_factor
2537+
// the number of channels shoule be able to be divided by the upscale_factor
25382538
// ^ 2.
25392539
// TODO(Lans1ot, Buaa): add constrain for the channel number and
25402540
// upscale_factor

paddle/fluid/pybind/sot/cpython_internals.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static void Internal_frame_init_get_vars(_PyInterpreterFrame *frame) {
311311
PyObject *o = PyTuple_GET_ITEM(closure, i);
312312
frame->localsplus[offset + i] = Py_NewRef(o);
313313
}
314-
// COPY_FREE_VARS doesn't have inline CACHEs, either:
314+
// COPY_FREE_VARS doesn't have inline caches, either:
315315
frame->prev_instr = _PyCode_CODE(frame->f_code);
316316
}
317317

@@ -534,7 +534,7 @@ int Internal_PyFrame_FastToLocalsWithError(_PyInterpreterFrame *frame) {
534534
Py_INCREF(o);
535535
frame->localsplus[offset + i] = o;
536536
}
537-
// COPY_FREE_VARS doesn't have inline CACHEs, either:
537+
// COPY_FREE_VARS doesn't have inline caches, either:
538538
frame->prev_instr = _PyCode_CODE(frame->f_code);
539539
}
540540
for (int i = 0; i < co->co_nlocalsplus; i++) {

security/advisory/pdsa-2023-013.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CVE-2023-52304
66

77
### Impact
88

9-
Invalid shapes cuase stack buffer overflow in `paddle.searchsorted`. The PoC is as follows:
9+
Invalid shapes cause stack buffer overflow in `paddle.searchsorted`. The PoC is as follows:
1010

1111
```python
1212
import paddle

security/advisory/pdsa-2023-016.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CVE-2023-52307
66

77
### Impact
88

9-
Invalid shapes cuase stack buffer overflow in `paddle.linalg.lu_unpack`. The PoC is as follows:
9+
Invalid shapes cause stack buffer overflow in `paddle.linalg.lu_unpack`. The PoC is as follows:
1010

1111
```python
1212
import paddle

test/dygraph_to_static/transformer_util.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def load(program, model_path, executor=None, var_list=None):
395395
paddle.static.load(program, model_path, executor, var_list)
396396
except UnicodeDecodeError:
397397
warnings.warn(
398-
"An UnicodeDecodeError is catched, which might be caused by loading "
398+
"An UnicodeDecodeError is caught, which might be caused by loading "
399399
"a python2 saved model. Encoding of pickle.load would be set and "
400400
"load again automatically."
401401
)
@@ -419,7 +419,7 @@ def load_dygraph(model_path, keep_name_table=False):
419419
return para_dict, opti_dict
420420
except UnicodeDecodeError:
421421
warnings.warn(
422-
"An UnicodeDecodeError is catched, which might be caused by loading "
422+
"An UnicodeDecodeError is caught, which might be caused by loading "
423423
"a python2 saved model. Encoding of pickle.load would be set and "
424424
"load again automatically."
425425
)

tools/gen_ut_cmakelists.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def _init_dist_ut_ports_from_cmakefile(self, cmake_file_name):
270270
break
271271
name = lines[k - 1].strip()
272272

273-
# matcg right tets name format, the name must start with 'test_' follwed bu at least one cahr of
273+
# matcg right tets name format, the name must start with 'test_' follwed bu at least one char of
274274
# '0-9'. 'a-z'. 'A-Z' or '_'
275275
assert re.compile("^test_[0-9a-zA-Z_]+").search(
276276
name

0 commit comments

Comments
 (0)