From aab9efbcec0bbded807bf207e2324266573fa3a6 Mon Sep 17 00:00:00 2001 From: Yash Katariya Date: Wed, 25 Mar 2020 09:07:01 -0700 Subject: [PATCH] Remove the redundant `else` condition. PiperOrigin-RevId: 302901741 Change-Id: I65281a07fc2789fbc13775c1365fd01789a1bb7e --- tensorflow/python/tf2.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tensorflow/python/tf2.py b/tensorflow/python/tf2.py index fd1c8c1757a..bc713d6e28b 100644 --- a/tensorflow/python/tf2.py +++ b/tensorflow/python/tf2.py @@ -24,7 +24,6 @@ from __future__ import print_function import os - _force_enable = None @@ -44,5 +43,5 @@ def enabled(): """Returns True iff TensorFlow 2.0 behavior should be enabled.""" if _force_enable is None: return os.getenv("TF2_BEHAVIOR", "0") != "0" - else: - return _force_enable + + return _force_enable