[ 
https://issues.apache.org/jira/browse/BEAM-5846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16667875#comment-16667875
 ] 

Heejong Lee commented on BEAM-5846:
-----------------------------------

Further investigation: Sometimes pylint detects 
`FlinkStreamingImpulseSource.from_runner_api_parameter` as a static method, 
sometimes not.
{code:java}
(testenv) beam/sdks/python$ scripts/run_pylint.sh
Skipping lint for generated files: bigquery_v2_client.py, 
bigquery_v2_messages.py, dataflow_v1b3_client.py, dataflow_v1b3_messages.py, 
storage_v1_client.py, storage_v1_messages.py, 
proto2_coder_test_messages_pb2.py, beam_artifact_api_pb2_grpc.py, 
beam_artifact_api_pb2.py, beam_fn_api_pb2_grpc.py, beam_fn_api_pb2.py, 
beam_job_api_pb2_grpc.py, beam_job_api_pb2.py, beam_provision_api_pb2_grpc.py, 
beam_provision_api_pb2.py, beam_runner_api_pb2_grpc.py, beam_runner_api_pb2.py, 
endpoints_pb2_grpc.py, endpoints_pb2.py, standard_window_fns_pb2_grpc.py, 
standard_window_fns_pb2.py
Running pylint for module apache_beam gen_protos.py setup.py test_config.py:
Using config file /usr/local/google/home/heejong/Work/beam/sdks/python/.pylintrc
FlinkStreamingImpulseSource::expand : method
FlinkStreamingImpulseSource::get_windowing : method
FlinkStreamingImpulseSource::infer_output_type : method
FlinkStreamingImpulseSource::to_runner_api_parameter : method
FlinkStreamingImpulseSource::set_interval_ms : method
FlinkStreamingImpulseSource::set_message_count : method
FlinkStreamingImpulseSource::from_runner_api_parameter : method
************* Module apache_beam.io.flink.flink_streaming_impulse_source
E: 68, 2: Method should have "self" as first argument (no-self-argument)
************* Module apache_beam.typehints.decorators
E:147, 0: Use of __slots__ on an old style class (slots-on-old-class)

-------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 9.99/10, +0.00)

(testenv) beam/sdks/python$ scripts/run_pylint.sh
Skipping lint for generated files: bigquery_v2_client.py, 
bigquery_v2_messages.py, dataflow_v1b3_client.py, dataflow_v1b3_messages.py, 
storage_v1_client.py, storage_v1_messages.py, 
proto2_coder_test_messages_pb2.py, beam_artifact_api_pb2_grpc.py, 
beam_artifact_api_pb2.py, beam_fn_api_pb2_grpc.py, beam_fn_api_pb2.py, 
beam_job_api_pb2_grpc.py, beam_job_api_pb2.py, beam_provision_api_pb2_grpc.py, 
beam_provision_api_pb2.py, beam_runner_api_pb2_grpc.py, beam_runner_api_pb2.py, 
endpoints_pb2_grpc.py, endpoints_pb2.py, standard_window_fns_pb2_grpc.py, 
standard_window_fns_pb2.py
Running pylint for module apache_beam gen_protos.py setup.py test_config.py:
Using config file /usr/local/google/home/heejong/Work/beam/sdks/python/.pylintrc
FlinkStreamingImpulseSource::expand : method
FlinkStreamingImpulseSource::get_windowing : method
FlinkStreamingImpulseSource::infer_output_type : method
FlinkStreamingImpulseSource::to_runner_api_parameter : method
FlinkStreamingImpulseSource::set_interval_ms : method
FlinkStreamingImpulseSource::set_message_count : method
FlinkStreamingImpulseSource::from_runner_api_parameter : staticmethod
************* Module apache_beam.typehints.decorators
E:147, 0: Use of __slots__ on an old style class (slots-on-old-class)

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

{code}
 

> inconsistent result from pylint
> -------------------------------
>
>                 Key: BEAM-5846
>                 URL: https://issues.apache.org/jira/browse/BEAM-5846
>             Project: Beam
>          Issue Type: Bug
>          Components: testing
>            Reporter: Heejong Lee
>            Assignee: Heejong Lee
>            Priority: Major
>         Attachments: lint_100.txt, lint_j1_100.txt
>
>
> scripts/run_pylint.sh returns inconsistent result. 
> {code:java}
> beam/sdks/python$ for i in `seq 100`; do scripts/run_pylint.sh; done > 
> lint_100.txt
> beam/sdks/python$ grep slots-on-old-class lint_100.txt | wc -l
> 100
> beam/sdks/python$ grep no-self-argument lint_100.txt | wc -l
> 42
> {code}
>  
> Tested @ 0c8ccae9aa608f4d64b22c08d57b9aaa8724bfee
> {code:java}
> beam/sdks/python$ pip freeze
> apache-beam==2.9.0.dev0
> avro==1.8.2
> cachetools==2.1.0
> certifi==2018.8.24
> chardet==3.0.4
> crcmod==1.7
> dill==0.2.8.2
> docopt==0.6.2
> enum34==1.1.6
> fastavro==0.21.9
> fasteners==0.14.1
> funcsigs==1.0.2
> future==0.16.0
> futures==3.2.0
> gapic-google-cloud-pubsub-v1==0.15.4
> google-apitools==0.5.20
> google-auth==1.5.1
> google-auth-httplib2==0.0.3
> google-cloud-bigquery==0.25.0
> google-cloud-core==0.25.0
> google-cloud-pubsub==0.26.0
> google-gax==0.15.16
> googleapis-common-protos==1.5.3
> googledatastore==7.0.1
> grpc-google-iam-v1==0.11.4
> grpcio==1.15.0
> hdfs==2.1.0
> httplib2==0.11.3
> idna==2.7
> mock==2.0.0
> monotonic==1.5
> nose==1.3.7
> numpy==1.15.2
> oauth2client==4.1.3
> pbr==4.3.0
> ply==3.8
> proto-google-cloud-datastore-v1==0.90.4
> proto-google-cloud-pubsub-v1==0.15.4
> protobuf==3.6.1
> pyarrow==0.11.0
> pyasn1==0.4.4
> pyasn1-modules==0.2.2
> pydot==1.2.4
> PyHamcrest==1.9.0
> pyparsing==2.2.2
> pytz==2018.4
> PyVCF==0.6.8
> PyYAML==3.13
> requests==2.19.1
> rsa==4.0
> six==1.11.0
> typing==3.6.6
> urllib3==1.23
> beam/sdks/python$ python --version
> Python 2.7.13
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to