This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 # Lint / autoformat: Python code
1010 - repo : https://github.com/astral-sh/ruff-pre-commit
1111 # Ruff version.
12- rev : " v0.8.6 "
12+ rev : " v0.9.1 "
1313 hooks :
1414 # Run the linter
1515 - id : ruff
Original file line number Diff line number Diff line change @@ -1139,7 +1139,7 @@ def deleteForm(
11391139 log .warning (json_data )
11401140 return False
11411141 except json .decoder .JSONDecodeError :
1142- log .error ("Could not parse response json during form deletion. " f" status_code={ result .status_code } " )
1142+ log .error (f "Could not parse response json during form deletion. status_code={ result .status_code } " )
11431143 finally :
11441144 return False
11451145
@@ -1629,7 +1629,7 @@ def deleteEntity(
16291629
16301630 if not response .ok :
16311631 if response .status_code == 404 :
1632- msg = f"Does not exist: project ({ projectId } ) dataset ({ datasetName } ) " f" entity ({ entityUuid } )"
1632+ msg = f"Does not exist: project ({ projectId } ) dataset ({ datasetName } ) entity ({ entityUuid } )"
16331633 log .debug (msg )
16341634 raise requests .exceptions .HTTPError (msg )
16351635 log .debug (f"Failed to delete Entity. Status code: { response .status_code } " )
@@ -1701,7 +1701,7 @@ def getEntityData(
17011701 """
17021702 logging .basicConfig (
17031703 level = log_level ,
1704- format = ("%(asctime)s.%(msecs)03d [%(levelname)s] " " %(name)s | %(funcName)s:%(lineno)d | %(message)s" ),
1704+ format = ("%(asctime)s.%(msecs)03d [%(levelname)s] %(name)s | %(funcName)s:%(lineno)d | %(message)s" ),
17051705 datefmt = "%y-%m-%d %H:%M:%S" ,
17061706 stream = sys .stdout ,
17071707 )
Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ async def getEntity(
453453 Returns:
454454 dict: the JSON entity details, for a specific dataset.
455455 """
456- url = f"{ self .base } projects/{ projectId } /datasets/{ datasetName } " f" /entities/{ entityUuid } "
456+ url = f"{ self .base } projects/{ projectId } /datasets/{ datasetName } /entities/{ entityUuid } "
457457 try :
458458 async with self .session .get (url , ssl = self .verify ) as response :
459459 return await response .json ()
@@ -700,7 +700,7 @@ async def deleteEntity(
700700 url = f"{ self .base } projects/{ projectId } /datasets/{ datasetName } /entities/{ entityUuid } "
701701 log .debug (f"Deleting dataset ({ datasetName } ) entity UUID ({ entityUuid } )" )
702702 try :
703- log .info (f"Deleting Entity ({ entityUuid } ) for ODK project ({ projectId } ) " f" and dataset ({ datasetName } )" )
703+ log .info (f"Deleting Entity ({ entityUuid } ) for ODK project ({ projectId } ) and dataset ({ datasetName } )" )
704704 async with self .session .delete (url , ssl = self .verify ) as response :
705705 success = (response_msg := await response .json ()).get ("success" , False )
706706 if not success :
Original file line number Diff line number Diff line change @@ -686,9 +686,7 @@ def main():
686686 "--boundary" ,
687687 nargs = "*" ,
688688 required = True ,
689- help = (
690- "The boundary for the area you want. " "Accepts path to geojson file or bbox string. " "Format min_x min_y max_x max_y"
691- ),
689+ help = ("The boundary for the area you want. Accepts path to geojson file or bbox string. Format min_x min_y max_x max_y" ),
692690 )
693691 parser .add_argument ("-t" , "--tms" , help = "Custom TMS URL" )
694692 parser .add_argument ("--xy" , action = "store_true" , help = "Swap the X & Y coordinates when using a custom TMS" )
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ def main():
185185 if args .verbose is not None :
186186 logging .basicConfig (
187187 level = logging .DEBUG ,
188- format = ("%(asctime)s.%(msecs)03d [%(levelname)s] " " %(name)s | %(funcName)s:%(lineno)d | %(message)s" ),
188+ format = ("%(asctime)s.%(msecs)03d [%(levelname)s] %(name)s | %(funcName)s:%(lineno)d | %(message)s" ),
189189 datefmt = "%y-%m-%d %H:%M:%S" ,
190190 stream = sys .stdout ,
191191 )
Original file line number Diff line number Diff line change 2929
3030logging .basicConfig (
3131 level = "DEBUG" ,
32- format = ("%(asctime)s.%(msecs)03d [%(levelname)s] " " %(name)s | %(funcName)s:%(lineno)d | %(message)s" ),
32+ format = ("%(asctime)s.%(msecs)03d [%(levelname)s] %(name)s | %(funcName)s:%(lineno)d | %(message)s" ),
3333 datefmt = "%y-%m-%d %H:%M:%S" ,
3434 stream = sys .stdout ,
3535)
Original file line number Diff line number Diff line change @@ -106,8 +106,7 @@ def check_survey_sheet(workbook: Workbook) -> None:
106106
107107 expected_calculation = "once('building')"
108108 assert form_category_calculation == expected_calculation , (
109- f"Expected 'calculation' value for 'form_category' to be '{ expected_calculation } ', "
110- f"but got '{ form_category_calculation } '."
109+ f"Expected 'calculation' value for 'form_category' to be '{ expected_calculation } ', but got '{ form_category_calculation } '."
111110 )
112111
113112 check_for_duplicates (survey_sheet , name_col_index )
You can’t perform that action at this time.
0 commit comments