-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #593 from launchableinc/drop-python-3.5
Drop python 3.5
- Loading branch information
Showing
10 changed files
with
15 additions
and
49 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
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 +1 @@ | ||
3.5.10 | ||
3.6.15 |
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
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,26 +1,11 @@ | ||
from typing import List, Sequence, Tuple | ||
from typing import List, Tuple | ||
|
||
|
||
def normalize_key_value_types(kv_types_raw: List[str]) -> List[Tuple[str, str]]: | ||
"""Normalize key/value list, because the type of the key/value list specified in the command line flags differs depending | ||
on the version of the click. | ||
TODO: handle extraction of key/value tuple to dict in better way for >=click8.0 that returns tuple of tuples as tuple | ||
of str | ||
E.G. | ||
<click8.0: | ||
`launchable record session --build aaa --flavor os=ubuntu --flavor python=3.5` | ||
is parsed as build=aaa, flavor=(("os", "ubuntu"), ("python", "3.5")) | ||
>=click8.0: | ||
`launchable record session --build aaa --flavor os=ubuntu --flavor python=3.8` | ||
is parsed as build=aaa, flavor=("('os', 'ubuntu')", "('python', '3.8')") | ||
""" | ||
kvs = [] | ||
for kv in kv_types_raw: | ||
if isinstance(kv, str): | ||
k, v = kv.replace("(", "").replace(")", "").replace("'", "").split(",") | ||
kvs.append((k.strip(), v.strip())) | ||
elif isinstance(kv, Sequence): | ||
kvs.append((kv[0], kv[1])) | ||
|
||
return kvs |
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