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

tests/emulator: add license, lint with ruff #412

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

t184256
Copy link
Collaborator

@t184256 t184256 commented Sep 10, 2024

Adds ruff-based linting for python files.

Related to @shelvacu's #393,
where I do appreciate the idea of linting, but I'd like to have it decoupled from script-building time.

Copy link
Collaborator

@Gerschtli Gerschtli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new formatting LGTM, though I am not that familiar with ruff or its alternatives. But basic linting and formatting is always a good thing :)

Copy link

@shelvacu shelvacu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nitpick but looks good

uses: cachix/install-nix-action@v25

- name: Run ruff linter
run: nix run 'nixpkgs#ruff' -- check

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the interest of running the version of ruff we expect to run, shouldn't this point to something in flake.nix? Unfortunately I don't think nix run .#nixpkgs.legacyPackages.x86_64.ruff works but we could expose ruff in the flake and run that.

@t184256
Copy link
Collaborator Author

t184256 commented Sep 11, 2024 via email

@Gerschtli
Copy link
Collaborator

in the end, a flake check is just a derivation that either ends with touch $out in case of success or with exit 1 in case of error.

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

Successfully merging this pull request may close these issues.

3 participants