Skip to content

Commit

Permalink
fix: flake8 exclude and specific files
Browse files Browse the repository at this point in the history
  • Loading branch information
heitorlessa committed Jun 8, 2020
1 parent 9d07c7b commit 68d9e52
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
exclude = docs, .eggs, setup.py, example, .aws-sam
exclude = docs, .eggs, setup.py, example, .aws-sam, .git, dist, *.md, *.yaml, example/samconfig.toml, *.txt, *.ini
ignore = E203, E266, W503, BLK100, W291, I004
max-line-length = 120
max-complexity = 15
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ format:
poetry run black aws_lambda_powertools tests

lint: format
poetry run flake8
poetry run flake8 aws_lambda_powertools/* tests/* example/*

test:
poetry run pytest -vvv --cov=./ --cov-report=xml
Expand Down
4 changes: 2 additions & 2 deletions example/hello_world/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

set_package_logger() # Enable package diagnostics (DEBUG log)

# tracer = Tracer() # patches all available modules
# tracer = Tracer() # patches all available modules # noqa: E800
tracer = Tracer(patch_modules=("aioboto3", "boto3", "requests")) # ~90-100ms faster in perf depending on set of libs
logger = Logger()
metrics = Metrics()
Expand Down Expand Up @@ -86,7 +86,7 @@ def lambda_handler(event, context):
event: dict, required
API Gateway Lambda Proxy Input Format
Event doc: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-input-format
Event doc: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-input-format # noqa: E501
context: object, required
Lambda Context runtime methods and attributes
Expand Down
1 change: 0 additions & 1 deletion example/tests/test_handler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import os
import sys
from dataclasses import dataclass

Expand Down
1 change: 0 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ aiohttp = "^3.6.2"
bandit = "^1.6.2"
radon = "^4.1.0"
xenon = "^0.7.0"
flake8-bugbear = "^20.1.4"
flake8-eradicate = "^0.3.0"
dataclasses = {version = "*", python = "~3.6"}
flake8-bugbear = "^20.1.4"

[tool.coverage.run]
source = ["aws_lambda_powertools"]
Expand Down

0 comments on commit 68d9e52

Please sign in to comment.