Open Borda opened 1 year ago
this was correctly recognized by ruff nut missing here so in combination with yesqa we had disproportion
ruff
yesqa
This is an example where the mentioned rule(s) would currently be suboptimal: https://github.com/Lightning-AI/lightning/blob/8dac2512733bae034f437334a71e4c114d458a7c/src/lightning/pytorch/trainer/connectors/callback_connector.py#L229
if _PYTHON_GREATER_EQUAL_3_8_0: from importlib.metadata import entry_points if _PYTHON_GREATER_EQUAL_3_10_0: # <-- HERE factories = entry_points(group=group) else: factories = entry_points().get(group, {}) # type: ignore[arg-type] else: from pkg_resources import iter_entry_points
Desired change
Explanation
this was correctly recognized by
ruff
nut missing here so in combination withyesqa
we had disproportionExample
This is an example where the mentioned rule(s) would currently be suboptimal: https://github.com/Lightning-AI/lightning/blob/8dac2512733bae034f437334a71e4c114d458a7c/src/lightning/pytorch/trainer/connectors/callback_connector.py#L229