99from urllib .parse import quote
1010
1111import requests
12-
1312import codegra_fs
1413
1514DEFAULT_CGAPI_BASE_URL = os .getenv (
1817
1918T_CALL = t .TypeVar ('T_CALL' , bound = t .Callable )
2019
21- USER_AGENT = 'CodeGradeFS/{}' .format (
22- '.' .join (map (str , codegra_fs .__version__ ))
23- )
20+ USER_AGENT = 'CodeGradeFS/{}' .format (codegra_fs .__version__ )
2421
2522logger = logging .getLogger (__name__ )
2623
@@ -117,7 +114,9 @@ def get_file_rename(self, file_id, new_path):
117114 return (
118115 '{base}/code/{file_id}?operation='
119116 'rename&new_path={new_path}'
120- ).format (base = self .base , file_id = file_id , new_path = quote (new_path ))
117+ ).format (
118+ base = self .base , file_id = file_id , new_path = quote (new_path )
119+ )
121120
122121 def get_submission_feedbacks (self , submission_id ):
123122 return '{base}/submissions/{submission_id}/feedbacks/' .format (
@@ -130,18 +129,21 @@ def get_feedbacks(self, assignment_id):
130129 )
131130
132131 def get_feedback (self , file_id ):
133- return ('{base}/code/{file_id}?type=feedback'
134- ).format (base = self .base , file_id = file_id )
132+ return ('{base}/code/{file_id}?type=feedback' ).format (
133+ base = self .base , file_id = file_id
134+ )
135135
136136 def add_feedback (self , file_id , line ):
137- return ('{base}/code/{file_id}/comments/{line}'
138- ).format (base = self .base , file_id = file_id , line = line )
137+ return ('{base}/code/{file_id}/comments/{line}' ).format (
138+ base = self .base , file_id = file_id , line = line
139+ )
139140
140141 delete_feedback = add_feedback
141142
142143 def get_assignment (self , assignment_id ):
143- return ('{base}/assignments/{assignment_id}'
144- ).format (base = self .base , assignment_id = assignment_id )
144+ return ('{base}/assignments/{assignment_id}' ).format (
145+ base = self .base , assignment_id = assignment_id
146+ )
145147
146148
147149class APICodes (IntEnum ):
0 commit comments