Skip to content
This repository has been archived by the owner on Oct 11, 2021. It is now read-only.

Commit

Permalink
Add flake8 to project and lint step
Browse files Browse the repository at this point in the history
  • Loading branch information
villasv committed Apr 5, 2020
1 parent 3c376f2 commit 29df9f4
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 88
12 changes: 3 additions & 9 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v1
- name: Install Dev Dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
run: pip install -r dev-requirements.txt
- name: Lint Templates
run: make lint

Expand All @@ -32,9 +30,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v1
- name: Install Dev Dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
run: pip install -r dev-requirements.txt
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand All @@ -56,9 +52,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v1
- name: Install Dev Dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
run: pip install -r dev-requirements.txt
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ endif

lint:
black . --check
pylint test/*.py functions/*.py
flake8 .
pylint **/*.py
cfn-lint templates/*.template

nuke:
Expand Down
3 changes: 2 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
git+git://github.com/PyCQA/astroid.git#egg=astroid
awscli
black
cfn-flip
cfn-lint
cfn-tools
flake8
git+git://github.com/PyCQA/pylint.git#egg=pylint
pytest
taskcat
3 changes: 1 addition & 2 deletions examples/project/airflow/dags/my_dag.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from datetime import datetime

import airflow
from airflow.models import DAG
from airflow import DAG
from airflow.operators.bash_operator import BashOperator

default_args = {
Expand Down
2 changes: 1 addition & 1 deletion functions/load_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def get_metrics(timestamp):
"Namespace": "AWS/AutoScaling",
"MetricName": "GroupInServiceInstances",
"Dimensions": [
{"Name": "AutoScalingGroupName", "Value": f"{group}",}
{"Name": "AutoScalingGroupName", "Value": f"{group}"}
],
},
"Period": 300,
Expand Down

0 comments on commit 29df9f4

Please sign in to comment.