Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide better output from code style check #4

Closed
cemilcengiz opened this issue Sep 17, 2021 · 2 comments
Closed

Provide better output from code style check #4

cemilcengiz opened this issue Sep 17, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@cemilcengiz
Copy link
Contributor

When I run the following code from the project root directory,
python tests/run_code_style.py check

I get the error below.

ERROR: SOME_FOLDERS/trapper/trapper/data/dataset_readers/dataset_reader.py Imports are incorrectly sorted and/or formatted.
Skipped 1 files
Traceback (most recent call last):
  File "tests/run_code_style.py", line 10, in <module>
    assert_shell("isort . --check --settings setup.cfg")
  File "SOME_FOLDERS/trapper/tests/utils.py", line 19, in assert_shell
    ), f"Unexpected exit code {str(actual_exit_status)}"
AssertionError: Unexpected exit code 256

Can't we just print messages for each incorrectly formatted code instead of throwing an exception?

@cemilcengiz cemilcengiz added the enhancement New feature or request label Sep 17, 2021
@devrimcavusoglu
Copy link
Member

ERROR: SOME_FOLDERS/trapper/trapper/data/dataset_readers/dataset_reader.py Imports are incorrectly sorted and/or formatted.
Skipped 1 files

This is isort's output without a touch (only it can output such files), but I'll find a prettier way to eliminate the traceback output. 👍

@devrimcavusoglu
Copy link
Member

Fixed in #8 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants