potiuk commented on a change in pull request #5979: [AIRFLOW-5373] Super fast pre-commit check for basic python2 compatib… URL: https://github.com/apache/airflow/pull/5979#discussion_r320271199
########## File path: airflow/contrib/example_dags/example_qubole_operator.py ########## @@ -198,7 +198,7 @@ def compare_result(ds, **kwargs): /** Computes an approximation to pi */ object SparkPi { - def main(args: Array[String]) { + def main(args) { Review comment: Actually I thought about writing a bit more complex regex to exclude lines which have the standard `# noqa` in the same line - so that you can explicitly disable it if needed. Here is the regex that will likely work :) `^(?!.*# noqa)(.*\.super\(\)|^\s*def\s*\S*\([^):]*:.*|^\sdef\s*\S*\(.*\):\s*\-\>\s*\S*).*$ ` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services