mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07:00
plugin_formatter.py: Improve the output when processing docs (#46541)
* Improve the output when processing files * Update docs/bin/plugin_formatter.py Co-Authored-By: dagwieers <dag@wieers.com> * Show progress indicator. * Don't pp.pformat() huge structures when they aren't used anyway. This saves ~10 seconds on my machine. * Only show ASCII spinner if stdout is a TTY. * Fix: E722 do not use bare 'except'
This commit is contained in:
parent
40144c7486
commit
ee29ba5d4f
2 changed files with 35 additions and 6 deletions
|
@ -36,3 +36,6 @@ def update_file_if_different(filename, b_data):
|
|||
if b_data_old != b_data:
|
||||
with open(filename, 'wb') as f:
|
||||
f.write(b_data)
|
||||
return True
|
||||
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue