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

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

                Author: ASF GitHub Bot
            Created on: 26/Jan/22 01:04
            Start Date: 26/Jan/22 01:04
    Worklog Time Spent: 10m 
      Work Description: TheNeuralBit commented on a change in pull request 
#16541:
URL: https://github.com/apache/beam/pull/16541#discussion_r792243106



##########
File path: sdks/python/apache_beam/utils/processes_test.py
##########
@@ -48,11 +48,9 @@ def test_method_forwarding_not_windows(self, *unused_mocks):
     processes.subprocess.check_call.assert_called_once_with(
         ['subprocess', 'check_call'], shell=False, other_arg=True)
 
-    processes.check_output(['subprocess', 'check_output'],
-                           shell=False,
-                           other_arg=True)

Review comment:
       Does this actually trigger the pylint warning? The function accepts 
arbitrary keyword args: 
https://github.com/apache/beam/blob/640e6c245a89581578da68b26d6e27b55deb6a80/sdks/python/apache_beam/utils/processes.py#L85
   
   Regardless I think `other_arg` is part of what this test is verifying, so I 
don't think we should remove it. Let's disable the check instead if necessary.
   

##########
File path: sdks/python/apache_beam/transforms/cy_combiners.py
##########
@@ -83,13 +83,14 @@ def extract_output(self):
 
 
 class SumInt64Accumulator(object):
+  INT64_MAX = 2**_63-1
+  INT64_MIN = -2**_63
   def __init__(self):
     self.value = 0
 
   def add_input(self, element):
-    global INT64_MAX, INT64_MIN  # pylint: disable=global-variable-not-assigned

Review comment:
       I think it would be preferable to just disable the `undefined-variable` 
as well.

##########
File path: sdks/python/apache_beam/dataframe/frame_base_test.py
##########
@@ -65,9 +65,9 @@ def add_one(frame):
     x = frames.DeferredSeries(original_expr)
     x.add_one()
     self.assertIs(x._expr, original_expr)
-    x.add_one(inplace=False)
+    x.add_one(frame=False)
     self.assertIs(x._expr, original_expr)
-    x.add_one(inplace=True)

Review comment:
       This breaks the test: 
https://ci-beam.apache.org/job/beam_PreCommit_Python_Commit/21214/testReport/junit/apache_beam.dataframe.frame_base_test/FrameBaseTest/test_maybe_inplace/
   
   Should we just disable the check here instead?

##########
File path: sdks/python/apache_beam/coders/coders.py
##########
@@ -802,7 +802,7 @@ def _create_impl(self):
         lambda x: dumps(x, protocol), pickle.loads)
 
   def as_deterministic_coder(self, step_label, error_message=None):
-    return FastPrimitivesCoder(self, requires_deterministic=step_label)

Review comment:
       Hm this does look like a problem, but I don't think this is the 
appropriate fix. Maybe we should be creating a 
`DeterministicFastPrimitivesCoder` instead. Do you know @robertwb?




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 715383)
    Time Spent: 10.5h  (was: 10h 20m)

> Enable all practical pylint warnings
> ------------------------------------
>
>                 Key: BEAM-13051
>                 URL: https://issues.apache.org/jira/browse/BEAM-13051
>             Project: Beam
>          Issue Type: Task
>          Components: sdk-py-core
>            Reporter: Brian Hulette
>            Assignee: Mike Hernandez
>            Priority: P2
>          Time Spent: 10.5h
>  Remaining Estimate: 0h
>
> We currently have 75 pylint checks disabled globally: 
> https://github.com/apache/beam/blob/0863d95205410567a7ab191fd0a46308a0d54bb7/sdks/python/.pylintrc#L81
> I think some of these are impractical for Beam (e.g. 
> [super-init-not-called|https://pycodequ.al/docs/pylint-messages/w0231-super-init-not-called.html]
>  because of BEAM-6158), but most of them are verifying good conventions that 
> we should try to stick to. Let's enable as many of the checks as possible, 
> such that the only disabled checks are really impractical for Beam, or are 
> incompatible with the Beam community's coding style.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to