You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/10 05:58:09 UTC

[GitHub] [airflow] XD-DENG commented on a change in pull request #12216: Simplify string expressions & Use f-string

XD-DENG commented on a change in pull request #12216:
URL: https://github.com/apache/airflow/pull/12216#discussion_r520305079



##########
File path: airflow/providers/google/cloud/hooks/bigquery.py
##########
@@ -2801,9 +2801,7 @@ def _split_tablename(
 ) -> Tuple[str, str, str]:
 
     if '.' not in table_input:
-        raise ValueError(
-            'Expected target table name in the format of ' '<dataset>.<table>. Got: {}'.format(table_input)
-        )
+        raise ValueError(f'Expected table name in the format of <dataset>.<table>. Got: {table_input}')

Review comment:
       Fix the earlier static check error.
   
   Please note that I made a minor change to the content here for two reasons:
   - otherwise the updated line will be longer than 110
   - more importantly, this `_split_tablename` method is used for both `source` and `destination`. Word `target` may be a bit misleading, and the updated one is meaning enough to me as well.
   
   CC @mik-laj 




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