Skip to content

Fix linter errors#416

Merged
timmarkhuff merged 1 commit intomainfrom
tim/fix-lint-error
Mar 18, 2026
Merged

Fix linter errors#416
timmarkhuff merged 1 commit intomainfrom
tim/fix-lint-error

Conversation

@timmarkhuff
Copy link
Contributor

@timmarkhuff timmarkhuff commented Mar 18, 2026

#413 was merged in with a few linter errors. This PR fixes them.

def hydrate_inference_config_names(
cls, value: dict[str, InferenceConfig | dict[str, Any]] | None
) -> dict[str, InferenceConfig | dict[str, Any]]:
cls, value: Optional[dict[str, Union[InferenceConfig, dict[str, Any]]]]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This syntax is required for Python 3.9

Copy link
Collaborator

Choose a reason for hiding this comment

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

I made a ticket for us to drop 3.9 support in the future

if not filename.strip():
raise ValueError("filename must be a non-empty path when provided.")
with open(filename, "r") as f:
with open(filename, "r", encoding="utf-8") as f:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The linter wants an explicit encoding set

ruff = "^0.4.4"
toml-sort = "^0.23.0"
types-PyYAML = "^6.0.0"
types-requests = "^2.28.11.17"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

PyYAML doesn't ship type stubs, so mypy raises [import-untyped] on import yaml. This is the same pattern as types-requests above.



class GlobalConfig(BaseModel):
class GlobalConfig(BaseModel): # pylint: disable=too-few-public-methods
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pydantic data models intentionally have few methods. Pylint doesn't understand this pattern, so we suppress too-few-public-methods (same as RequestsRetryDecorator in internalapi.py)

Copy link
Collaborator

@brandon-wada brandon-wada left a comment

Choose a reason for hiding this comment

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

LGTM

@timmarkhuff timmarkhuff merged commit 5353953 into main Mar 18, 2026
9 checks passed
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