Skip to content

Commit 2d4b7d4

Browse files
knakadpengk19
authored andcommitted
change: enable simplifiable-if-expression pylint checks (aws#926)
1 parent bb8f8f7 commit 2d4b7d4

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

.pylintrc

-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ disable=
9494
inconsistent-return-statements, # TODO: Make returns consistent
9595
consider-merging-isinstance, # TODO: Merge isinstance where appropriate
9696
consider-using-in, # TODO: Consider merging comparisons with "in"
97-
simplifiable-if-expression, # TODO: Simplify expressions
9897
too-many-public-methods, # TODO: Resolve
9998
ungrouped-imports, # TODO: Group imports
10099
consider-using-ternary, # TODO: Consider ternary expressions

src/sagemaker/session.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1292,9 +1292,7 @@ def logs_for_job( # noqa: C901 - suppress complexity warning for this method
12921292
client = self.boto_session.client("logs", config=config)
12931293
log_group = "/aws/sagemaker/TrainingJobs"
12941294

1295-
job_already_completed = (
1296-
True if status == "Completed" or status == "Failed" or status == "Stopped" else False
1297-
)
1295+
job_already_completed = status == "Completed" or status == "Failed" or status == "Stopped"
12981296

12991297
state = LogState.TAILING if wait and not job_already_completed else LogState.COMPLETE
13001298
dot = False

0 commit comments

Comments
 (0)