Skip to content

CI - Fix pyrefly error in ignite/metrics/cohen_kappa.py #3494

@vfdev-5

Description

@vfdev-5

Fix pyrefly error:

 INFO Checking project configured at `/home/runner/work/ignite/ignite/pyrefly.toml`
ERROR Argument `str | None` is not assignable to parameter `weights` with type `Literal['linear', 'quadratic'] | None` in function `sklearn.metrics._classification.cohen_kappa_score` [bad-argument-type]
  --> ignite/metrics/cohen_kappa.py:87:58
   |
87 |         return cohen_kappa_score(y_true, y_pred, weights=self.weights)
   |                                                          ^^^^^^^^^^^^
   |
Error: Argument `str | None` is not assignable to parameter `weights` with type `Literal['linear', 'quadratic'] | None` in function `sklearn.metrics._classification.cohen_kappa_score`

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions