Skip to content

Commit bd4d035

Browse files
committed
Merge branch 'release/2.29.0'
2 parents 2a7ec98 + 8b90384 commit bd4d035

40 files changed

+751
-164
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/docs/changelog.rst merge=union

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ dist
1010
htmlcov
1111
.cache
1212
flycheck_*
13+
14+
/.eggs

.pylintrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[MESSAGES CONTROL]
2+
disable=R,attribute-defined-outside-init,bad-continuation,bad-option-value,bare-except,invalid-name,locally-disabled,missing-docstring,redefined-builtin,ungrouped-imports,wrong-import-order,wrong-import-position
3+
4+
[REPORTS]
5+
reports=no
6+
7+
[TYPECHECK]
8+
ignored-classes=LookupDict,Archiveable,Commentable,MetadataHolder,WarningContainer
9+
10+
11+
[FORMAT]
12+
max-line-length=150

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
language: python
22
python:
33
- 2.7
4-
- 3.3
5-
- 3.4
64
- 3.5
75
- 3.6
86
install:
97
- pip install -U pip setuptools
10-
- pip install -r test_requirements.txt
11-
- pip install -e .
8+
- pip install -e .[testing]
129
script:
10+
- pylint -j $(nproc) --rcfile=.pylintrc backslash tests
1311
- py.test tests
1412
deploy:
1513
provider: pypi

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ default: test
33
test: env
44
.env/bin/py.test -x tests --cov=backslash --cov-report=html
55

6+
doc: env
7+
.env/bin/python setup.py build_sphinx -a -E
8+
69
env: .env/.up-to-date
710

811

912
.env/.up-to-date: setup.py Makefile test_requirements.txt
1013
virtualenv --no-site-packages .env
1114
.env/bin/pip install -e .
1215
.env/bin/pip install -r ./*.egg-info/requires.txt || true
16+
.env/bin/pip install -r ./docs/requirements.txt
1317
.env/bin/pip install -r test_requirements.txt
1418
touch $@
1519

backslash/__version__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
__version__ = '2.28.6'
1+
import pkg_resources
2+
3+
__version__ = pkg_resources.get_distribution('backslash').version

backslash/api.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import json
44
import random
55
import time
6-
from sys import getsizeof
76

87
import requests
98
from requests.exceptions import ConnectionError, ReadTimeout
@@ -119,16 +118,16 @@ def delete(self, path, params=None):
119118
return resp
120119

121120
def _normalize_return_value(self, response):
122-
json = response.json()
123-
if json is None:
121+
json_res = response.json()
122+
if json_res is None:
124123
return None
125-
result = json.get('result')
124+
result = json_res.get('result')
126125
if result is None:
127-
if isinstance(json, dict):
128-
for key, value in json.items():
126+
if isinstance(json_res, dict):
127+
for key, value in json_res.items():
129128
if isinstance(value, dict) and value.get('type') == key:
130129
return self.build_api_object(value)
131-
return json
130+
return json_res
132131
elif isinstance(result, dict) and 'type' in result:
133132
return self.build_api_object(result)
134133
return result

backslash/api_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ def ui_url(self):
1717
def __eq__(self, other):
1818
if not isinstance(other, APIObject):
1919
return NotImplemented
20-
return self.client is other.client and self._data == other._data
20+
return self.client is other.client and self._data == other._data # pylint: disable=protected-access
2121

2222
def __ne__(self, other):
23-
return not (self == other)
23+
return not (self == other) # pylint: disable=superfluous-parens
2424

2525
def __getattr__(self, name):
2626
try:

backslash/client.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from urlobject import URLObject as URL
77

88
from .api import API
9-
from .compatibility import Compatibility
109
from .lazy_query import LazyQuery
1110

1211

@@ -37,6 +36,8 @@ def delete_comment(self, comment_id):
3736

3837
def report_session_start(self, logical_id=NOTHING,
3938
parent_logical_id=NOTHING,
39+
is_parent_session=False,
40+
child_id=NOTHING,
4041
hostname=NOTHING,
4142
total_num_tests=NOTHING,
4243
user_email=NOTHING,
@@ -59,11 +60,15 @@ def report_session_start(self, logical_id=NOTHING,
5960
'subjects': subjects,
6061
'infrastructure': infrastructure,
6162
}
62-
if parent_logical_id is not None:
63-
supports_parent_logical_id = (self.api.info().endpoints.report_session_start.version >= 2)
63+
if parent_logical_id is not None or is_parent_session:
64+
supports_parallel = (self.api.info().endpoints.report_session_start.version >= 2)
6465

65-
if supports_parent_logical_id:
66+
if supports_parallel:
6667
params['parent_logical_id'] = parent_logical_id
68+
params['is_parent_session'] = is_parent_session
69+
params['child_id'] = child_id
70+
if child_id is not None:
71+
del params['total_num_tests']
6772

6873
returned = self.api.call_function('report_session_start', params)
6974
return returned

backslash/comment.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from .api_object import APIObject
22

3-
class Comment(APIObject):
3+
4+
class Comment(APIObject): # pylint: disable=abstract-method
45
pass

0 commit comments

Comments
 (0)