From 2a6d79e0deec0fe2d3f6f4ea7adbaa810a5d3d85 Mon Sep 17 00:00:00 2001 From: Karim Nakad Date: Mon, 15 Jul 2019 09:14:54 -0700 Subject: [PATCH] change: enable consider-merging-isinstance Pylint check Note that this commit will also enable simplifiable-if-statement, as there are no code changes needed for it. --- .pylintrc | 2 -- src/sagemaker/tuner.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.pylintrc b/.pylintrc index 9a3ee55af3..f07f0cd607 100644 --- a/.pylintrc +++ b/.pylintrc @@ -92,13 +92,11 @@ disable= cyclic-import, # TODO: Resolve cyclic imports no-self-use, # TODO: Convert methods to functions where appropriate inconsistent-return-statements, # TODO: Make returns consistent - consider-merging-isinstance, # TODO: Merge isinstance where appropriate consider-using-in, # TODO: Consider merging comparisons with "in" too-many-public-methods, # TODO: Resolve ungrouped-imports, # TODO: Group imports consider-using-ternary, # TODO: Consider ternary expressions chained-comparison, # TODO: Simplify chained comparison between operands - simplifiable-if-statement, # TODO: Simplify ifs too-many-branches, # TODO: Simplify or ignore as appropriate missing-docstring, # TODO: Fix missing docstring diff --git a/src/sagemaker/tuner.py b/src/sagemaker/tuner.py index 08c578a99d..0c423e1c3c 100644 --- a/src/sagemaker/tuner.py +++ b/src/sagemaker/tuner.py @@ -307,7 +307,7 @@ def fit(self, inputs=None, job_name=None, include_cls_metadata=False, **kwargs): **kwargs: Other arguments needed for training. Please refer to the ``fit()`` method of the associated estimator to see what other arguments are needed. """ - if isinstance(inputs, list) or isinstance(inputs, RecordSet): + if isinstance(inputs, (list, RecordSet)): self.estimator._prepare_for_training(inputs, **kwargs) else: self.estimator._prepare_for_training(job_name)