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 2021/02/11 14:40:30 UTC

[GitHub] [airflow] dimonchik-suvorov opened a new pull request #14193: Adding `pretty-py3` library to get it's features

dimonchik-suvorov opened a new pull request #14193:
URL: https://github.com/apache/airflow/pull/14193


   Adding `pretty-py3` library to get its features on `Rendered Template` page.
   
   closes: #14192 


----------------------------------------------------------------
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] [airflow] github-actions[bot] commented on pull request #14193: Adding `pretty-py3` library to get it's features

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


   [The Workflow run](https://github.com/apache/airflow/actions/runs/558195001) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


----------------------------------------------------------------
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] [airflow] dimonchik-suvorov commented on pull request #14193: Adding `pretty-py3` library to get it's features

Posted by GitBox <gi...@apache.org>.
dimonchik-suvorov commented on pull request #14193:
URL: https://github.com/apache/airflow/pull/14193#issuecomment-777559404


   > Simply adding this library won't change anything.
   > 
   > We already use [willmcgugan/rich](https://github.com/willmcgugan/rich) which you can leverage to have similar functionality
   
   I've tested it locally and it fixes the issue if the library is importable from Jinja...
   I'm not sure I understand you correctly... Airflow is using Jinja in this case in this line and Jinja uses `pretty`... Could you please explain how that lib you provided should fix my issue?


----------------------------------------------------------------
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] [airflow] dimonchik-suvorov closed pull request #14193: Adding `pretty-py3` library to get it's features

Posted by GitBox <gi...@apache.org>.
dimonchik-suvorov closed pull request #14193:
URL: https://github.com/apache/airflow/pull/14193


   


----------------------------------------------------------------
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] [airflow] kaxil commented on pull request #14193: Adding `pretty-py3` library to get it's features

Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #14193:
URL: https://github.com/apache/airflow/pull/14193#issuecomment-777615243


   > > Simply adding this library won't change anything.
   > > We already use [willmcgugan/rich](https://github.com/willmcgugan/rich) which you can leverage to have similar functionality
   > 
   > I've tested it locally and it fixes the issue if the library is importable from Jinja...
   > I'm not sure I understand you correctly... Airflow is using Jinja in this case in this line and Jinja uses `pretty`... Could you please explain how that lib you provided should fix my issue?
   
   
   
   The library `pretty-py3` is not actively maintained and I am not sure if we should use it that globally.
   
   Jinja uses built-in library not an external library - 
   https://github.com/pallets/jinja/blob/f009a004a2e70a3608d49aceb1814b90bb4370d6/src/jinja2/utils.py#L160
   
   https://docs.python.org/3.8/library/pprint.html
   
   That said -- I think the users who want it can use the library you mentioned or add their own custom filter.
   
   You can just do `{{ yourvar| custom_pprint}}` where `custom_pprint` is your custom filter and Jinja will print it nicely I think: https://stackoverflow.com/a/25728848/5691525


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