[ 
https://issues.apache.org/jira/browse/BEAM-8350?focusedWorklogId=328299&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-328299
 ]

ASF GitHub Bot logged work on BEAM-8350:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Oct/19 03:47
            Start Date: 15/Oct/19 03:47
    Worklog Time Spent: 10m 
      Work Description: chadrik commented on pull request #9725: [BEAM-8350] 
Upgrade to Pylint 2.4
URL: https://github.com/apache/beam/pull/9725#discussion_r334741855
 
 

 ##########
 File path: sdks/python/.pylintrc
 ##########
 @@ -85,28 +85,41 @@ disable =
   bad-builtin,
   bad-super-call,
   broad-except,
+  chained-comparison,
 
 Review comment:
   > How did you choose which to rules to permanently exclude and which to fix 
in this PR?
   
   That's a good question. 
   
   Obvious errors to exclude:
   
   - `useless-object-inheritance`: obviously we need to keep this until we get 
to python3-only
   -  `import-outside-toplevel`: scoped imports are pretty fundamental.  I 
don't even understand why they added this as an error
   
   Probably worth solving now:
   - `expression-not-assigned`: used in a few places in tests.  Could be worth 
making explicit exclusions for the test cases so that the problem is not spread 
elsewhere
   - `singleton-comparison`:  e.g. `x == None`.  this only occurs in a few 
places, so would be easy to squash now
   
   Could be added to a ticket for later:
   - `no-else-raise/break/continue`:  this pattern is pretty prevalent 
throughout the code.  could be worth fixing, but pretty time consuming.  good 
newbie task.
   
   Here's the full output (excluding the first two).  Let me know if there are 
other errors you'd like to fix in this PR or add to a follow-up ticket.
   
   ```
   ************* Module apache_beam.metrics.metricbase
   apache_beam/metrics/metricbase.py:92:2: W0107: Unnecessary pass statement 
(unnecessary-pass)
   ************* Module apache_beam.pvalue
   apache_beam/pvalue.py:195:2: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/pvalue.py:201:2: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/pvalue.py:574:2: W0107: Unnecessary pass statement 
(unnecessary-pass)
   ************* Module apache_beam.metrics.execution_test
   apache_beam/metrics/execution_test.py:129:21: R1718: Consider using a set 
comprehension (consider-using-set-comprehension)
   apache_beam/metrics/execution_test.py:131:21: R1718: Consider using a set 
comprehension (consider-using-set-comprehension)
   apache_beam/metrics/execution_test.py:140:21: R1718: Consider using a set 
comprehension (consider-using-set-comprehension)
   apache_beam/metrics/execution_test.py:142:21: R1718: Consider using a set 
comprehension (consider-using-set-comprehension)
   ************* Module apache_beam.options.pipeline_options
   apache_beam/options/pipeline_options.py:181:6: R1723: Unnecessary "elif" 
after "break" (no-else-break)
   apache_beam/options/pipeline_options.py:520:9: R1714: Consider merging these 
comparisons with "in" to "runner in ('DataflowRunner', 'TestDataflowRunner')" 
(consider-using-in)
   ************* Module apache_beam.pipeline
   apache_beam/pipeline.py:243:10: R1720: Unnecessary "elif" after "raise" 
(no-else-raise)
   apache_beam/pipeline.py:682:23: R1718: Consider using a set comprehension 
(consider-using-set-comprehension)
   apache_beam/pipeline.py:720:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/pipeline.py:724:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/pipeline.py:728:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/pipeline.py:732:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   ************* Module apache_beam.coders.coder_impl
   apache_beam/coders/coder_impl.py:405:9: R1714: Consider merging these 
comparisons with "in" to 't in (LIST_TYPE, TUPLE_TYPE, SET_TYPE)' 
(consider-using-in)
   apache_beam/coders/coder_impl.py:459:7: R0123: Comparison to literal 
(literal-comparison)
   apache_beam/coders/coder_impl.py:461:9: R0123: Comparison to literal 
(literal-comparison)
   apache_beam/coders/coder_impl.py:470:7: R0123: Comparison to literal 
(literal-comparison)
   apache_beam/coders/coder_impl.py:472:9: R0123: Comparison to literal 
(literal-comparison)
   ************* Module apache_beam.coders.coders
   apache_beam/coders/coders.py:192:4: R1720: Unnecessary "else" after "raise" 
(no-else-raise)
   apache_beam/coders/coders.py:198:4: R1720: Unnecessary "else" after "raise" 
(no-else-raise)
   ************* Module apache_beam.pipeline_test
   apache_beam/pipeline_test.py:690:8: R1718: Consider using a set 
comprehension (consider-using-set-comprehension)
   apache_beam/pipeline_test.py:695:8: R1718: Consider using a set 
comprehension (consider-using-set-comprehension)
   ************* Module apache_beam.io.hadoopfilesystem
   apache_beam/io/hadoopfilesystem.py:67:2: W0236: Method 'size' was expected 
to be 'method', found it instead as 'property' (invalid-overridden-method)
   ************* Module apache_beam.io.filesystems
   apache_beam/io/filesystems.py:91:6: R1720: Unnecessary "elif" after "raise" 
(no-else-raise)
   ************* Module apache_beam.io.sources_test
   apache_beam/io/sources_test.py:112:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.io.parquetio_it_test
   apache_beam/io/parquetio_it_test.py:124:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.io.localfilesystem_test
   apache_beam/io/localfilesystem_test.py:340:7: C0121: Comparison to None 
should be 'expr is not None' (singleton-comparison)
   apache_beam/io/localfilesystem_test.py:383:7: C0121: Comparison to None 
should be 'expr is not None' (singleton-comparison)
   ************* Module apache_beam.io.textio
   apache_beam/io/textio.py:126:4: R1720: Unnecessary "elif" after "raise" 
(no-else-raise)
   ************* Module apache_beam.io.filebasedsource_test
   apache_beam/io/filebasedsource_test.py:232:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:239:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:248:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:318:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:336:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:344:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:395:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:406:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:414:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:423:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:431:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:457:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:618:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:702:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:713:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:724:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:733:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:740:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:749:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:757:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:767:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/filebasedsource_test.py:777:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.io.range_trackers
   apache_beam/io/range_trackers.py:236:6: R1720: Unnecessary "elif" after 
"raise" (no-else-raise)
   ************* Module apache_beam.io.source_test_utils
   apache_beam/io/source_test_utils.py:206:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/source_test_utils.py:221:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/source_test_utils.py:331:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/source_test_utils.py:639:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.io.vcfio_test
   apache_beam/io/vcfio_test.py:332:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/vcfio_test.py:530:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/vcfio_test.py:540:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.io.avroio
   apache_beam/io/avroio.py:481:16: R1708: Do not raise StopIteration in 
generator, use return statement instead (stop-iteration-return)
   ************* Module apache_beam.io.restriction_trackers
   apache_beam/io/restriction_trackers.py:151:9: R1716: Simplify chained 
comparison between the operands (chained-comparison)
   ************* Module apache_beam.io.avroio_test
   apache_beam/io/avroio_test.py:150:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/avroio_test.py:266:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/avroio_test.py:291:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/avroio_test.py:354:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.io.mongodbio_it_test
   apache_beam/io/mongodbio_it_test.py:85:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.io.hadoopfilesystem_test
   apache_beam/io/hadoopfilesystem_test.py:72:4: W0125: Using a conditional 
statement with a constant value (using-constant-test)
   apache_beam/io/hadoopfilesystem_test.py:151:6: R1720: Unnecessary "else" 
after "raise" (no-else-raise)
   ************* Module apache_beam.io.filesystem_test
   apache_beam/io/filesystem_test.py:301:9: R1714: Consider merging these 
comparisons with "in" to 'compression_type in (CompressionTypes.BZIP2, 
CompressionTypes.GZIP)' (consider-using-in)
   ************* Module apache_beam.io.fileio
   apache_beam/io/fileio.py:382:2: W0107: Unnecessary pass statement 
(unnecessary-pass)
   ************* Module apache_beam.io.filesystemio_test
   apache_beam/io/filesystemio_test.py:39:2: W0236: Method 'size' was expected 
to be 'method', found it instead as 'property' (invalid-overridden-method)
   ************* Module apache_beam.io.gcp.gcsfilesystem
   apache_beam/io/gcp/gcsfilesystem.py:102:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   ************* Module apache_beam.io.fileio_test
   apache_beam/io/fileio_test.py:268:37: R1718: Consider using a set 
comprehension (consider-using-set-comprehension)
   apache_beam/io/fileio_test.py:303:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.io.parquetio_test
   apache_beam/io/parquetio_test.py:380:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/parquetio_test.py:393:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/parquetio_test.py:399:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/io/parquetio_test.py:424:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.io.gcp.bigquery_test
   apache_beam/io/gcp/bigquery_test.py:728:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.io.gcp.bigquery
   apache_beam/io/gcp/bigquery.py:446:4: R1720: Unnecessary "elif" after 
"raise" (no-else-raise)
   apache_beam/io/gcp/bigquery.py:872:6: R1723: Unnecessary "else" after 
"break" (no-else-break)
   ************* Module apache_beam.io.gcp.gcsio_test
   apache_beam/io/gcp/gcsio_test.py:119:16: R1716: Simplify chained comparison 
between the operands (chained-comparison)
   ************* Module apache_beam.io.gcp.bigquery_file_loads
   apache_beam/io/gcp/bigquery_file_loads.py:509:6: R1720: Unnecessary "elif" 
after "raise" (no-else-raise)
   apache_beam/io/gcp/bigquery_file_loads.py:626:4: R1720: Unnecessary "elif" 
after "raise" (no-else-raise)
   ************* Module apache_beam.io.gcp.tests.bigquery_matcher
   apache_beam/io/gcp/tests/bigquery_matcher.py:184:4: R1720: Unnecessary 
"else" after "raise" (no-else-raise)
   ************* Module apache_beam.io.gcp.tests.utils
   apache_beam/io/gcp/tests/utils.py:43:2: W0107: Unnecessary pass statement 
(unnecessary-pass)
   ************* Module apache_beam.io.gcp.bigquery_file_loads_test
   apache_beam/io/gcp/bigquery_file_loads_test.py:88:4: R1718: Consider using a 
set comprehension (consider-using-set-comprehension)
   ************* Module apache_beam.io.gcp.gcsio
   apache_beam/io/gcp/gcsio.py:112:2: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/io/gcp/gcsio.py:155:7: R1714: Consider merging these comparisons 
with "in" to "mode in ('r', 'rb')" (consider-using-in)
   apache_beam/io/gcp/gcsio.py:160:9: R1714: Consider merging these comparisons 
with "in" to "mode in ('w', 'wb')" (consider-using-in)
   apache_beam/io/gcp/gcsio.py:492:6: R1720: Unnecessary "else" after "raise" 
(no-else-raise)
   apache_beam/io/gcp/gcsio.py:516:2: W0236: Method 'size' was expected to be 
'method', found it instead as 'property' (invalid-overridden-method)
   ************* Module apache_beam.io.gcp.datastore.v1.helper_test
   apache_beam/io/gcp/datastore/v1/helper_test.py:73:4: R1720: Unnecessary 
"else" after "raise" (no-else-raise)
   ************* Module apache_beam.io.external.generate_sequence_test
   apache_beam/io/external/generate_sequence_test.py:54:0: R1721: Unnecessary 
use of a comprehension (unnecessary-comprehension)
   ************* Module apache_beam.utils.retry
   apache_beam/utils/retry.py:56:2: W0107: Unnecessary pass statement 
(unnecessary-pass)
   ************* Module apache_beam.utils.processes
   apache_beam/utils/processes.py:47:4: R1720: Unnecessary "else" after "raise" 
(no-else-raise)
   apache_beam/utils/processes.py:67:4: R1720: Unnecessary "else" after "raise" 
(no-else-raise)
   apache_beam/utils/processes.py:87:4: R1720: Unnecessary "else" after "raise" 
(no-else-raise)
   ************* Module apache_beam.utils.urns
   apache_beam/utils/urns.py:55:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   ************* Module apache_beam.testing.util
   apache_beam/testing/util.py:54:2: W0107: Unnecessary pass statement 
(unnecessary-pass)
   ************* Module apache_beam.testing.test_pipeline
   apache_beam/testing/test_pipeline.py:166:6: R1724: Unnecessary "elif" after 
"continue" (no-else-continue)
   ************* Module apache_beam.testing.synthetic_pipeline
   apache_beam/testing/synthetic_pipeline.py:742:8: R1714: Consider merging 
these comparisons with "in" to "barrier in ('merge-gbk', 'merge-side-input')" 
(consider-using-in)
   ************* Module apache_beam.transforms.create_source
   apache_beam/transforms/create_source.py:54:31: R1708: Do not raise 
StopIteration in generator, use return statement instead (stop-iteration-return)
   ************* Module apache_beam.transforms.sideinputs
   apache_beam/transforms/sideinputs.py:69:11: W0143: Comparing against a 
callable, did you omit the parenthesis? (comparison-with-callable)
   ************* Module apache_beam.transforms.create_test
   apache_beam/transforms/create_test.py:110:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.transforms.userstate
   apache_beam/transforms/userstate.py:106:6: R1720: Unnecessary "else" after 
"raise" (no-else-raise)
   ************* Module apache_beam.transforms.util
   apache_beam/transforms/util.py:537:4: R1720: Unnecessary "elif" after 
"raise" (no-else-raise)
   apache_beam/transforms/util.py:730:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/transforms/util.py:738:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.transforms.stats
   apache_beam/transforms/stats.py:79:4: R1720: Unnecessary "elif" after 
"raise" (no-else-raise)
   apache_beam/transforms/stats.py:84:6: R1720: Unnecessary "else" after 
"raise" (no-else-raise)
   apache_beam/transforms/stats.py:89:6: R1720: Unnecessary "else" after 
"raise" (no-else-raise)
   ************* Module apache_beam.transforms.external
   apache_beam/transforms/external.py:140:6: R1724: Unnecessary "else" after 
"continue" (no-else-continue)
   apache_beam/transforms/external.py:352:8: R1720: Unnecessary "else" after 
"raise" (no-else-raise)
   ************* Module apache_beam.transforms.trigger_test
   apache_beam/transforms/trigger_test.py:458:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.transforms.userstate_test
   apache_beam/transforms/userstate_test.py:547:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.transforms.core
   apache_beam/transforms/core.py:105:2: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/transforms/core.py:545:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/transforms/core.py:554:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/transforms/core.py:559:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/transforms/core.py:577:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/transforms/core.py:1053:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/transforms/core.py:1256:4: R1720: Unnecessary "elif" after 
"raise" (no-else-raise)
   apache_beam/transforms/core.py:2427:4: R1720: Unnecessary "elif" after 
"raise" (no-else-raise)
   ************* Module apache_beam.transforms.trigger
   apache_beam/transforms/trigger.py:179:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/transforms/trigger.py:191:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/transforms/trigger.py:211:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/transforms/trigger.py:226:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/transforms/trigger.py:231:4: W0107: Unnecessary pass statement 
(unnecessary-pass)
   apache_beam/transforms/trigger.py:858:4: R1720: Unnecessary "elif" after 
"raise" (no-else-raise)
   apache_beam/transforms/trigger.py:870:4: R1720: Unnecessary "elif" after 
"raise" (no-else-raise)
   ************* Module apache_beam.transforms.ptransform_test
   apache_beam/transforms/ptransform_test.py:542:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   apache_beam/transforms/ptransform_test.py:594:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.examples.cookbook.bigtableio_it_test
   apache_beam/examples/cookbook/bigtableio_it_test.py:182:0: R1721: 
Unnecessary use of a comprehension (unnecessary-comprehension)
   ************* Module apache_beam.runners.runner
   apache_beam/runners/runner.py:83:6: R1720: Unnecessary "else" after "raise" 
(no-else-raise)
   ************* Module apache_beam.runners.dataflow.dataflow_metrics
   apache_beam/runners/dataflow/dataflow_metrics.py:51:2: R1720: Unnecessary 
"elif" after "raise" (no-else-raise)
   ************* Module apache_beam.runners.common
   apache_beam/runners/common.py:974:4: R1720: Unnecessary "else" after "raise" 
(no-else-raise)
   apache_beam/runners/common.py:1015:4: R1720: Unnecessary "else" after 
"raise" (no-else-raise)
   apache_beam/runners/common.py:1022:4: R1720: Unnecessary "else" after 
"raise" (no-else-raise)
   apache_beam/runners/common.py:1029:4: R1720: Unnecessary "else" after 
"raise" (no-else-raise)
   ************* Module apache_beam.runners.direct.bundle_factory
   apache_beam/runners/direct/bundle_factory.py:148:0: R1721: Unnecessary use 
of a comprehension (unnecessary-comprehension)
   ************* Module apache_beam.runners.dataflow.dataflow_runner
   apache_beam/runners/dataflow/dataflow_runner.py:198:10: R1724: Unnecessary 
"else" after "continue" (no-else-continue)
   ************* Module apache_beam.runners.direct.transform_evaluator
   apache_beam/runners/direct/transform_evaluator.py:255:4: W0107: Unnecessary 
pass statement (unnecessary-pass)
   apache_beam/runners/direct/transform_evaluator.py:284:4: W0107: Unnecessary 
pass statement (unnecessary-pass)
   ************* Module apache_beam.runners.direct.executor
   apache_beam/runners/direct/executor.py:160:2: W0107: Unnecessary pass 
statement (unnecessary-pass)
   ************* Module apache_beam.runners.interactive.cache_manager
   apache_beam/runners/interactive/cache_manager.py:216:9: R1714: Consider 
merging these comparisons with "in" to 'timestamp not in (0, 
self.current_timestamp)' (consider-using-in)
   ************* Module apache_beam.runners.interactive.interactive_runner
   apache_beam/runners/interactive/interactive_runner.py:101:6: R1722: Consider 
using sys.exit() (consider-using-sys-exit)
   ************* Module apache_beam.runners.interactive.interactive_beam
   apache_beam/runners/interactive/interactive_beam.py:86:2: W0107: Unnecessary 
pass statement (unnecessary-pass)
   ************* Module 
apache_beam.runners.interactive.display.pipeline_graph_renderer
   apache_beam/runners/interactive/display/pipeline_graph_renderer.py:122:2: 
R1720: Unnecessary "elif" after "raise" (no-else-raise)
   ************* Module apache_beam.runners.portability.flink_runner_test
   apache_beam/runners/portability/flink_runner_test.py:175:0: R1721: 
Unnecessary use of a comprehension (unnecessary-comprehension)
   ************* Module apache_beam.runners.portability.stager
   apache_beam/runners/portability/stager.py:264:10: R1720: Unnecessary "elif" 
after "raise" (no-else-raise)
   ************* Module apache_beam.runners.portability.portable_runner
   apache_beam/runners/portability/portable_runner.py:272:8: W0706: The except 
handler raises immediately (try-except-raise)
   ************* Module apache_beam.runners.portability.portable_runner_test
   apache_beam/runners/portability/portable_runner_test.py:121:6: R1720: 
Unnecessary "elif" after "raise" (no-else-raise)
   ************* Module apache_beam.runners.worker.opcounters_test
   apache_beam/runners/worker/opcounters_test.py:72:27: R1718: Consider using a 
set comprehension (consider-using-set-comprehension)
   ************* Module apache_beam.runners.worker.sdk_worker_test
   apache_beam/runners/worker/sdk_worker_test.py:54:8: R1720: Unnecessary 
"elif" after "raise" (no-else-raise)
   ************* Module apache_beam.runners.worker.opcounters
   apache_beam/runners/worker/opcounters.py:306:0: R1721: Unnecessary use of a 
comprehension (unnecessary-comprehension)
   ************* Module apache_beam.runners.portability.fn_api_runner_transforms
   apache_beam/runners/portability/fn_api_runner_transforms.py:747:16: R1718: 
Consider using a set comprehension (consider-using-set-comprehension)
   apache_beam/runners/portability/fn_api_runner_transforms.py:1170:14: R1708: 
Do not raise StopIteration in generator, use return statement instead 
(stop-iteration-return)
   ************* Module apache_beam.runners.worker.bundle_processor
   apache_beam/runners/worker/bundle_processor.py:281:12: W0143: Comparing 
against a callable, did you omit the parenthesis? (comparison-with-callable)
   ************* Module apache_beam.runners.worker.sdk_worker_main
   apache_beam/runners/worker/sdk_worker_main.py:81:8: W0107: Unnecessary pass 
statement (unnecessary-pass)
   ************* Module apache_beam.runners.portability.fn_api_runner
   apache_beam/runners/portability/fn_api_runner.py:1017:6: W0107: Unnecessary 
pass statement (unnecessary-pass)
   apache_beam/runners/portability/fn_api_runner.py:1463:8: R1723: Unnecessary 
"elif" after "break" (no-else-break)
   ************* Module apache_beam.runners.worker.sdk_worker
   apache_beam/runners/worker/sdk_worker.py:659:4: R1720: Unnecessary "else" 
after "raise" (no-else-raise)
   ************* Module apache_beam.runners.worker.operations
   apache_beam/runners/worker/operations.py:228:4: W0107: Unnecessary pass 
statement (unnecessary-pass)
   apache_beam/runners/worker/operations.py:244:4: W0107: Unnecessary pass 
statement (unnecessary-pass)
   apache_beam/runners/worker/operations.py:250:4: W0107: Unnecessary pass 
statement (unnecessary-pass)
   apache_beam/runners/worker/operations.py:886:7: R0123: Comparison to literal 
(literal-comparison)
   ************* Module apache_beam.typehints.trivial_inference_test
   apache_beam/typehints/trivial_inference_test.py:116:0: R1721: Unnecessary 
use of a comprehension (unnecessary-comprehension)
   apache_beam/typehints/trivial_inference_test.py:122:0: R1721: Unnecessary 
use of a comprehension (unnecessary-comprehension)
   apache_beam/typehints/trivial_inference_test.py:126:0: R1721: Unnecessary 
use of a comprehension (unnecessary-comprehension)
   apache_beam/typehints/trivial_inference_test.py:139:0: R1721: Unnecessary 
use of a comprehension (unnecessary-comprehension)
   ************* Module apache_beam.typehints.trivial_inference
   apache_beam/typehints/trivial_inference.py:49:2: W0107: Unnecessary pass 
statement (unnecessary-pass)
   apache_beam/typehints/trivial_inference.py:308:4: R1720: Unnecessary "else" 
after "raise" (no-else-raise)
   ************* Module gen_protos
   gen_protos.py:68:0: R1721: Unnecessary use of a comprehension 
(unnecessary-comprehension)
   gen_protos.py:77:4: R1720: Unnecessary "else" after "raise" (no-else-raise)
   ************* Module apache_beam.typehints.typehints
   apache_beam/typehints/typehints.py:818:6: R1720: Unnecessary "else" after 
"raise" (no-else-raise)
   ************* Module apache_beam.typehints.typed_pipeline_test_py3
   apache_beam/typehints/typed_pipeline_test_py3.py:47:6: W0106: Expression 
"['a', 'b', 'c'] | beam.ParDo(MyDoFn())" is assigned to nothing 
(expression-not-assigned)
   apache_beam/typehints/typed_pipeline_test_py3.py:51:6: W0106: Expression 
"[1, 2, 3] | (beam.ParDo(MyDoFn()) | 'again' >> beam.ParDo(MyDoFn()))" is 
assigned to nothing (expression-not-assigned)
   apache_beam/typehints/typed_pipeline_test_py3.py:69:6: W0106: Expression 
"['a', 'b', 'c'] | beam.ParDo(my_do_fn)" is assigned to nothing 
(expression-not-assigned)
   apache_beam/typehints/typed_pipeline_test_py3.py:73:6: W0106: Expression 
"[1, 2, 3] | (beam.ParDo(my_do_fn) | 'again' >> beam.ParDo(my_do_fn))" is 
assigned to nothing (expression-not-assigned)
   apache_beam/typehints/typed_pipeline_test_py3.py:111:6: W0106: Expression 
"[1, 2, 3] | beam.ParDo(MyDoFn())" is assigned to nothing 
(expression-not-assigned)
   apache_beam/typehints/typed_pipeline_test_py3.py:117:6: W0106: Expression 
"[1, 2, 3] | beam.ParDo(do_fn)" is assigned to nothing (expression-not-assigned)
   apache_beam/typehints/typed_pipeline_test_py3.py:133:6: W0106: Expression 
"[1, 2, 3] | beam.ParDo(my_do_fn, side_input=1)" is assigned to nothing 
(expression-not-assigned)
   apache_beam/typehints/typed_pipeline_test_py3.py:147:6: W0106: Expression 
"[1, 2, 3] | beam.ParDo(my_do_fn, a=1)" is assigned to nothing 
(expression-not-assigned)
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 328299)
    Time Spent: 6h 20m  (was: 6h 10m)

> Upgrade to pylint 2.4
> ---------------------
>
>                 Key: BEAM-8350
>                 URL: https://issues.apache.org/jira/browse/BEAM-8350
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Chad Dombrova
>            Assignee: Chad Dombrova
>            Priority: Major
>          Time Spent: 6h 20m
>  Remaining Estimate: 0h
>
> pylint 2.4 provides a number of new features and fixes, but the most 
> important/pressing one for me is that 2.4 adds support for understanding 
> python type annotations, which fixes a bunch of spurious unused import errors 
> in the PR I'm working on for BEAM-7746.
> As of 2.0, pylint dropped support for running tests in python2, so to make 
> the upgrade we have to move our lint jobs to python3.  Doing so will put 
> pylint into "python3-mode" and there is not an option to run in 
> python2-compatible mode.  That said, the beam code is intended to be python3 
> compatible, so in practice, performing a python3 lint on the Beam code-base 
> is perfectly safe.  The primary risk of doing this is that someone introduces 
> a python-3 only change that breaks python2, but these would largely be syntax 
> errors that would be immediately caught by the unit and integration tests.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to