Skip to content

Commit 9697f06

Browse files
committed
RCB-602: Sonar cleanup.
1 parent 54e5a13 commit 9697f06

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

rosette/api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def serialize(self, options):
113113
"""serialize keys with values"""
114114
self.validate()
115115
values = {}
116-
for (key, val) in self.__params.items():
116+
for key, val in self.__params.items():
117117
if val is None:
118118
continue
119119
else:
@@ -240,7 +240,7 @@ def __init__(self):
240240

241241
def validate(self):
242242
"""Internal. Do not use."""
243-
for option in ("name", "targetLanguage"): # required
243+
for option in "name", "targetLanguage": # required
244244
if self[option] is None:
245245
raise RosetteException(
246246
"missingParameter",
@@ -275,7 +275,7 @@ def __init__(self):
275275

276276
def validate(self):
277277
"""Internal. Do not use."""
278-
for option in ("address1", "address2"): # required
278+
for option in "address1", "address2": # required
279279
if self[option] is None:
280280
raise RosetteException(
281281
"missingParameter",
@@ -317,7 +317,7 @@ def __init__(self):
317317

318318
def validate(self):
319319
"""Internal. Do not use."""
320-
for option in ("name1", "name2"): # required
320+
for option in "name1", "name2": # required
321321
if self[option] is None:
322322
raise RosetteException(
323323
"missingParameter",

sonar-project.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
sonar.projectKey=rosette-api-python-binding
22
sonar.sources=rosette
3+
sonar.exclusions=**/tests/**,**/docs/**,**/examples/**
34
sonar.python.coverage.reportPaths=coverage.xml
45
#sonar.branch.name=RCB-596-pool-size

tests/test_rosette_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def test_for_content_and_contentUri(api, json_response, doc_params):
589589
httpretty.register_uri(httpretty.POST, "https://api.rosette.com/rest/v1/entities",
590590
body=json_response, status=200, content_type="application/json")
591591

592-
doc_params['contentUri'] = 'http://google.com'
592+
doc_params['contentUri'] = 'https://example.com'
593593
with pytest.raises(RosetteException) as e_rosette:
594594
api.entities(doc_params)
595595

0 commit comments

Comments
 (0)