-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow missing SCONS_FLAGS keys when registering builds
- Loading branch information
1 parent
af421fe
commit 86e5e17
Showing
5 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
{ | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"postinstall": "husky" | ||
"postinstall": "husky", | ||
"prepack": "pinst --disable", | ||
"postpack": "pinst --enable" | ||
}, | ||
"devDependencies": { | ||
"cspell": "^8.0.0", | ||
"husky": "^9.0.0", | ||
"pinst": "^3.0.0", | ||
"prettier": "^3.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
from functools import reduce | ||
from typing import TypeVar | ||
|
||
T = TypeVar("T") | ||
U = TypeVar("U") | ||
|
||
def unique(lst: list[str]) -> list[str]: | ||
empty = [] # type: list[str] | ||
|
||
def unique(lst: list[T]) -> list[T]: | ||
empty = [] # type: list[T] | ||
return list(reduce(lambda acc, x: acc if x in acc else [*acc, x], lst, empty)) | ||
|
||
|
||
def flatten(ignore: list[str | list[str]]) -> list[str]: | ||
def flatten(ignore: list[T | list[T]]) -> list[T]: | ||
return list(sum(map(lambda x: x if isinstance(x, list) else [x], ignore), [])) | ||
|
||
|
||
def merge_maps( | ||
x: dict[T, list[U]], y: dict[T, list[U]], keys: list[T] | ||
) -> dict[T, list[U]]: | ||
return {k: unique(x.get(k, []) + y.get(k, [])) for k in keys} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters