Skip to content

Commit

Permalink
Update ruff to 0.1.0, unused remove type ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
amrit110 committed Oct 20, 2023
1 parent 60a617f commit a51c890
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.288'
rev: 'v0.1.0'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
4 changes: 2 additions & 2 deletions cyclops/evaluate/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ def _prepare_models(
) -> Dict[str, WrappedModel]:
"""Prepare models for evaluation."""
if isinstance(model, get_args(WrappedModel)):
model_name: str = model.model_.__class__.__name__ # type: ignore
return {model_name: model} # type: ignore[dict-item]
model_name: str = model.model_.__class__.__name__
return {model_name: model}

Check warning on line 297 in cyclops/evaluate/evaluator.py

View check run for this annotation

Codecov / codecov/patch

cyclops/evaluate/evaluator.py#L296-L297

Added lines #L296 - L297 were not covered by tests
if isinstance(model, (list, tuple)):
assert all(isinstance(m, get_args(WrappedModel)) for m in model)
return {m.getattr("model_").__class__.__name__: m for m in model}
Expand Down
38 changes: 19 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pytest-cov = "^3.0.0"
codecov = "^2.1.13"
nbstripout = "^0.6.1"
mypy = "^1.0.0"
ruff = "^0.0.288"
ruff = "^0.1.0"
nbqa = { version = "^1.7.0", extras = ["toolchain"] }

[tool.poetry.group.docs.dependencies]
Expand Down

0 comments on commit a51c890

Please sign in to comment.