get all ruff pep8-naming (N) tests passing - #254
Merged
Conversation
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
markcoletti
reviewed
Jul 29, 2026
| @@ -92,20 +86,19 @@ def launch(executable: Any, | |||
| :param working_dir: The working directory in which to run this task | |||
| :returns: The task name and the return value from running the binary. | |||
| """ | |||
| import logging | |||
There was a problem hiding this comment.
We'll have to ensure this doesn't break things since launch() is invoked remotely on the worker in another process, so the module may have to be imported there. This can be easily checked by running any of the ensemble code.
markcoletti
reviewed
Jul 29, 2026
| # assert rm.check_core_cap(4, 4) == (False, 'insufficient') | ||
|
|
||
| with pytest.raises(BadResourceRequestException) as excinfo: | ||
| with pytest.raises(BadResourceRequestError) as excinfo: |
There was a problem hiding this comment.
This is interesting that it switched from Exception to Error.
markcoletti
approved these changes
Jul 29, 2026
markcoletti
left a comment
There was a problem hiding this comment.
Just had a couple non-blocking comments. (Though ensembles should be tested to ensure those imports in launch() didn't break code.) Overall, these were long overdue changes, particularly getting the naming conventions PEP8 compliant. There were also some nice type hint improvements, too.
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apologies for how annoying this is to review, there were a LOT of violations.
AI was pretty helpful with making the Python code consistent. I also went through and made sure that in the config files:
I eventually just had AI try to fix some Ruff rules which couldn't be autofixed, this follows the pep8-naming module rules and can be checked by running
ruff check --select N.This also runs the formatter against the code because the single commit in this MR was already a mess.
Prior setup
I added a
devgroup to the[dependency-groups]in PyPI, if you are using UV or you have Pip >=25.1 you should be able to runuv syncorpip install --group devrespectively. This group includesruff,pre-commit, and a couple ofpytestmodules (we should try managing all development dependencies here and then change all CI/CD code to install based off of that list, for more declarative configuration)Also I have a pre-commit hook set up (run
pre-commit installafter you've installed pre-commit) which will auto-handle the formatting and linting, as well as a yaml/toml checker and an EOF fixer. Rules are configured in.pre-commit-config.yaml. This fails the commit if it makes any changes or has a non-zero exit code, but the formatting/fixes are auto-applied when possible, so you can just add the files to Git staging and then commit again.Both the
.pre-commit-config.yamland pyprojectdependency-groupswere already pushed to the pre-release branch, see 560d76e