Branch ci lint typecheck fix - #540
Merged
Merged
Conversation
lm2612
marked this pull request as ready for review
July 31, 2026 10:54
lm2612
commented
Jul 31, 2026
| [tool.ruff.lint] | ||
| extend-select = ["E", "D", "I"] | ||
| ignore = ["D200","D202","D210","D212","D415","D105"] | ||
| ignore = ["D200","D202","D210","D212","D415","D105", |
Contributor
Author
There was a problem hiding this comment.
Avoids the following errors which I was unsure how to deal with:
TRY002 Create your own exception
--> pvnet/models/base_model.py:166:23
|
164 | except Exception as e:
165 | if attempt == max_retries:
166 | raise Exception(
| _______________________^
167 | | f"Failed to download {filename} from {repo_id} after {max_retries} attempts."
168 | | ) from e
LOG015 `warning()` call on root logger
--> pvnet/models/base_model.py:169:13
|
167 | f"Failed to download {filename} from {repo_id} after {max_retries} attempts."
168 | ) from e
169 | / logging.warning(
170 | | (
171 | | f"Attempt {attempt}/{max_retries} failed to download {filename} "
172 | | f"from {repo_id}. Retrying in {wait_time} seconds..."
173 | | )
174 | | )
B008 Do not perform function call `typer.Argument` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable
--> scripts/checkpoint_to_huggingface.py:33:39
|
31 | @app.command()
32 | def push_to_huggingface(
33 | checkpoint_dir_paths: list[str] = typer.Argument(...,),
| ^^^^^^^^^^^^^^^^^^^^
34 | huggingface_repo: str = typer.Option(..., "--huggingface-repo"),
35 | wandb_repo: str = typer.Option(..., "--wandb-repo"),| MODEL_CONFIG_NAME, | ||
| PYTORCH_WEIGHTS_NAME, | ||
| ) | ||
|
|
Contributor
There was a problem hiding this comment.
Should add logger = logging.getLogger(__name__)
| ignore = ["D200","D202","D210","D212","D415","D105"] | ||
| ignore = ["D200","D202","D210","D212","D415","D105", | ||
| "TRY002", # Create your own exception | ||
| "LOG015", # `warning()` call on root logger |
Contributor
There was a problem hiding this comment.
try to remove this, using logger = logging.getLogger(__name__)
| "TRY002", # Create your own exception | ||
| "LOG015", # `warning()` call on root logger | ||
| "B008", # Do not perform function call typer.Argument | ||
| ] |
Contributor
There was a problem hiding this comment.
happy to ignore TRY002 and B008
peterdudfield
approved these changes
Jul 31, 2026
Contributor
|
Approved, but good to change logger warning |
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.
Pull Request
Description
Following .github/workflows changes and ruff update to v0.16, some linting issues were flagged which leads to CI failing. I have implementing some fixes to the code and added some ignore error codes to the pyproject.toml for the following:
warning()call on root loggerFixes #537
How Has This Been Tested?
The updates should not change any of the code. pytests still run. I've also tested that I can train pvnet
Checklist: