Dylan Baker
ba3460eb11
options: Add an EnumeratedUserOption class
...
This will allow us to take choices out of the UserOption class, which
doesn't actually use this attribute.
3 months ago
Dylan Baker
0e11b90d6f
options: use dataclasses for UserOption
...
This reduces code, makes this clearer, and will be a nice step toward
the goal of getting everything typesafe.
For `UserIntegerOption` this makes a fairly nice, but substantial change
in that the old method used a tuple of `(min, value, max)` to pass to the
initializer, while all other types just passed `value`. The new
`UserIntegerOption` does the same, with keyword arguments for the min
and max values.
3 months ago
Dylan Baker
cd5bc11bb3
options: Get rid of the invalid _U type, and use UserOption[_T]
3 months ago
Dylan Baker
b32e4e87b1
options: Add a printable_choices method to UserOption
...
This provides a method to get choices for options in a printable form.
The goal is to make refactoring options simpler.
3 months ago
Dylan Baker
4aa0e93922
options: fix the annotations of _to_tuple
3 months ago
spaette
4179996fef
Fix typos
8 months ago
Dylan Baker
53e11488d9
options: use a TypedDict for kwargs to ArgumentParser.add_argument
...
This cleans up some more typing issues.
8 months ago
Dylan Baker
69f1679dbd
options.py: Fix Intel Copyright
...
Which covers changes from coredata.py that were moved into this file
8 months ago
Dylan Baker
7cf2dd6e3f
options: fix typing issues with the OptionStore type
8 months ago
Dylan Baker
cd0981bb3c
options: fix imports
...
- group imports properly
- dont import from typing and import typing
8 months ago
Charles Brunet
2d6915a598
add default_both_libraries core option
8 months ago
Dylan Baker
0534753662
Add missing `__future__.annotations` imports
8 months ago
Eli Schwartz
19847ba24a
update various deprecation notices to call out meson 2.0
8 months ago
Jussi Pakkanen
6e20022295
Remove module type from OptionKey.
10 months ago
Jussi Pakkanen
61c742fae9
Remove language (AKA compiler) type from OptionKey.
10 months ago
Jussi Pakkanen
de8e3d65e0
Remove option type from OptionKey and get it from OptionStore instead.
10 months ago
Jussi Pakkanen
0d7bb776e2
Move OptionKey in the option source file.
10 months ago
Jussi Pakkanen
c2552527fb
Move compiler option check into OptionStore.
10 months ago
Jussi Pakkanen
5c6e9d2d8f
Move builtin option check into OptionStore.
10 months ago
Jussi Pakkanen
472d8852e9
Move backend option check into OptionStore.
10 months ago
Jussi Pakkanen
0c36ace4b7
Move base option check into OptionStore.
10 months ago
Jussi Pakkanen
8e3f609e73
Move project option detection into OptionStore.
10 months ago
Jussi Pakkanen
181c3499fd
Fix mypy.
11 months ago
Jussi Pakkanen
9a6fcd4d9a
Replace direct indexing with named methods.
11 months ago
Jussi Pakkanen
2b1510d706
Convert option from a plain dictionary into a named class.
11 months ago
Jussi Pakkanen
5365d9a842
Refactor option classes to their own file.
11 months ago