Fix too long lines
Adapt line length where possible and add exception for flake8 for long
SQL query lines to keep them readable.
Issue: HIC-170
Change-Id: I9321b514c92814ca9c403e7654cb5ef48dcd8ea4
diff --git a/crashreport_stats/raw_querys.py b/crashreport_stats/raw_querys.py
index 13e3cb5..aa040d6 100644
--- a/crashreport_stats/raw_querys.py
+++ b/crashreport_stats/raw_querys.py
@@ -53,7 +53,7 @@
where
crashreports_device.uuid=%s
group by build_fingerprint;
- """
+ """ # noqa: E501
uuid = params.get("uuid", "18f530d7-e9c3-4dcf-adba-3dddcd7d3155")
param_array = [uuid]
cursor.execute(query, param_array)
@@ -88,7 +88,7 @@
where
crashreports_device.uuid=%s
group by build_fingerprint;
- """
+ """ # noqa: E501
uuid = params.get("uuid", "18f530d7-e9c3-4dcf-adba-3dddcd7d3155")
param_array = [uuid]
cursor.execute(query, param_array)
@@ -127,7 +127,7 @@
where
crashreports_device.uuid = %s
group by date;
- """
+ """ # noqa: E501
uuid = params.get("uuid", "18f530d7-e9c3-4dcf-adba-3dddcd7d3155")
param_array = [uuid]
cursor.execute(query, param_array)
@@ -147,7 +147,7 @@
left join crashreports_crashreport on crashreports_device.id = crashreports_crashreport.device_id and crashreports_heartbeat.date::date = crashreports_crashreport.date::date
where
crashreports_device.uuid = %s group by crashreports_heartbeat.date, crashreports_device.id;
- """
+ """ # noqa: E501
uuid = params.get("uuid", "18f530d7-e9c3-4dcf-adba-3dddcd7d3155")
param_array = [uuid]
cursor.execute(query, param_array)
diff --git a/hiccup/settings.py b/hiccup/settings.py
index 4d46b4a..434c0fc 100644
--- a/hiccup/settings.py
+++ b/hiccup/settings.py
@@ -152,7 +152,9 @@
"DEFAULT_FILTER_BACKENDS": (
"django_filters.rest_framework.DjangoFilterBackend",
),
- "DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.LimitOffsetPagination",
+ "DEFAULT_PAGINATION_CLASS": (
+ "rest_framework.pagination.LimitOffsetPagination"
+ ),
"PAGE_SIZE": 100,
}