-
Notifications
You must be signed in to change notification settings - Fork 8
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 #2548 from ASFHyP3/mypy
upgrade to python 3.13, add mypy
- Loading branch information
Showing
43 changed files
with
98 additions
and
81 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
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,12 +1,18 @@ | ||
name: Static code analysis | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: push | ||
|
||
jobs: | ||
call-ruff-workflow: | ||
# Docs: https://github.com/ASFHyP3/actions | ||
uses: ASFHyP3/actions/.github/workflows/[email protected] | ||
|
||
call-mypy-workflow: | ||
uses: ASFHyP3/actions/.github/workflows/[email protected] | ||
|
||
cfn-lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -17,7 +23,7 @@ jobs: | |
- uses: actions/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
python-version: 3.13 | ||
- run: | | ||
python -m pip install --upgrade pip | ||
make install | ||
|
@@ -31,7 +37,7 @@ jobs: | |
- uses: actions/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
python-version: 3.13 | ||
- run: | | ||
python -m pip install --upgrade pip | ||
make install | ||
|
@@ -48,7 +54,7 @@ jobs: | |
- run: gem install statelint | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
python-version: 3.13 | ||
- run: | | ||
python -m pip install --upgrade pip | ||
make install | ||
|
@@ -65,7 +71,7 @@ jobs: | |
- uses: snyk/actions/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
python-version: 3.13 | ||
- run: | | ||
python -m pip install --upgrade pip | ||
make install | ||
|
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
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,14 +1,11 @@ | ||
from typing import Union | ||
|
||
|
||
def get_time_from_result(result: Union[list, dict]) -> Union[list, float]: | ||
def get_time_from_result(result: list | dict) -> list | float: | ||
if isinstance(result, list): | ||
return [get_time_from_result(item) for item in result] | ||
|
||
return (result['StoppedAt'] - result['StartedAt']) / 1000 | ||
|
||
|
||
def lambda_handler(event, _) -> list[Union[list, float]]: | ||
def lambda_handler(event, _) -> list | float: | ||
processing_results = event['processing_results'] | ||
result_list = [processing_results[key] for key in sorted(processing_results.keys())] | ||
return get_time_from_result(result_list) |
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
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
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
Oops, something went wrong.