-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[commands] Update requirements consistently #6304
[commands] Update requirements consistently #6304
Conversation
This doesn't update everywhere because in many places for example ParralelRaceGroup the class uses getRequirements() which returns a Set which cannot be passed into addRequirements directly. We could loop over them but I'm not sure if that's something we want to do |
Is it feasible to add an |
I would say probably as it's already a for loop iterating through items so it'd just be the same pretty much |
Would it be reasonable to change |
If we add an overload this seems like a reasonable change. It'd be a long term fix for the inconsistency as well so might still be fine in this pr? |
wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java
Outdated
Show resolved
Hide resolved
/format |
PMD in the Java format CI is actually complaining that |
There is no guarantee if |
78b685c
to
c9b9b7f
Compare
final Set<Integer> x = new HashSet<>();
x.add(0); // This is fine
x = Set.of(1); // This is illegal |
Ahhhh my misunderstanding its the equivalent of the |
Flaky test 😢 |
e331b4c
to
789c27d
Compare
Not required for python as it never had this problem |
789c27d
to
5a8efb7
Compare
5a8efb7
to
57b73a5
Compare
57b73a5
to
326ea20
Compare
Resolves #6291