assignUser commented on code in PR #15067:
URL: https://github.com/apache/arrow/pull/15067#discussion_r1058405550


##########
dev/archery/archery/utils/lint.py:
##########
@@ -230,6 +230,7 @@ def python_linter(src, fix=False):
 
     yield LintResult.from_cmd(
         flake8("--extend-exclude=" + ','.join(flake8_exclude),
+               "--config=python/setup.cfg",
                setup_py, src.pyarrow, os.path.join(src.python, "examples"),

Review Comment:
   For this to work in the docker lint job we need to specify the absolute path 
as archery is called from outside of the arrow. (see 
[here](https://github.com/apache/arrow/actions/runs/3757323229/jobs/6384396332#step:5:837))
   
   This should do it:
   ```suggestion
           flake8("--extend-exclude=" + ','.join(flake8_exclude),
                  "--config=" + os.path.join(src.python, "setup.cfg"),
                  setup_py, src.pyarrow, os.path.join(src.python, "examples"),
   ```



##########
dev/archery/archery/utils/lint.py:
##########
@@ -230,6 +230,7 @@ def python_linter(src, fix=False):
 
     yield LintResult.from_cmd(
         flake8("--extend-exclude=" + ','.join(flake8_exclude),
+               "--config=python/setup.cfg",
                setup_py, src.pyarrow, os.path.join(src.python, "examples"),

Review Comment:
   For this to work in the docker lint job we need to specify the absolute path 
as archery is called from outside of the arrow. (see 
[here](https://github.com/apache/arrow/actions/runs/3757323229/jobs/6384396332#step:5:837))
   
   This should™ do it:
   ```suggestion
           flake8("--extend-exclude=" + ','.join(flake8_exclude),
                  "--config=" + os.path.join(src.python, "setup.cfg"),
                  setup_py, src.pyarrow, os.path.join(src.python, "examples"),
   ```



##########
.pre-commit-config.yaml:
##########
@@ -46,3 +46,4 @@ repos:
           - file
           - python
         exclude: vendored
+        args: [--config, python/setup.cfg]

Review Comment:
   I don't think we need the absolute path here as precommit should run within 
the arrow dir by default?



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

Reply via email to