@@ -44,6 +44,7 @@ def __init__(
4444 self ,
4545 codeql_cli = os .getenv ("CODEQL_CLI" , default = "codeql" ),
4646 server_options = ["--threads=0" , "--quiet" ],
47+ * ,
4748 log_stderr = False ,
4849 ):
4950 self .server_options = server_options .copy ()
@@ -406,7 +407,7 @@ def _bqrs_to_sarif(self, bqrs_path, query_info, max_paths=10):
406407
407408
408409class QueryServer (CodeQL ):
409- def __init__ (self , database : Path , keep_alive = False , log_stderr = False ):
410+ def __init__ (self , database : Path , * , keep_alive = False , log_stderr = False ):
410411 super ().__init__ (log_stderr = log_stderr )
411412 self .database = database
412413 self .keep_alive = keep_alive
@@ -476,7 +477,7 @@ def _file_uri_to_path(uri):
476477 return path , region
477478
478479
479- def _get_source_prefix (database_path : Path , strip_leading_slash = True ) -> str :
480+ def _get_source_prefix (database_path : Path , * , strip_leading_slash = True ) -> str :
480481 # grab the source prefix from codeql-database.yml
481482 db_yml_path = Path (database_path ) / Path ("codeql-database.yml" )
482483 with open (db_yml_path ) as stream :
@@ -491,7 +492,7 @@ def _get_source_prefix(database_path: Path, strip_leading_slash=True) -> str:
491492 raise
492493
493494
494- def list_src_files (database_path : str | Path , as_uri = False , strip_prefix = True ):
495+ def list_src_files (database_path : str | Path , * , as_uri = False , strip_prefix = True ):
495496 src_path = Path (database_path ) / Path ("src.zip" )
496497 files = shell_command_to_string (["zipinfo" , "-1" , src_path ]).split ("\n " )
497498 source_prefix = _get_source_prefix (Path (database_path ))
@@ -503,7 +504,7 @@ def list_src_files(database_path: str | Path, as_uri=False, strip_prefix=True):
503504 return files
504505
505506
506- def search_in_src_archive (database_path : str , search_term : str , as_uri = False , strip_prefix = True ):
507+ def search_in_src_archive (database_path : str , search_term : str , * , as_uri = False , strip_prefix = True ):
507508 database_path = Path (database_path )
508509 src_path = database_path / Path ("src.zip" )
509510 results = {}
@@ -595,6 +596,7 @@ def run_query(
595596 target = "" ,
596597 progress_callback = None ,
597598 template_values = None ,
599+ * ,
598600 # keep the query server alive if desired
599601 keep_alive = True ,
600602 log_stderr = False ,
0 commit comments