timsaucer commented on code in PR #1062: URL: https://github.com/apache/datafusion-python/pull/1062#discussion_r1996771284
########## examples/python-udf-comparisons.py: ########## @@ -163,9 +163,9 @@ def udf_using_pyarrow_compute_impl( resultant_arr = pc.and_(resultant_arr, filtered_returnflag_arr) if results is None: - results = resultant_arr - else: - results = pc.or_(results, resultant_arr) + results = ( + resultant_arr if results is None else pc.or_(results, resultant_arr) + ) Review Comment: Can you double check this? It looks like it changed the logic slightly. If results is not `None` it doesn't look like this will work as before ########## python/datafusion/context.py: ########## @@ -844,7 +842,7 @@ def register_csv( file_compression_type: File compression type. """ if isinstance(path, list): - path = [str(p) for p in path] + path = [str(p) for p in path] if isinstance(path, list) else str(path) Review Comment: It looks like we're checking `isinstance` twice here ########## pyproject.toml: ########## @@ -80,29 +80,29 @@ ignore = [ "TD003", # Allow TODO lines "UP007", # Disallowing Union is pedantic # TODO: Enable all of the following, but this PR is getting too large already - "PT001", - "ANN204", - "B008", - "EM101", + #"PT001", + # "ANN204", + # "B008", + # "EM101", "PLR0913", - "PLR1714", - "ANN201", - "C400", + # "PLR1714", + # "ANN201", + # "C400", "TRY003", - "B904", - "UP006", - "RUF012", - "FBT003", - "C416", - "SIM102", - "PGH003", + # "B904", + # "UP006", + # "RUF012", + # "FBT003", + # "C416", + # "SIM102", + # "PGH003", "PLR2004", - "PERF401", + # "PERF401", "PD901", - "EM102", + # "EM102", "ERA001", - "SIM108", - "ICN001", + # "SIM108", + # "ICN001", Review Comment: Can you please remove the lines instead of commenting them out? -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org