!7988 [MD] Code reivew

Merge pull request !7988 from luoyang/pylint
This commit is contained in:
mindspore-ci-bot 2020-10-30 09:20:29 +08:00 committed by Gitee
commit a898a8246e
2 changed files with 3 additions and 3 deletions

View File

@ -70,9 +70,9 @@ Status MindDataNode::ValidateParams() {
}
if (padded_sample_ != nullptr) {
if (num_padded_ < 0) {
if (num_padded_ < 0 || num_padded_ > INT_MAX) {
std::string err_msg =
"MindDataNode: num_padded must be greater than or equal to zero, num_padded: " + std::to_string(num_padded_);
"MindDataNode: num_padded must to be between 0 and INT32_MAX, but got: " + std::to_string(num_padded_);
MS_LOG(ERROR) << err_msg;
RETURN_STATUS_SYNTAX_ERROR(err_msg);
}

View File

@ -560,7 +560,7 @@ class RandomPosterize(cde.RandomPosterizeOp):
Bits values must be in range of [1,8], and include at
least one integer value in the given range. It must be in
(min, max) or integer format. If min=max, then it is a single fixed
magnitude operation (default=[4, 8]).
magnitude operation (default=[8, 8]).
Examples:
>>> import mindspore.dataset.vision.c_transforms as c_vision