Skip to content
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

Simplify return types of static constructors for AutomationCondition #25184

Merged

Conversation

OwenKephart
Copy link
Contributor

Summary & Motivation

As title. These return types were overly-specific. We have some subclasses that support additional methods, but most do not. To keep things more comprehensible for users that are seeing these types, use the least specific type possible in these cases.

How I Tested These Changes

Changelog

NOCHANGELOG

Copy link
Contributor Author

OwenKephart commented Oct 10, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @OwenKephart and the rest of your teammates on Graphite Graphite

@OwenKephart OwenKephart force-pushed the 10-09-add_all_deps_blocking_checks_passed_condition branch from f8d9617 to 4deb33e Compare October 10, 2024 17:30
@OwenKephart OwenKephart force-pushed the 10-10-simply_return_types_of_static_constructors branch from db415a9 to 5459582 Compare October 10, 2024 17:30
@OwenKephart OwenKephart force-pushed the 10-09-add_all_deps_blocking_checks_passed_condition branch from 4deb33e to 7010afc Compare October 10, 2024 19:39
@OwenKephart OwenKephart force-pushed the 10-10-simply_return_types_of_static_constructors branch from 5459582 to 4228091 Compare October 10, 2024 19:40
@OwenKephart OwenKephart force-pushed the 10-09-add_all_deps_blocking_checks_passed_condition branch from 7010afc to 3cb2753 Compare October 11, 2024 00:29
@OwenKephart OwenKephart force-pushed the 10-10-simply_return_types_of_static_constructors branch from 4228091 to dd75b1f Compare October 11, 2024 00:30
Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

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

This gives us more option value so I think this is fine.

Note that I don't think the primary benefit here is simplicity but flexibility in implemenation. We could theorectically change the class of returned things without changing the type signature. There is a definite downside as it hides information from the user.

@OwenKephart OwenKephart force-pushed the 10-09-add_all_deps_blocking_checks_passed_condition branch from 3cb2753 to 6956152 Compare October 11, 2024 17:17
@OwenKephart OwenKephart force-pushed the 10-10-simply_return_types_of_static_constructors branch from dd75b1f to 664fef4 Compare October 11, 2024 17:17
@OwenKephart OwenKephart force-pushed the 10-09-add_all_deps_blocking_checks_passed_condition branch from 6956152 to 5edfb96 Compare October 11, 2024 19:45
@OwenKephart OwenKephart force-pushed the 10-10-simply_return_types_of_static_constructors branch from 664fef4 to b95e5a6 Compare October 11, 2024 19:45
@OwenKephart OwenKephart force-pushed the 10-09-add_all_deps_blocking_checks_passed_condition branch from 5edfb96 to 83506d8 Compare October 11, 2024 22:25
@OwenKephart OwenKephart force-pushed the 10-10-simply_return_types_of_static_constructors branch from b95e5a6 to c805a1c Compare October 11, 2024 22:25
@OwenKephart OwenKephart force-pushed the 10-09-add_all_deps_blocking_checks_passed_condition branch from 83506d8 to 177125c Compare October 14, 2024 16:51
@OwenKephart OwenKephart force-pushed the 10-10-simply_return_types_of_static_constructors branch from c805a1c to be334be Compare October 14, 2024 16:51
@OwenKephart OwenKephart force-pushed the 10-09-add_all_deps_blocking_checks_passed_condition branch from 177125c to cad8dd2 Compare October 14, 2024 17:03
@OwenKephart OwenKephart force-pushed the 10-10-simply_return_types_of_static_constructors branch from be334be to 9d1759a Compare October 14, 2024 17:03
@OwenKephart OwenKephart force-pushed the 10-09-add_all_deps_blocking_checks_passed_condition branch from cad8dd2 to f8c1d2c Compare October 15, 2024 17:32
@OwenKephart OwenKephart force-pushed the 10-10-simply_return_types_of_static_constructors branch from 9d1759a to 5e750b4 Compare October 15, 2024 17:32
@OwenKephart OwenKephart force-pushed the 10-09-add_all_deps_blocking_checks_passed_condition branch from f8c1d2c to bd71cf4 Compare October 15, 2024 17:54
@OwenKephart OwenKephart force-pushed the 10-10-simply_return_types_of_static_constructors branch from 5e750b4 to 43c11a2 Compare October 15, 2024 17:54
@OwenKephart OwenKephart force-pushed the 10-09-add_all_deps_blocking_checks_passed_condition branch from bd71cf4 to 19e3e9e Compare October 15, 2024 18:49
Base automatically changed from 10-09-add_all_deps_blocking_checks_passed_condition to master October 15, 2024 18:50
@OwenKephart OwenKephart force-pushed the 10-10-simply_return_types_of_static_constructors branch from 43c11a2 to 4bf0c8a Compare October 15, 2024 18:51
Copy link
Contributor Author

OwenKephart commented Oct 15, 2024

Merge activity

  • Oct 15, 3:52 PM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Oct 15, 3:53 PM EDT: Graphite rebased this pull request as part of a merge.
  • Oct 15, 3:54 PM EDT: A user merged this pull request with Graphite.

@OwenKephart OwenKephart force-pushed the 10-10-simply_return_types_of_static_constructors branch from 4bf0c8a to 47d95a6 Compare October 15, 2024 19:52
@OwenKephart OwenKephart merged commit 8a30044 into master Oct 15, 2024
1 check was pending
@OwenKephart OwenKephart deleted the 10-10-simply_return_types_of_static_constructors branch October 15, 2024 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants