Skip to content

Commit

Permalink
Type notations deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
CGall42 committed May 31, 2023
1 parent d4e9cd4 commit c90ba59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchexec/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_cpu_cores_per_run(
my_cgroups,
coreSet=None,
coreRequirement=None,
) -> list[list[int]]:
):
"""
Sets variables and reads data from the machine to prepare for the distribution algorithm
Preparation and the distribution algorithm itself are separated to facilitate
Expand Down

3 comments on commit c90ba59

@PhilippWendler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CGall42 I would suggest to keep type annotations, they are quite nice to have.

@CGall42
Copy link
Author

@CGall42 CGall42 commented on c90ba59 May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PhilippWendler These can be added later, but the annotation I deleted caused the unittests to fail so it was either wrong or the unittests 3.7 and 3.8. cannot handle the annotation.

@PhilippWendler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the "generics" like list[int] do not work in type annotations before Python 3.9. But you can use typing.List[int] and import typing (or do from typing import List and use List[int]).

Please sign in to comment.