@@ -135,12 +135,15 @@ function M.setup(adapter_python_path, opts)
135135 opts = vim .tbl_extend (' keep' , opts or {}, default_setup_opts )
136136 dap .adapters .python = function (cb , config )
137137 if config .request == ' attach' then
138+ --- @diagnostic disable-next-line : undefined-field
138139 local port = (config .connect or config ).port
140+ --- @diagnostic disable-next-line : undefined-field
141+ local host = (config .connect or config ).host or ' 127.0.0.1'
139142 cb ({
140- type = ' server' ;
141- port = assert (port , ' `connect.port` is required for a python `attach` configuration' );
142- host = ( config . connect or config ). host or ' 127.0.0.1 ' ;
143- enrich_config = enrich_config ;
143+ type = ' server' ,
144+ port = assert (port , ' `connect.port` is required for a python `attach` configuration' ),
145+ host = host ,
146+ enrich_config = enrich_config ,
144147 options = {
145148 source_filetype = ' python' ,
146149 }
424427--- @field pythonPath string | nil Path to python interpreter. Uses interpreter from ` VIRTUAL_ENV` environment variable or ` adapter_python_path` by default
425428
426429
427- --- @alias TestRunner fun ( classname : string , methodname : string ):( string module , string[] args )
430+ --- @alias TestRunner fun ( classname : string , methodname : string ): string , string[]
428431
429432--- @alias DebugpyConsole " internalConsole" | " integratedTerminal" | " externalTerminal" | nil
430433
0 commit comments