samredai opened a new pull request #4034:
URL: https://github.com/apache/iceberg/pull/4034


   During our tox run we call black with `--check` to validate that there are 
no formatting suggestions unaddressed. When that validation fails, the CI logs 
will show something like this:
   ```
   2022-02-03T14:35:27.0054832Z would reformat src/iceberg/types.py
   2022-02-03T14:35:27.0102153Z 
   2022-02-03T14:35:27.0103296Z Oh no! 💥 💔 💥
   2022-02-03T14:35:27.0103889Z 1 file would be reformatted, 15 files would be 
left unchanged.
   2022-02-03T14:35:27.0358843Z ##[error]ERROR: InvocationError for command 
/home/runner/work/iceberg/iceberg/python/.tox/linters/bin/black --line-length 
130 --check setup.py src tests (exited with code 1)
   ```
   I find that it's helpful to show the line diff, as an example:
   ```
   linters run-test: commands[2] | black --line-length 130 --check --diff 
setup.py src tests
   --- src/iceberg/types.py     2022-02-03 15:58:58.471627 +0000
   +++ src/iceberg/types.py     2022-02-03 15:59:03.477538 +0000
   @@ -60,11 +60,11 @@
            return self._is_primitive
    
    
    class FixedType(Type):
        def __init__(self, length: int):
   -        super().__init__(f'fixed[{length}]', f"FixedType(length={length})", 
is_primitive=True)
   +        super().__init__(f"fixed[{length}]", f"FixedType(length={length})", 
is_primitive=True)
            self._length = length
    
        @property
        def length(self) -> int:
            return self._length
   would reformat src/iceberg/types.py
   
   Oh no! 💥 💔 💥
   1 file would be reformatted, 15 files would be left unchanged.
   ```


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to