diff --git a/.pylintrc b/.pylintrc index 0a980d43b3..9a3ee55af3 100644 --- a/.pylintrc +++ b/.pylintrc @@ -94,7 +94,6 @@ disable= inconsistent-return-statements, # TODO: Make returns consistent consider-merging-isinstance, # TODO: Merge isinstance where appropriate consider-using-in, # TODO: Consider merging comparisons with "in" - simplifiable-if-expression, # TODO: Simplify expressions too-many-public-methods, # TODO: Resolve ungrouped-imports, # TODO: Group imports consider-using-ternary, # TODO: Consider ternary expressions diff --git a/src/sagemaker/session.py b/src/sagemaker/session.py index efa56fc0f9..019f9e4ef9 100644 --- a/src/sagemaker/session.py +++ b/src/sagemaker/session.py @@ -1292,9 +1292,7 @@ def logs_for_job( # noqa: C901 - suppress complexity warning for this method client = self.boto_session.client("logs", config=config) log_group = "/aws/sagemaker/TrainingJobs" - job_already_completed = ( - True if status == "Completed" or status == "Failed" or status == "Stopped" else False - ) + job_already_completed = status == "Completed" or status == "Failed" or status == "Stopped" state = LogState.TAILING if wait and not job_already_completed else LogState.COMPLETE dot = False