Closed Lovkush-A closed 1 month ago
We aren't (yet) setup to take PRs on this repo (we actually do ongoing development on an internal repo and then sync to here every few days). So for now I would post these as issues and then we will resolve them internally and sync to here in due course.
@daaain Agreed re: Ruff, we actually are using it now (https://github.com/UKGovernmentBEIS/inspect_ai/blob/main/pyproject.toml#L14-L23) but it's not picking up those cases. Will add the rules you mentioned and cleanup any other cases of this.
Would you be happy to receive PR's that contain minor improvements to the code, but which do not change functionality.
The two examples I have seen so far:
Example 1
could be
(Or, you could create alias
Scalar = str | int | float | bool
and use that throughout the file)Example 2.
Function
example_dataset
can useLiteral
typehint, because you can list precisely what values you are expecting