Skip to content

Commit 68d9e52

Browse files
committed
fix: flake8 exclude and specific files
1 parent 9d07c7b commit 68d9e52

File tree

6 files changed

+5
-7
lines changed

6 files changed

+5
-7
lines changed

Diff for: .flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
exclude = docs, .eggs, setup.py, example, .aws-sam
2+
exclude = docs, .eggs, setup.py, example, .aws-sam, .git, dist, *.md, *.yaml, example/samconfig.toml, *.txt, *.ini
33
ignore = E203, E266, W503, BLK100, W291, I004
44
max-line-length = 120
55
max-complexity = 15

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ format:
1515
poetry run black aws_lambda_powertools tests
1616

1717
lint: format
18-
poetry run flake8
18+
poetry run flake8 aws_lambda_powertools/* tests/* example/*
1919

2020
test:
2121
poetry run pytest -vvv --cov=./ --cov-report=xml

Diff for: example/hello_world/app.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
set_package_logger() # Enable package diagnostics (DEBUG log)
1515

16-
# tracer = Tracer() # patches all available modules
16+
# tracer = Tracer() # patches all available modules # noqa: E800
1717
tracer = Tracer(patch_modules=("aioboto3", "boto3", "requests")) # ~90-100ms faster in perf depending on set of libs
1818
logger = Logger()
1919
metrics = Metrics()
@@ -86,7 +86,7 @@ def lambda_handler(event, context):
8686
event: dict, required
8787
API Gateway Lambda Proxy Input Format
8888
89-
Event doc: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-input-format
89+
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
9090
9191
context: object, required
9292
Lambda Context runtime methods and attributes

Diff for: example/tests/test_handler.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import json
2-
import os
32
import sys
43
from dataclasses import dataclass
54

Diff for: poetry.lock

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ aiohttp = "^3.6.2"
4444
bandit = "^1.6.2"
4545
radon = "^4.1.0"
4646
xenon = "^0.7.0"
47-
flake8-bugbear = "^20.1.4"
4847
flake8-eradicate = "^0.3.0"
4948
dataclasses = {version = "*", python = "~3.6"}
49+
flake8-bugbear = "^20.1.4"
5050

5151
[tool.coverage.run]
5252
source = ["aws_lambda_powertools"]

0 commit comments

Comments
 (0)