Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2 from cisagov/improvements/pull_in_upstream_changes
Browse files Browse the repository at this point in the history
Pull in Upstream Changes
  • Loading branch information
mcdonnnj committed Mar 6, 2020
2 parents b8886c5 + c6093a2 commit 43f0c4d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 12 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,25 @@ jobs:
- uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Store installed Python version
run: |
echo "::set-env name=PY_VERSION::"\
"$(python -c "import platform;print(platform.python_version())")"
- name: Cache pip test requirements
uses: actions/cache@v1
with:
path: ${{ env.PIP_CACHE_DIR }}
key: "${{ runner.os }}-pip-test-\
key: "${{ runner.os }}-pip-test-py${{ env.PY_VERSION }}-\
${{ hashFiles('**/requirements-test.txt') }}"
restore-keys: |
${{ runner.os }}-pip-test-py${{ env.PY_VERSION }}-
${{ runner.os }}-pip-test-
${{ runner.os }}-pip-
- name: Cache pre-commit hooks
uses: actions/cache@v1
with:
path: ${{ env.PRE_COMMIT_CACHE_DIR }}
key: "${{ runner.os }}-pre-commit-\
key: "${{ runner.os }}-pre-commit-py${{ env.PY_VERSION }}-\
${{ hashFiles('**/.pre-commit-config.yaml') }}"
- name: Install dependencies
run: |
Expand All @@ -46,13 +51,18 @@ jobs:
- uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Store installed Python version
run: |
echo "::set-env name=PY_VERSION::"\
"$(python -c "import platform;print(platform.python_version())")"
- name: Cache pip test requirements
uses: actions/cache@v1
with:
path: ${{ env.PIP_CACHE_DIR }}
key: "${{ runner.os }}-pip-test-\
key: "${{ runner.os }}-pip-test-py${{ env.PY_VERSION }}-\
${{ hashFiles('**/requirements-test.txt') }}"
restore-keys: |
${{ runner.os }}-pip-test-py${{ env.PY_VERSION }}-
${{ runner.os }}-pip-test-
${{ runner.os }}-pip-
- name: Install dependencies
Expand All @@ -76,13 +86,18 @@ jobs:
- uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Store installed Python version
run: |
echo "::set-env name=PY_VERSION::"\
"$(python -c "import platform;print(platform.python_version())")"
- name: Cache pip build requirements
uses: actions/cache@v1
with:
path: ${{ env.PIP_CACHE_DIR }}
key: "${{ runner.os }}-pip-build-\
key: "${{ runner.os }}-pip-build-py${{ env.PY_VERSION }}-\
${{ hashFiles('**/requirements.txt') }}"
restore-keys: |
${{ runner.os }}-pip-build-py${{ env.PY_VERSION }}-
${{ runner.os }}-pip-build-
${{ runner.os }}-pip-
- name: Install dependencies
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*.egg-info
.mypy_cache
__pycache__
.python-version
.coverage
.pytest_cache
.python-version
*.egg-info
skeleton-aws-lambda.zip
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ repos:
additional_dependencies:
- flake8-docstrings
- repo: https://github.com/asottile/pyupgrade
rev: v1.26.2
rev: v2.0.0
hooks:
- id: pyupgrade
# Run bandit on "tests" tree with a configuration
Expand Down Expand Up @@ -84,7 +84,7 @@ repos:
rev: v4.2.0
hooks:
- id: ansible-lint
# files: molecule/default/playbook.yml
# files: molecule/default/playbook.yml
- repo: https://github.com/antonbabenko/pre-commit-terraform.git
rev: v1.12.0
hooks:
Expand All @@ -98,3 +98,7 @@ repos:
rev: 1.19.1
hooks:
- id: prettier
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.761
hooks:
- id: mypy
8 changes: 4 additions & 4 deletions lambda_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
# and
# https://stackoverflow.com/questions/37703609/using-python-logging-with-aws-lambda
# for more details.
root = logging.getLogger()
if root.handlers:
for handler in root.handlers:
root.removeHandler(handler)
logging_root = logging.getLogger()
if logging_root.handlers:
for logging_handler in logging_root.handlers:
logging_root.removeHandler(logging_handler)


def handler(event, context):
Expand Down

0 comments on commit 43f0c4d

Please sign in to comment.