Skip to content

Commit de8f4e3

Browse files
joachimmetzberggren
authored andcommitted
Updated CI test to use pylint 2.2.2 (#852)
1 parent a4ddc99 commit de8f4e3

File tree

7 files changed

+29
-5
lines changed

7 files changed

+29
-5
lines changed

.pylintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ load-plugins=
7676
# W1201: Specify string format arguments as logging function parameters
7777
# W0201: Variables defined initially outside the scope of __init__ (reconsider this, added by Kristinn).
7878
#disable=C0103,C0111,C0302,F0401,I0010,I0011,R0201,R0801,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0921,R0922,R0924,W0122,W0141,W0142,W0402,W0404,W0511,W0603,W0703,W1201,W0201
79-
disable=C0103,C0302,F0401,I0010,I0011,R0201,R0801,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0921,R0922,R0924,W0122,W0141,W0142,W0402,W0404,W0511,W0603,W0703,W1201,W0201,R0401,no-member,useless-super-delegation
79+
disable=C0103,C0302,F0401,I0010,I0011,R0201,R0801,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0921,R0922,R0924,W0122,W0141,W0142,W0402,W0404,W0511,W0603,W0703,W1201,W0201,R0401,no-member,useless-super-delegation,useless-object-inheritance
8080

8181

8282
[REPORTS]

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ cache:
3030
- yarn
3131
- pip
3232
install:
33+
- ./config/travis/install.sh
3334
- pip install -r requirements.txt
34-
- if test ${TARGET} = "pylint"; then pip install astroid==1.5.3 pylint==1.7.2; fi
3535
- yarn install
3636
script:
3737
- ./config/travis/run_with_timeout.sh 30 ./config/travis/runtests.sh

api_client/python/timesketch_api_client/client.py

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import json
1818
import uuid
1919

20+
# pylint: disable=wrong-import-order
2021
import bs4
2122
import requests
2223

config/travis/install.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
#
3+
# Script to set up Travis-CI test VM.
4+
#
5+
# This file is generated by l2tdevtools update-dependencies.py any dependency
6+
# related changes should be made in dependencies.ini.
7+
8+
# Exit on error.
9+
set -e;
10+
if test ${TRAVIS_OS_NAME} = "linux" && test ${TARGET} != "jenkins";
11+
then
12+
if test ${TARGET} = "pylint";
13+
then
14+
sudo add-apt-repository ppa:gift/pylint3 -y;
15+
fi
16+
17+
sudo apt-get update -q;
18+
19+
if test ${TARGET} = "pylint";
20+
then
21+
sudo apt-get install -y pylint;
22+
fi
23+
fi

config/travis/runtests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if test "${TARGET}" = "pylint";
1212
then
1313
pylint --version
1414

15-
for FILE in `find run_tests.py setup.py config timesketch tests -name \*.py`;
15+
for FILE in `find run_tests.py setup.py api_client config timesketch -name \*.py`;
1616
do
1717
echo "Checking: ${FILE}";
1818

timesketch/lib/aggregators/interface.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
from __future__ import unicode_literals
1717

18-
from flask import current_app
1918
from elasticsearch import Elasticsearch
19+
from flask import current_app
2020

2121
import pandas
2222

timesketch/lib/analyzers/browser_timeframe.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def get_active_hours(frame):
127127
hours = sorted(hours)
128128

129129
hour_len = len(hours)
130-
if hour_len >= 3 and hour_len <= 12:
130+
if 3 <= hour_len <= 12:
131131
thresholds[threshold] = hour_len
132132

133133
threshold_counter = collections.Counter(thresholds)

0 commit comments

Comments
 (0)