From fb35c6b7423341e4c6a7aa7f39fb2806dc747f32 Mon Sep 17 00:00:00 2001 From: Tony Cao <57024921+caolonghao@users.noreply.github.com> Date: Tue, 11 Oct 2022 11:30:54 +0800 Subject: [PATCH] [CodeStyle][E714] Convert 'not ... is' to 'is not' (#46741) --- tools/CrossStackProfiler/DCGMFileReader.py | 2 +- tools/CrossStackProfiler/NetFileReader.py | 2 +- tools/CrossStackProfiler/ProfileFileReader.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/CrossStackProfiler/DCGMFileReader.py b/tools/CrossStackProfiler/DCGMFileReader.py index 4ae15df5ad0..94daeb607fe 100755 --- a/tools/CrossStackProfiler/DCGMFileReader.py +++ b/tools/CrossStackProfiler/DCGMFileReader.py @@ -100,7 +100,7 @@ class dcgmFileReader(FileReader): axis=0, join='outer') dcgm_data = dcgm_data.dropna() - if not q is None: + if q is not None: q.put(dcgm_data) self._logger.info("I finish processing %s!" % fileName) return dcgm_data diff --git a/tools/CrossStackProfiler/NetFileReader.py b/tools/CrossStackProfiler/NetFileReader.py index 1ae8a6803d5..52d40646491 100755 --- a/tools/CrossStackProfiler/NetFileReader.py +++ b/tools/CrossStackProfiler/NetFileReader.py @@ -73,7 +73,7 @@ class netFileReader(FileReader): (line[:-1], fileName)) traceInfo["traceEvents"] = traceEventList - if not q is None: + if q is not None: q.put(traceInfo) else: return traceInfo diff --git a/tools/CrossStackProfiler/ProfileFileReader.py b/tools/CrossStackProfiler/ProfileFileReader.py index 6fb7d87fd47..955b2248a08 100755 --- a/tools/CrossStackProfiler/ProfileFileReader.py +++ b/tools/CrossStackProfiler/ProfileFileReader.py @@ -53,7 +53,7 @@ class profileFileReader(FileReader): (rankId)] = self._parseSingleFile(fileName) self._logger.info("I finish processing %s!" % fileName) - if not q is None: + if q is not None: q.put(profile_dict) return profile_dict @@ -142,7 +142,7 @@ class profileFileReader(FileReader): res[str(rankId)] = pipeLineList - if not q is None: + if q is not None: q.put(res) return res -- GitLab