This is an automated email from the ASF dual-hosted git repository.

jrmccluskey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 72e6b9a9d4b Enable use-implicit-booleanness-not-comparison check 
(#28353)
72e6b9a9d4b is described below

commit 72e6b9a9d4b849a0691e32b83b01f025d099291b
Author: Jack McCluskey <34928439+jrmcclus...@users.noreply.github.com>
AuthorDate: Thu Sep 7 13:21:03 2023 -0400

    Enable use-implicit-booleanness-not-comparison check (#28353)
---
 sdks/python/.pylintrc                               | 1 -
 sdks/python/apache_beam/options/pipeline_options.py | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/sdks/python/.pylintrc b/sdks/python/.pylintrc
index 38913a326a4..250932e7981 100644
--- a/sdks/python/.pylintrc
+++ b/sdks/python/.pylintrc
@@ -152,7 +152,6 @@ disable =
   unnecessary-lambda-assignment,
   unnecessary-pass,
   unneeded-not,
-  use-implicit-booleaness-not-comparison, 
#TODO(https://github.com/apache/beam/issues/28244) Enable and fix warnings
   used-before-assignment,
   unsubscriptable-object,
   unsupported-binary-operation,
diff --git a/sdks/python/apache_beam/options/pipeline_options.py 
b/sdks/python/apache_beam/options/pipeline_options.py
index 6d9c5ecd37b..3fbf7eff7dd 100644
--- a/sdks/python/apache_beam/options/pipeline_options.py
+++ b/sdks/python/apache_beam/options/pipeline_options.py
@@ -101,7 +101,7 @@ class _BeamArgumentParser(argparse.ArgumentParser):
     key/value form.
     """
     # Extract the option name from positional argument ['pos_arg']
-    assert args != () and len(args[0]) >= 1
+    assert args and len(args[0]) >= 1
     if args[0][0] != '-':
       option_name = args[0]
       if kwargs.get('nargs') is None:  # make them optionally templated

Reply via email to