Skip to content

Commit

Permalink
[CodeStyle][Typos][K-[2-4]] Fix typo (keyward, Keyward) (#70356)
Browse files Browse the repository at this point in the history
  • Loading branch information
huangkr03 authored Dec 21, 2024
1 parent 5eed911 commit 1066ed7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ cll = 'cll'
dout = "dout"
eles = 'eles'
grad = "grad"
kinf = 'kinf'
kow = 'kow'
lod = "lod"
Nce = "Nce"
Nd = "Nd"
Expand Down Expand Up @@ -262,10 +264,6 @@ interated = 'interated'
Iteraion = 'Iteraion'
IIT = 'IIT'
iy = 'iy'
Keyward = 'Keyward'
keyward = 'keyward'
kinf = 'kinf'
kow = 'kow'
lable = 'lable'
lamda = 'lamda'
labmda = 'labmda'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ struct PirToPyCodeConverterHelper {
const auto& args = block.args();
return std::find(args.begin(), args.end(), value) != args.end();
};
const auto IsBlockKeywardArg = [&](pir::Value value) {
const auto IsBlockKeywordArg = [&](pir::Value value) {
const auto& kwargs = block.kwargs();
for (const auto& [_, kwarg] : kwargs) {
if (kwarg == value) return true;
Expand All @@ -499,7 +499,7 @@ struct PirToPyCodeConverterHelper {
if (std::find(inputs.begin(), inputs.end(), value) != inputs.end())
continue;
if (IsBlockPositionalArg(value)) continue;
if (IsBlockKeywardArg(value)) continue;
if (IsBlockKeywordArg(value)) continue;
inputs.push_back(value);
}
return inputs;
Expand Down
4 changes: 2 additions & 2 deletions python/paddle/jit/dy2static/program_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def __call__(self, *args: _InputT.args, **kwargs: _InputT.kwargs) -> _RetT:
Args:
*args(tuple): tuple of all input arguments from original decorated function.
**kwargs(dict): dict of all input keyward arguments from original decorated function.
**kwargs(dict): dict of all input keyword arguments from original decorated function.
Return:
Outputs of decorated function.
Expand Down Expand Up @@ -576,7 +576,7 @@ def _call_dygraph_function(
Args:
*args(tuple): tuple of all input arguments from original decorated function.
**kwargs(dict): dict of all input keyward arguments from original decorated function.
**kwargs(dict): dict of all input keyword arguments from original decorated function.
Return:
Outputs of dygraph function.
Expand Down

0 comments on commit 1066ed7

Please sign in to comment.