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

Test that generated notebook conform to black, isort and pylint #75

Open
lukany opened this issue Aug 10, 2023 · 0 comments
Open

Test that generated notebook conform to black, isort and pylint #75

lukany opened this issue Aug 10, 2023 · 0 comments
Labels
enhancement New feature or request technical debt Technical debt

Comments

@lukany
Copy link
Contributor

lukany commented Aug 10, 2023

Black, isort and pylint are used to enforce code style in edvart. However, there is no code style check for generated code by edvart. This could be added to edvart's tests.

See below for an example how to check generated code via black:

import tempfile
import nbformat as nbf

from black import Mode, format_file_contents

handle, file = tempfile.mkstemp(suffix='.ipynb')
nbf.write(nb, file)

with open(file, "rw") as f:
    format_file_contents(f.read(), fast=False, mode=Mode())
@lukany lukany added enhancement New feature or request technical debt Technical debt labels Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request technical debt Technical debt
Development

No branches or pull requests

1 participant