Skip to content

Commit c331ba4

Browse files
committed
tsp_client: Extract duplicated 'application/json'
Replace the previously duplicated string values with a reused constant. Signed-off-by: Marco Miller <[email protected]>
1 parent d323dd6 commit c331ba4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tsp/tsp_client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@
3535
from tsp.experiment import Experiment
3636
from tsp.output_descriptor import OutputDescriptor
3737

38-
headers = {'content-type': 'application/json', 'Accept': 'application/json'}
38+
APPLICATION_JSON = 'application/json'
39+
40+
headers = {'content-type': APPLICATION_JSON, 'Accept': APPLICATION_JSON}
3941
headers_form = {'content-type': 'application/x-www-form-urlencoded',
40-
'Accept': 'application/json'}
42+
'Accept': APPLICATION_JSON}
4143

4244

4345
# pylint: disable=consider-using-f-string

0 commit comments

Comments
 (0)