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

Enable pylinter rule C0415 on CI #235

Merged
merged 2 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ols/src/rag_index/index_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# So this module is excluded from mypy checks as a whole.
def load_llama_index_deps() -> None:
"""Load llama_index dependencies."""
# pylint: disable=global-statement
# pylint: disable=global-statement disable=C0415
global Settings
global StorageContext
global load_index_from_storage
Expand Down Expand Up @@ -55,6 +55,7 @@ def __init__(self, index_config: Optional[ReferenceContent]) -> None:
def _get_embed_model(self) -> Any:
"""Get embed model according to configuration."""
if self._embed_model_path is not None:
# pylint: disable=C0415
from llama_index.embeddings.huggingface import HuggingFaceEmbedding

logger.debug(
Expand Down
1 change: 1 addition & 0 deletions ols/utils/pyroscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def start_with_pyroscope_enabled(
logger.info(
"Pyroscope server is reachable at %s", config.dev_config.pyroscope_url
)
# pylint: disable=C0415
import pyroscope

pyroscope.configure(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,4 @@ packages = ["ols"]

[tool.pylint."MESSAGES CONTROL"]
good-names = ["e"]
disable = ["W1203", "C0103", "C0301", "C0302", "C0415", "E0602", "E0611", "E1101", "R0902", "R0903", "R0913", "R0914", "W0102", "W0212", "W0511", "W0613", "W0621", "W0622", "W0707", "W0718", "W0719", "E0401", "R0801", "R0917"]
disable = ["W1203", "C0103", "C0301", "C0302", "E0602", "E0611", "E1101", "R0902", "R0903", "R0913", "R0914", "W0102", "W0212", "W0511", "W0613", "W0621", "W0622", "W0707", "W0718", "W0719", "E0401", "R0801", "R0917"]
Loading