You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2020/09/13 03:06:55 UTC

[GitHub] [trafficserver] bneradt opened a new pull request #7186: autopep8: avoid running on non-committed files.

bneradt opened a new pull request #7186:
URL: https://github.com/apache/trafficserver/pull/7186


   It was found that if someone has non-commited Python files, such as can
   happen if they have a virtual environment in their source tree, autopep8
   will inspect those as well. This is slow and probably not desired by the
   user.
   
   This patch only runs autopep8 on files tracked by git. It will also
   enable autopep8 to check .test.ext extensions, thus the updates to those
   files.
   
   It also has autopep8 run silently so it doesn't produce as much noise.


----------------------------------------------------------------
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] [trafficserver] bneradt commented on pull request #7186: autopep8: avoid running on non-committed files.

Posted by GitBox <gi...@apache.org>.
bneradt commented on pull request #7186:
URL: https://github.com/apache/trafficserver/pull/7186#issuecomment-692180396


   I'll create a separate PR for 9.0.x.


----------------------------------------------------------------
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] [trafficserver] randall commented on a change in pull request #7186: autopep8: avoid running on non-committed files.

Posted by GitBox <gi...@apache.org>.
randall commented on a change in pull request #7186:
URL: https://github.com/apache/trafficserver/pull/7186#discussion_r488015901



##########
File path: tools/autopep8.sh
##########
@@ -59,6 +59,32 @@ function main() {
   fi
 
   DIR=${@:-.}
+
+  # Only run autopep8 on tracked files. This saves time and possibly avoids
+  # formatting files the user doesn't want formatted.
+  tmp_dir=/tmp/git_files_$$

Review comment:
       this should probably use `mktemp -d` (eg `tmp_dir=$(mktemp -d)`)




----------------------------------------------------------------
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] [trafficserver] bneradt commented on a change in pull request #7186: autopep8: avoid running on non-committed files.

Posted by GitBox <gi...@apache.org>.
bneradt commented on a change in pull request #7186:
URL: https://github.com/apache/trafficserver/pull/7186#discussion_r488024284



##########
File path: tools/autopep8.sh
##########
@@ -59,6 +59,32 @@ function main() {
   fi
 
   DIR=${@:-.}
+
+  # Only run autopep8 on tracked files. This saves time and possibly avoids
+  # formatting files the user doesn't want formatted.
+  tmp_dir=/tmp/git_files_$$

Review comment:
       Yeah, that's 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] [trafficserver] zwoop commented on pull request #7186: autopep8: avoid running on non-committed files.

Posted by GitBox <gi...@apache.org>.
zwoop commented on pull request #7186:
URL: https://github.com/apache/trafficserver/pull/7186#issuecomment-700252532


   Cherry-picked to v9.0.x branch.


----------------------------------------------------------------
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] [trafficserver] bneradt merged pull request #7186: autopep8: avoid running on non-committed files.

Posted by GitBox <gi...@apache.org>.
bneradt merged pull request #7186:
URL: https://github.com/apache/trafficserver/pull/7186


   


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