Skip to content

Lots of ruff fixes#44

Open
bje- wants to merge 11 commits into
Open-ISP:mainfrom
bje-:ruff-fixes
Open

Lots of ruff fixes#44
bje- wants to merge 11 commits into
Open-ISP:mainfrom
bje-:ruff-fixes

Conversation

@bje-

@bje- bje- commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

This is the first round of clean-ups by running ruff --select=ALL (with a few classes of warnings disabled for now).

None of these fixes have highlighted up any bugs, but they do improve readability in many instances.


existing_gens = existing_gens.rename(
columns={existing_gens.columns.values[0]: "Generator"}
columns={existing_gens.columns.to_numpy[0]: "Generator"}

@dylanjmcconnell dylanjmcconnell Apr 20, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

.. fyi, .to_numpy is a method.. so should be .to_numpy()[0] (this is a known unsafe auto-fix)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Whoops!

@dylanjmcconnell

Copy link
Copy Markdown
Member

To discuss - but I think that a) we shouldn't be using ruff --select=ALL and b) if we do want to update the ruff rules we use it should be in pyproject.toml (and capture by pre-commit)

@bje-

bje- commented Apr 20, 2026

Copy link
Copy Markdown
Contributor Author

To discuss - but I think that a) we shouldn't be using ruff --select=ALL and b) if we do want to update the ruff rules we use it should be in pyproject.toml (and capture by pre-commit)

There are so many useful linters in Ruff that I think the right way forward is to use --select=ALL and then selectively disable unwanted checks. I'm just proposing to go over the code once and then we can decide what linters to run via pre-commit.

@bje-

bje- commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Ping?

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.

2 participants