You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/05/18 14:19:13 UTC

[GitHub] [arrow] pitrou opened a new pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

pitrou opened a new pull request #7215:
URL: https://github.com/apache/arrow/pull/7215


   `archery lint --flake8` becomes `archery lint --python` and now
   recognizes the `--fix` option.
   
   Reformatting involves running `autopep8`.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on a change in pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #7215:
URL: https://github.com/apache/arrow/pull/7215#discussion_r426826830



##########
File path: dev/archery/archery/utils/command.py
##########
@@ -25,7 +25,7 @@
 
 def default_bin(name, default):
     assert(default)
-    env_name = "ARCHERY_%s_BIN".format(default.upper())
+    env_name = "ARCHERY_{0}_BIN".format(default.upper())

Review comment:
       
   
   @fsaintjacques Here is a non-style issue caught by flake8.
   




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on a change in pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #7215:
URL: https://github.com/apache/arrow/pull/7215#discussion_r426827033



##########
File path: dev/archery/archery/utils/command.py
##########
@@ -25,7 +25,7 @@
 
 def default_bin(name, default):
     assert(default)
-    env_name = "ARCHERY_%s_BIN".format(default.upper())
+    env_name = "ARCHERY_{0}_BIN".format(default.upper())

Review comment:
       (note this is with the latest version of `pycodestyle`)




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] bkietz commented on a change in pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

Posted by GitBox <gi...@apache.org>.
bkietz commented on a change in pull request #7215:
URL: https://github.com/apache/arrow/pull/7215#discussion_r426823003



##########
File path: python/pyarrow/tests/test_pandas.py
##########
@@ -3917,25 +3917,25 @@ def test_metadata_compat_missing_field_name():
                  'name': None,
                  'numpy_type': 'object',
                  'pandas_type': 'mixed-integer'}
-                ],
-             'columns': [
-                 {'metadata': None,
-                  'name': 'a',
-                  'numpy_type': 'int64',
-                  'pandas_type': 'int64'},
-                 {'metadata': None,
-                  'name': 'b',
-                  'numpy_type': 'object',
-                  'pandas_type': 'unicode'}
-                 ],
-             'index_columns': [
-                 {'kind': 'range',
-                  'name': 'qux',
-                  'start': 0,
-                  'step': 2,
-                  'stop': 8}
-                 ],
-             'pandas_version': '0.25.0'}
+            ],
+                'columns': [

Review comment:
       This looks suspicious




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on a change in pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #7215:
URL: https://github.com/apache/arrow/pull/7215#discussion_r426828535



##########
File path: dev/archery/archery/utils/command.py
##########
@@ -25,7 +25,7 @@
 
 def default_bin(name, default):
     assert(default)
-    env_name = "ARCHERY_%s_BIN".format(default.upper())
+    env_name = "ARCHERY_{0}_BIN".format(default.upper())

Review comment:
       No, `%s` isn't recognized by `.format`. IOW it's a bug here.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] fsaintjacques commented on a change in pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

Posted by GitBox <gi...@apache.org>.
fsaintjacques commented on a change in pull request #7215:
URL: https://github.com/apache/arrow/pull/7215#discussion_r426827807



##########
File path: dev/archery/archery/utils/command.py
##########
@@ -25,7 +25,7 @@
 
 def default_bin(name, default):
     assert(default)
-    env_name = "ARCHERY_%s_BIN".format(default.upper())
+    env_name = "ARCHERY_{0}_BIN".format(default.upper())

Review comment:
       What's the issue, deprecated?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7215:
URL: https://github.com/apache/arrow/pull/7215#issuecomment-630221975


   https://issues.apache.org/jira/browse/ARROW-8846


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

Posted by GitBox <gi...@apache.org>.
pitrou commented on pull request #7215:
URL: https://github.com/apache/arrow/pull/7215#issuecomment-630450904


   Yes, I'll do.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on a change in pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #7215:
URL: https://github.com/apache/arrow/pull/7215#discussion_r426824075



##########
File path: dev/archery/requirements-lint.txt
##########
@@ -1,2 +1,3 @@
+autopep8
 flake8

Review comment:
       No, because we still use it (it catches non-style issues).




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] fsaintjacques commented on a change in pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

Posted by GitBox <gi...@apache.org>.
fsaintjacques commented on a change in pull request #7215:
URL: https://github.com/apache/arrow/pull/7215#discussion_r426822879



##########
File path: dev/archery/requirements-lint.txt
##########
@@ -1,2 +1,3 @@
+autopep8
 flake8

Review comment:
       We can get rid of flake8?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] pitrou closed pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

Posted by GitBox <gi...@apache.org>.
pitrou closed pull request #7215:
URL: https://github.com/apache/arrow/pull/7215


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on a change in pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #7215:
URL: https://github.com/apache/arrow/pull/7215#discussion_r426826403



##########
File path: python/pyarrow/tests/test_pandas.py
##########
@@ -3917,25 +3917,25 @@ def test_metadata_compat_missing_field_name():
                  'name': None,
                  'numpy_type': 'object',
                  'pandas_type': 'mixed-integer'}
-                ],
-             'columns': [
-                 {'metadata': None,
-                  'name': 'a',
-                  'numpy_type': 'int64',
-                  'pandas_type': 'int64'},
-                 {'metadata': None,
-                  'name': 'b',
-                  'numpy_type': 'object',
-                  'pandas_type': 'unicode'}
-                 ],
-             'index_columns': [
-                 {'kind': 'range',
-                  'name': 'qux',
-                  'start': 0,
-                  'step': 2,
-                  'stop': 8}
-                 ],
-             'pandas_version': '0.25.0'}
+            ],
+                'columns': [

Review comment:
       Ok, by rearranging the code autopep8 works better.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on a change in pull request #7215: ARROW-8846: [Dev][Python] Autoformat Python files with archery

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #7215:
URL: https://github.com/apache/arrow/pull/7215#discussion_r426824785



##########
File path: python/pyarrow/tests/test_pandas.py
##########
@@ -3917,25 +3917,25 @@ def test_metadata_compat_missing_field_name():
                  'name': None,
                  'numpy_type': 'object',
                  'pandas_type': 'mixed-integer'}
-                ],
-             'columns': [
-                 {'metadata': None,
-                  'name': 'a',
-                  'numpy_type': 'int64',
-                  'pandas_type': 'int64'},
-                 {'metadata': None,
-                  'name': 'b',
-                  'numpy_type': 'object',
-                  'pandas_type': 'unicode'}
-                 ],
-             'index_columns': [
-                 {'kind': 'range',
-                  'name': 'qux',
-                  'start': 0,
-                  'step': 2,
-                  'stop': 8}
-                 ],
-             'pandas_version': '0.25.0'}
+            ],
+                'columns': [

Review comment:
       If you view the diff in split mode, you'll see that it seems ok.




----------------------------------------------------------------
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:
users@infra.apache.org