Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 29, 2025

Also, use class variables instead of instance fields. This doesn't
change the semantics (at least not the way we use this class) and it
saves a little bit of visual noise.

@sbc100 sbc100 requested a review from kripken October 29, 2025 21:59
@sbc100 sbc100 force-pushed the sort_options branch 3 times, most recently from ad8bc18 to 278457d Compare October 29, 2025 22:50
Also, use class variables instead of instance fields. This doesn't
change the semantics (at least not the way we use this class) and it
saves a little bit of visual noise.

The other nice thing this would allow if we ever wanted to to it is to
compare the current option with its default (by comparing `self.foo`
with `__class__.foo`, the default value).
use_closure_compiler = None
use_preload_cache = False
use_preload_plugins = False
valid_abspaths: List[str] = []
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this also added types? They seem right.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeas, for some reason mypy requires them to be typed when they are of this form. Not sure why types were not needed before.

@sbc100 sbc100 enabled auto-merge (squash) October 29, 2025 23:17
@sbc100 sbc100 merged commit d02668a into emscripten-core:main Oct 29, 2025
34 checks passed
@sbc100 sbc100 deleted the sort_options branch October 29, 2025 23:47
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