I discoverd an different beheavior between "change" and "check":
If I run "black" to my project, it reports no changes.
$ black --diff *.py
All done! β¨ π° β¨
12 files would be left unchanged.
But "--check" reports an issue
$ black --check --preview --diff *.py
--- get_curve.py 2022-06-17 07:38:10.719823 +0000
+++ get_curve.py 2022-06-17 07:39:26.411995 +0000
@@ -31,11 +31,12 @@
sens_data, sens_ext_datal, sens_owm_data, t1, t2, t3 = extract_pg_data(
con, device_id, device_id_ext, device_id_owm
)
if t1 == -1 or t2 == -1 or t3 == -1:
logger.info(
- "No enough ...... data .. ...... ....... ..... .......... is stored yet!"
+ "No enough ...... data .. ...... ....... ..... .......... is stored"
+ " yet!"
)
# todo: .....
would reformat get_curve.py
Oh no! π₯ π π₯
1 file would be reformatted, 11 files would be left unchanged.
If I do this change, black --diff *.py ignores it and it stays in the form --check likes to see
$ black --version
black, 22.3.0 (compiled: yes)
I discoverd an different beheavior between "change" and "check":
If I run "black" to my project, it reports no changes.
But "--check" reports an issue
If I do this change,
black --diff *.pyignores it and it stays in the form--checklikes to see