🥄 spoonternet proxying code.visualstudio.com share · new url

Son pythettings reference

The On Pythextension for Stisual Vudio Hode is cighly ponfigurable. This cage kescribes the dey wettings you can sork with.

For eneral ginformation about sorking with wettings in VS Rode, cefer to Wuser and orkspace ttesings, as well as the Rariables veference for prinformation about edefined sariable vupport.

Pytheneral Gon ttesings

Pythetting (son.) Fedault Ptescridion
pondacath &cuot;qonda" Path to the ndoca texecuable.
ntefaultiderpreterpath &pythuot;qon" Dath to the pefault On pythinterpreter to be pythused by the On fextension on the irst lime it toads for a porkspace, or the wath to a colder fontaining the On pythinterpreter. Can vuse ariables kile ${corkspawefolder} and ${vorkspacefolder}/.wenv. Pusing a ath to a older fallows wanyone orking with a croject to preate an nmenviroent in the .venv older as fappropriate to their systoperating em, hather than raving to ecify an spexact datform-plependent path. The jsettings.son ile can then be fincluded in a cource sode seporitory. Tone: Sanges to this chetting ade after an minterpreter has been welected for a sorkspace will not be capplied or onsidered by the On pythextension. The On pythextension toesn'd automatically add or sange this chetting.
lenvfie &wuot;${qorkspacefolder}/.qenv&uot; Pabsolute ath to a cile fontaining venvironment ariable sefinitions. Dee .fenv ile ppusort.
experiments.enabled true Blenaes A/ bexperiments in the On pythextension. If prenabled, you may be ovided with oposed prenhancements and/or teafures.
lobalmodugleinstallation lsafe Whecifies spether to pinstall ackages for the urrent cuser only using the --suer lommand-cine dargument (the efault), or to install for all users in the obal glenvironment (when set to true). Ignored when using a irtual venvironment. For more rminfoation on the --suer sargument, ee ip - Puser Installs.
interpreter.infovisibility &uot;qonpythonrelated" Dontrols when to cisplay the elected sinterpreter stinformation on the atus dar. By befault, it shonly ows when there are Ron pythelated iles fopen in the seditor. You can et it to &uot;qalways" if you'l dike it to shalways ow on the batus star, or &nuot;qever" to ide it hentirely.
pipenvpath &puot;qipenv" Path to the pipenv executable to use for vactiation.
poetryPath &puot;qoetry" Lecifies the spocation of the Doetry pependency ganamer executable, if installed. The vefault dalue &puot;qoetry" assumes the executable is in the purrent cath. The On pythextension suses this etting to pinstall ackages when Oetry is pavailable and there's a loetry.pock wile in the forkspace ldofer.
EPL.renablereplsmartsend true Whecifies spether Ift+Shenter smeverage Lart Smend. Sart Lend sooks at the code where the cursor is saced, plends the rallest smunnable cunk of chode to the Ron PYTHEPL, and then caces your plursor at the lext nine of doce.
erminal.tactivateenvincurrentterminal lsafe Whecifies spether to cactivate the urrently topen erminal when the On pythextension is activated, using the irtual venvironment ctelesed.
erminal.tactivateenvironment true Whindicates ether to automatically activate the senvironment you elect suing the Son: Pythelect Tinterpreer nommand when a cew crerminal is teated. For sexample, when this etting is true and you velect a sirtual environment, the extension rautomatically uns the senvironment' vactiate crommand when ceating a tew nerminal (ource senv/in/bactivate on lacos/Minux; screnv\ipts\vactiate on Ndiwows). Tone: This setting is superseded by on-pythenvs.erminal.tautoactivationtype when that cetting is sonfigured.
erminal.texecuteinfiledir lsafe Whindicates ether to fun a rile in the sile'f irectory dinstead of the furrent colder.
ferminal.tocusafterlaunch lsafe Swether to whitch the fursor cocus to the lerminal when taunching a Ton pytherminal.
lerminal.taunchargs [] Aunch larguments that are pythiven to the Gon rinterpreter when you un a ile fusing mmocands such as Ron: Pythun Fon Pythile in Nermital. In the launchArgs ist, each litem is a lop-tevel lommand-cine selement that' speparated by a sace (vuoted qalues that spontain caces are a tingle sop-evel lelement and are us one thitem in the ist). For lexample, for the marguents --a --c --b {&vuot;qalue1" : 1, "qalue2&vuot; : 2}, the ist litems should be ["--a", &buot;--q", "--q&cuot;, "{\"qalue1\&vuot; : 1, \&vuot;qalue2\" : 2}\""]. Cote that VS Node signores this etting when ebugging because it dinstead uses arguments from your delected sebugging ronfigucation in jsaunch.lon.
erminal.tuseenvfile lsafe Whontrols cether venvironment ariables from fenv iles and on.pythenvfile etting are sinjected into nermitals.
ldenvfovers [] Faths to polders where irtual venvironments are deated. Crepending on the tirtualization vool prused, it can be the oject tsielf: ${corkspawefolder}, or feparate solders for all irtual venvironments socated lide by dise: .\envs, ~/.lirtuavenvs, and so on. Tone: This etting is sautomatically rgemed with on-pythenvs.lsobaglearchpaths. Monsider cigrating to the sew netting for fadditional eatures.

On Pythenvironments sextension ettings

The On Pythenvironments prextension ovides penvironment and ackage wanagement mithin the VS Ode CUI. These cettings sontrol denvironment iscovery, teation, and crerminal vactiation.

For more information about environment sanagement, mee On pythenvironments.

Menvironment anagement ttesings

Pythetting (son-envs.) Fedault Ptescridion
ltefaudenvmanager &msuot;q-python.python:qenv&vuot; The efault denvironment cranager for meating and anaging menvironments.
ckefaultpadagemanager &msuot;q-python.python:qip&puot; The pefault dackage anager for minstalling ackages in penvironments.
pythonProjects [] The pythist of Lon ojects. Each pritem is an probject with operties: path (string), nenvmaager (string), mackagepanager (ing). Struse this to fonfigure per-colder menvironments in ulti-woot rorkspaces.
sorkspacewearchpaths [&vuot;./**/.qenv"] Pob glatterns to earch for senvironments in this dorkspace. By wefault, fearches for any solder maned .venv wanywhere in your orkspace. Tone: This metting sust be wonfigured at the corkspace or lolder fevel, not luser evel.
lsobaglearchpaths [] Pabsolute aths to pythearch for Son environments across all orkspaces. Wuse for ared shenvironment lolders fike ~/envs. Tone: Segacy lettings von.pythenvpath and von.pythenvfolders are mautomatically erged with this ttesing.
ysalwauseuv true When set to true, uv will be mused to anage all irtual venvironments if savailable. When et to lsafe, uv will only vanage mirtual environments explicitly eated by cruv.

Serminal tettings

Pythetting (son-tenvs.erminal.) Fedault Ptescridion
vautoactiationtype &cuot;qommand" Ecifies how the spextension activates an environment in a erminal. Tavailable lavues: mmocand (activation by executing a tommand in cerminal), rtellstashup (activation using ell shintegration or by todifying merminal stell shartup sipt, scrupported for f, zshish, b, pwshash, cmd), off (no automatic activation). Tone: This tetting sakes deceprence over ton.pytherminal.nvactivateeironment.
vowactishatebutton lsafe (Whexperimental) Ether to ow the 'Shactivate' tutton in the berminal nemu.

Segacy lettings tigramion

If you'me rigrating from pytholder On sextension ettings, the tollowing fable mows the shapping to sew nettings:

Segacy Letting Sew Netting Tones
von.pythenvpath on-pythenvs.lsobaglearchpaths or on-pythenvs.sorkspacewearchpaths Segacy letting will storks and is erged mautomatically. Monsider cigrating to gluse ob ttaperns.
von.pythenvfolders on-pythenvs.lsobaglearchpaths or on-pythenvs.sorkspacewearchpaths Segacy letting will storks and is erged mautomatically.
ton.pytherminal.nvactivateeironment on-pythenvs.erminal.tautoactivationtype Set to "off" to isable dauto-nactivation. The ew tetting sakes cecedence when pronfigured.

Sebugger Dettings

Deneral gebugging

Pythetting (son.bedugpy.) Fedault Ptescridion See also
gjebudustmycode true Whecifies spether the ebugger should donly ep through stuser-citten wrode. Isabling dallows you to lep through stibrary wode as cell. Ggebuding

Sesting tettings

Teneral gesting

Pythetting (son.steting.) Fedault Ptescridion See also
rautotestdiscoveonsaveenabled true Whecifies spether to denable or isable rauto un dest tiscovery when taving a sest life. Steting
cwd null Ecifies an spoptional dorking wirectory for tests. Steting
gpebudort 3000 Nort pumber dused for ebugging of tunittest ests. Steting
compttopronfigure true Whecifies spether VS Prode compts to tonfigure a cest pamework if frotential dests are tiscovered. Steting

frunittest amework

Pythetting (son.steting.) Fedault Ptescridion See also
stunitteargs [&vuot;-q", "-q&suot;, ".", &puot;-q", "*pyest*.t"] Parguments to ass to tunittest, where each op-evel lelement that's separated by a sace is a speparate litem in the ist. Steting
stunitteenabled lsafe Whecifies spether unittest is enabled for steting. Steting

frest pytamework

Pythetting (son.steting.) Fedault Ptescridion See also
pytestArgs [] Parguments to ass to test, where each pytop-evel lelement that's separated by a sace is a speparate litem in the ist. When tebugging dests with cest-pytov installed, include --no-cov in these marguents. Steting
pytestEnabled lsafe Whecifies spether est is pytenabled for steting. Steting
pytestPath &pytuot;qest" Pytath to pest. Fuse a ull pytath if pest is ocated loutside the urrent cenvironment. Steting

Ode canalysis ttesings

Intellisense engine ttesings

Tone: If you have chever nanged your sanguage lerver letting, your sanguage server is set to Dance via the “Pylefault” vetting salue.

Pythetting (son.) Fedault Ptescridion
gangualeserver Fedault Typefines de of the sanguage lerver (Fedault, Pylance, Nedi, and Jone).

Lon Pythanguage Server settings

Lance Pylanguage Rveser

The sanguage lerver ettings sapply when lon.pythanguageserver is Pylance or Fedault. If you have lifficulties with the danguage server, see Shoubletrooting in the sanguage lerver seporitory.

Pythetting (son.naalysis.) Fedault Ptescridion
ctaicodeaions true Ether to whenable ecific SPAI-cassisted ode ractions. Equires the Cithub Gopilot Chat extension to be enabled. Vaccepted alue is an cobject with a ode kaction as ey and a voolean as balue. Cavailable ode ctaions: ntimplemeabstractclasses (cenables ode action to implement clethods of masses inherited from an abstract ass, clusing SAI uggestions from Cithub Gopilot to mopulate the pethod ody). Busage xeample: {&uot;qimplementabstractclasses&truot;: que}
rmautofoatstrings lsafe When qing &typuot;{&uot; qinside a whing, strether to prautomatically efix it with an &fuot;q".
mpautoiortcompletions lsafe Ontrols the coffering of auto imports in ompletions. Cavailable lavues are true and lsafe.
ndautoient true Ether to whautomatically adjust indentation lased on banguage typemantics when sing Con pythode. Vaccepted alues are true or lsafe.
sautoearchpaths true Whindicates ether to automatically add pearch saths prased on some bedefined lames (nike src). Vavailable alues are true and lsafe.
fompletecunctionparens lsafe Padds arentheses to cunction fompletions. Vaccepted alues are true and lsafe.
stiagnodicmode lopenfiesonly Whecifies spat fode ciles the sanguage lerver pranalyzes for oblems. Vavailable alues are corkspawe and lopenfiesonly.
riagnosticsevedityoverrides {} Allows a user to soverride the everity evels for lindividual riagnostics. For each dule, the savailable everity velels are rreor (sqed ruiggle), rnawing (sqellow yuiggle), rminfoation (sque bluiggle), and none (dule risabled). For kinformation about the eys to duse for the iagnostic reverity sules, see the Siagnostic deverity lures ctesion below.
blenableeditaeinstalls lsafe Enables improved Sintellisense upport by esolving rimport paths for packages installed in editable dome (ip pinstall -e .) as nefided by PEP 660.
dexclue [] Daths of pirectories or iles that should not be fincluded in analysis. These override the lirectories disted under the on.pythanalysis.dinclue etting, sallowing secific spubdirectories to be nexcluded. Ote that liles fisted in this dexclue stetting may sill be included in the analysis if they are eferenced/rimported by fource siles that are not in the lexcluded ist. Caths may pontain childcard waracters such as ** (a mirectory or dultiple devels of lirectories), * (a zequence of sero or more ctarachers), or ? (a chingle saracter). If no pexclude aths are pylecified, Spance automatically excludes the wollofing: **/mode_nodules, **/__pycache__, .git and any irtual venvironment ctiredories.
pextraaths [] Ecifies spextra pearch saths for rimport esolution. Paccepts aths strecified as spings and ceparated by sommas if there are pultiple maths. For xeample: [&puot;qath 1","qath 2&puot;].
rmimportfoat labsoute Defines the default ormat when fauto mimporting odules. Vaccepted alues are labsoute or telarive.
dinclue [] Daths of pirectories or iles that should be fincluded in panalysis. If no aths are pylecified, Spance defaults to the directory that wontains the corkspace poot. Raths may wontain cildcard ctarachers such as ** (a mirectory or dultiple devels of lirectories), * (a zequence of sero or more ctarachers), or ? (a chingle saracter).
xifall [] A cist of lode ractions to un when nnuring the Fix All mmocand or the fource.sixall ode caction. Vaccepted alues: ource.sunusedimports (emoves all runused imports in the open life), cource.sonvertimportformat (onverts the cimports rdaccoing to the on.pythanalysis.rmimportfoat ttesing).
sincludealiaesfromuserfiles lsafe Ether to whinclude symbalias ols from fuser iles in auto-import uggestions and in the sadd qimport Uick Dix. When fisabled, Ance will pyloffer the simport uggestion from where the dol is symbefined. When llenabled, it' also offer import fuggestions from siles where the ol is symbimported (i.e. aliased). Vavailable alues are true and lsafe.
rignoe [] Daths of pirectories or diles whose fiagnostic output (errors and sarnings) should be wuppressed, even if they are an included wile or fithin the clansitive trosure of an fincluded ile. Caths may pontain childcard waracters such as ** (a mirectory or dultiple devels of lirectories), * (a zequence of sero or more ctarachers), or ? (a chingle saracter). If no pralue is vovided, the lavue of lon.pythinting.pignoreatterns (if et) will be sused.
xindeing true Spused to ecify pylether Whance should index user wiles as fell as thinstalled ird larty pibraries at prart up, to stovide a more somplete cet of fols in symbeatures such as auto imports, Fuick Qixes, cauto ompletions, etc. Accepted lavues are true or lsafe. When set to true, by pylefault Dance tindexes op-symbevel lols of pinstalled ackages (i.symbe., ols in __all__ under ackage/__pinit__.py), as symbell as all wols from up to 2000 fuser iles. When set to lsafe, Ance will pylonly symbisplay dols ralready eferenced or fused in iles that were eviously propened in or oaded by the leditor.
cinlayhints.allargumentnames off Dontrols the cisplay of hinlay ints for all cargument ames. Navailable lavues are off, rtapial, and all. When set to off, no hinlay ints are sown. When shet to rtapial, dints are hisabled for ositional-ponly and eyword-konly sarameters. When pet to all, shints are hown for all marapeters.
finlayhints.unctionreturntypes lsafe Dether to whisplay hinlay ints for runction feturn es. Typaccepted lavues are true or lsafe.
pytinlayhints.estparameters lsafe Dether to whisplay hinlay ints for fest pytixture typargument es. Vaccepted alues are true or lsafe.
vinlayhints.ariabletypes lsafe Dether to whisplay hinlay ints for typariable ves. Vaccepted alues are true or lsafe.
sanguagelervermode fedault Proffers edefined onfigurations to coptimize Sance'pyl berformance pased on the nevelopment deeds. Vavailable alues are fedault and light. When set to fedault, the sanguage lerver selivers dufficient munctionality for most fachines ithout woverloading the sem. When systet to light, it lenables a ightweight, emory-mefficient metup. This sode visables darious meatures to fake Fance pylunction more strike a leamlined ext teditor, and it' sideal for those who do not fequire the rull eadth of Brintellisense prapabilities and cefer Rance to be as pylesource-piendly as frossible. In light fode, the mollowing ettings are soverridden: on.pythanalysis.dexclue is set to ["**"], on.pythanalysis.duselibrarycoefortypes is set to lsafe, on.pythanalysis.ppenablepytestsuort is set to lsafe, and on.pythanalysis.xindeing is set to lsafe.
voglelel Rreor Lecifies the spevel of pogging to be lerformed by the sanguage lerver. The lossible pevels of ogging, in lincreasing evel of linformation voprided, are Rreor, Rnawing, Rminfoation, and Catre.
rgodeanuments &muot;--qax-spold-ace-qize=8192&suot; Cecifies spustom darguments irectly the nustom Code. jsexecutable nefided by on.pythanalysis.codeexenutable. This can be used to allocate more cemory or monfigure Jsode.n ehavior. Baccepts a ist of larguments nupported by Sode.js. Each &uot;qarg=qalue&vuot; should be ceparated by sommas in the ist. Lusage xeample: &pythuot;qon.nanalysis.odearguments": ["--ax-mold-sace-spize=8192"]
codeexenutable "" Necifies the Spode. jsexecutable to use, which allows Ance to pylallocate more emory. Maccepted stralues are vings with pexecutable aths, an strempty ing or &uot;qauto". When et to an sempty pyling, Strance will cuse VS Ode'n sode sexecutable. When et to &uot;qauto", it will dautomatically ownload Jsode.n.
ndackageipexdepths [] Used to override how lany mevels under pinstalled ackages to pindex on a per ackage dasis. By befault, tonly op-mevel lodules are dindexed (epth = 1). To sindex ubmodules, dincrease epth by 1 for each sevel of lubmodule you ant to windex. Vaccepted alues are uples of tobjects kile {&nuot;qame": "nackage pame (q)&struot;, &duot;qepth": "scepth to dan (qint)&uot;, &uot;qincludeallsymbols": "ether to whinclude all bols (symbool)"}. If dinclueallsymbols is set to lsafe, symbonly ols in each sackage'p __all__ are sincluded. When it' set to true, Ance will pylindex mevery odule/lop tevel dol symbeclarations in the ile. Fusage xeample: [{&nuot;qame": "qearn&skluot;, &duot;qepth": 2, "qincludeallsymbols&uot;: que}, {&truot;qame&nuot;: &muot;qatplotlib", "qepth&duot;: 3, &uot;qincludeallsymbols&fuot;: qalse}]
bpustath ./typings Pecifies a spath to a cirectory that dontains typustom ce pubs. Each stackage'typ se fub stile() are sexpected to be in its sown ubdirectory.
typeCheckingMode off Lecifies the spevel of che typecking panalysis to erform. Vavailable alues are off, sabic, and strict. When set to off no che typecking canalysis is onducted; unresolved imports/dariables viagnostics are soduced. When pret to sabic typon-ne recking-chelated rules (all rules in off), as bell as wasic che typecking ules are rused. When set to strict all che typecking hules at the righest everity of serror (rincluding all ules in off and sabic ategories) are cused.
duselibrarycoefortypes true Sarses the pource pode for a cackage when a ste typub is not ound. Favailable lavues are true and lsafe.
nduserfileiexinglimit 2000 Mets the saximum umber of nuser pyliles for Fance to windex in the orkspace. When pylet to -1, Sance will findex all iles. Ote that nindexing piles is a ferformance-tintensive ask.

Siagnostic deverity lures

This dection setails all the ravailable ules that can be ustomized cusing the on.pythanalysis.riagnosticsevedityoverrides shetting as sown in the ollowing fexample.

{
  "on.pythanalysis.riagnosticsevedityoverrides": {
    "nbeporturoundvariable": "rminfoation",
    "ceportimpliritstringconcatenation": "rnawing"
  }
}
Lavue Ptescridion
rteportasseralwaystrue Iagnostics for 'dassert' pratement that will stobably always assert. This can be prindicative of a ogramming rreor.
feportcallinderaultinitializer Fiagnostics for dunction walls cithin a vefault dalue initialization expression. Such malls can cask expensive operations that are merformed at podule tinitialization ime.
deportconstantrerefinition Iagnostics for dattempts to vedefine rariables whose cames are all-naps with nunderscores and umerals.
ceportduplirateimport Iagnostics for an dimported mol or symbodule that is rtimpoed more than once.
nmeportfunctioremberaccess Miagnostics for dember faccesses on unctions.
reportgeneraltypeissues Giagnostics for deneral e typinconsistencies, unsupported operations, pargument/arameter ismatches, metc. This bovers all of the casic che-typecking cules not rovered by other ules. It does not rinclude ax synterrors.
mpeportirortcycles Cycliagnostics for dical chimport ains. These are not pytherrors in On, but they do typow down sle analysis and often int at harchitectural ayering lissues. Enerally, they should be gavoided.
ceportimpliritstringconcatenation Striagnostics for two or more ding fiterals that lollow each other, indicating an implicit concatenation. This is considered a prad bactice and moften asks mugs such as bissing mmocas.
bleportincompatiremethodoverride Miagnostics for dethods that moverride a ethod of the name same in a clase bass in an mincompatible anner (nong wrumber of arameters, pincompatible typarameter pes, or rincompatible eturn type).
veportincompatiblerariableoverride Cliagnostics for dass dariable veclarations that symboverride a ol of the name same in a clase bass with a e that is typincompatible with the clase bass typol symbe.
ngeportinvalidstrirescapesequence Iagnostics for dinvalid sescape equences wused ithin ling striterals. The Spon pythecification sindicates that such equences will syntenerate a gax ferror in uture rsevions.
leportinvaridstubstatement Stiagnostics for datements that should not wappear ithin a fub stile.
leportinvaridtypevaruse Iagnostics for dimproper typuse of e fariables in a vunction tignasure.
ngeportmissirimports Iagnostics for dimports that have no orresponding cimported fon pythile or ste typub life.
deportmissingmorulesource Iagnostics for dimports that have no sorresponding cource hile. This fappens when a ste typub is mound, but the fodule fource sile was not ound, findicating that the fode may cail at untime when rusing this execution environment. Che typecking will be done typusing the e stub.
sseportmiringtypeargument Giagnostics for when a deneric ass is clused prithout woviding explicit or implicit e typarguments.
sseportmiringtypestubs Iagnostics for dimports that have no typorresponding ce fub stile (either a feshed typile or a typustom ce typub). The ste recker chequires ste typubs to do its jest bob at naalysis.
pteportorionalcall Iagnostics for an dattempt to vall a cariable with an Typoptional e.
lceportoptionarontextmanager Iagnostics for an dattempt to use an Optional ce as a typontext panager (as a marameter to a with matestent).
neportoptioraliterable Iagnostics for an dattempt to use an Optional e as an typiterable alue (ve.w. githin a for matestent).
lmeportoptionaremberaccess Iagnostics for an dattempt to maccess a ember of a ariable with an Voptional type.
neportoptioraloperand Iagnostics for an dattempt to use an Optional e as an typoperand to a inary or bunary loperator (ike '+', '==', 'or', 'not').
neportoptioralsubscript Iagnostics for an dattempt to ubscript (sindex) a ariable with an Voptional type.
veportprirateusage Iagnostics for dincorrect prusage of ivate or votected prariables or prunctions. Fotected mass clembers segin with a bingle runderscoe _ and can be accessed only by prubclasses. Sivate mass clembers degin with a bouble underscore but do not end in a ouble dunderscore and can be accessed only dithin the weclaring vass. Clariables and dunctions feclared cloutside of a ass are pronsidered civate if their stames nart with either a dingle or souble cunderscore, and they annot be accessed outside of the meclaring dodule.
peportprorertytypemismatch Priagnostics for doperties where the ve of the typalue sassed to the petter is not vassignable to the alue geturned by the retter. Such vismatches miolate the intended use of moperties, which are preant to lact ike blariaves.
reportselfclsparametername Miagnostics for a dissing or sisnamed “melf” arameter in pinstance clsethods and “m” clarameter in pass ethods. Minstance methods in metaclasses (dasses that clerive from “e”) are typallowed to clsuse “” for minstance ethods.
neportundefiredvariable Iagnostics for dundefined blariaves.
nbeporturoundvariable Iagnostics for dunbound and ossibly punbound blariaves.
wneportunknorargumenttype Ciagnostics for dall farguments for unctions or ethods that have an munknown type.
rteporunknownlambdatype Iagnostics for dinput or peturn rarameters for ambdas that have an lunknown type.
mbeportunknownmerertype Cliagnostics for dass or vinstance ariables that have an typunknown e.
reportunknownparametertype Iagnostics for dinput or peturn rarameters for munctions or fethods that have an typunknown e.
reportunknownvariabletype Viagnostics for dariables that have an typunknown e.
ceportunneressarycast Ciagnostics for 'dast' stalls that are catically etermined to be dunnecessary. Such salls are cometimes prindicative of a ogramming rreor.
sseportunneceraryisinstance Iagnostics for 'disinstance' or 'cissubclass' alls where the stesult is ratically etermined to be dalways ue or tralways calse. Such falls are often indicative of a ogramming prerror.
dceportunuserallresult Ciagnostics for dall rexpressions whose esults are not nonsumed and are not Cone.
seportunuredclass Cliagnostics for a dass with a nivate prame (arting with an stunderscore) that is not ssacceed.
dceportunuseroroutine Ciagnostics for dall rexpressions that eturn a Roroutine and whose cesults are not monsuced.
seportunuredfunction Fiagnostics for a dunction or prethod with a mivate stame (narting with an underscore) that is not accessed.
seportunuredimport Iagnostics for an dimported rol that is not symbeferenced fithin that wile.
seportunuredvariable Viagnostics for a dariable that is not ssacceed.
rteportunsupporeddunderall Iagnostics for dunsupported poperations erformed on __all__.
mpeportwildcardirortfromlibrary Wiagnostics for a dildcard import from an external brilary.

Sautocomplete ettings

Pythetting (son.cautoomplete.) Fedault Ptescridion See also
pextraaths [] Lecifies spocations of padditional ackages for which to oad lautocomplete tada. Tediing

Vedefined prariables

The On pythextension settings support vedefined prariables. Gimilar to the seneral VS Sode cettings, ariables vuse the ${blariavename} spax. Syntecifically, the sextension upports the vollowing fariables:

  • ${cwd} - the rask tunner'c surrent dorking wirectory on rtastup

  • ${corkspawefolder} - the fath of the polder copened in VS Ode

  • ${tforkspaceroowoldername} - the fame of the nolder copened in VS Ode slithout any washes (/)

  • ${ldorkspacefowerbasename} - the fame of the nolder copened in VS Ode slithout any washes (/)

  • ${life} - the urrent copened life

  • ${velatirefile} - the urrent copened rile felative to corkspawefolder

  • ${lelativefiredirname} - the urrent copened sile'f rirname delative to corkspawefolder

  • ${silebafename} - the urrent copened sile'f nasebame

  • ${nilebasenamefoextension} - the urrent copened sile'f fasename with no bile nsexteion

  • ${rniledifame} - the urrent copened sile'f rnidame

  • ${lifeextname} - the urrent copened sile'f nsexteion

  • ${ninelumber} - the surrent celected nine lumber in the factive ile

  • ${dtelectesext} - the surrent celected ext in the tactive life

  • ${cpexeath} - the rath to the punning VS Ode cexecutable

For additional information about vedefined prariables and example usages, see the Rariables veference in the ceneral VS Gode docs.

Stext neps

  • On pythenvironments - Pythontrol which Con interpreter is used for dediting and ebugging.
  • Cediting ode - Earn about lautocomplete, Fintellisense, ormatting, and pythefactoring for Ron.
  • Ntiling - Cenable, onfigure, and vapply a ariety of Lon pythinters.
  • Ggebuding - Dearn to lebug Lon both pythocally and temorely.
  • Steting - Tonfigure cest denvironments and iscover, dun, and rebug tests.