CopilotChatHistory.xml 384 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project version="4">
  3. <component name="CopilotChatHistory">
  4. <option name="conversations">
  5. <list>
  6. <Conversation>
  7. <option name="createTime" value="1742724021680" />
  8. <option name="id" value="0195c2723db07a689c3ba36c6545be58" />
  9. <option name="title" value="新对话 2025年3月23日 18:00:21" />
  10. <option name="updateTime" value="1742724021680" />
  11. </Conversation>
  12. <Conversation>
  13. <option name="createTime" value="1742705963507" />
  14. <option name="id" value="0195c15eb1f3711f9472b5b245e8f1c8" />
  15. <option name="title" value="新对话 2025年3月23日 12:59:23" />
  16. <option name="updateTime" value="1742705963507" />
  17. </Conversation>
  18. <Conversation>
  19. <option name="createTime" value="1742541939752" />
  20. <option name="id" value="0195b797e42870f5a1858adfde34698d" />
  21. <option name="title" value="新对话 2025年3月21日 15:25:39" />
  22. <option name="updateTime" value="1742541939752" />
  23. </Conversation>
  24. <Conversation>
  25. <option name="createTime" value="1742493777759" />
  26. <option name="id" value="0195b4b8ff5f7de586a6dcb029dc4ee2" />
  27. <option name="title" value="新对话 2025年3月21日 02:02:57" />
  28. <option name="updateTime" value="1742493777759" />
  29. </Conversation>
  30. <Conversation>
  31. <option name="createTime" value="1742483831809" />
  32. <option name="id" value="0195b4213c0172298c2a8b1bcebac475" />
  33. <option name="title" value="@workspace 为什么log里的user是None?" />
  34. <option name="turns">
  35. <list>
  36. <Turn>
  37. <option name="agent" value="workspace" />
  38. <option name="answer" value="&lt;gsrmp&gt;&#10;好的,用户问为什么在`olt`路由中的`fhvi`变量是`Mlmv`。我需要先看一下提供的代码片段。&#10;&#10;在`trgIlfgvi.kb`的`olt`路由处理函数中,用户调用了`Fhvih(ffrw=ivjfvhg.ffrw)`,但似乎没有从数据库或其他地方获取数据的逻辑。可能的问题有几个:&#10;&#10;8. **数据库连接未建立**:代码中没有看到初始化数据库连接的部分,比如创建Hvhhrlm或引擎,可能导致查询无法执行。&#10;7. **异步操作问题**:如果`Fhvih`模型是异步的,可能需要使用`zdzrg`配合异步查询方法,比如`tvg`,而直接实例化可能不会访问数据库。&#10;6. **模型定义不正确**:`Fhvih`类可能没有正确继承LIN基类,或者没有定义必要的字段,导致查询失败。&#10;5. **请求数据问题**:`ivjfvhg.ffrw`可能不正确,导致查询不到用户。&#10;&#10;需要检查`Fhvih`模型的实现,确保数据库连接正确,并且使用异步查询方法如`zdzrg Fhvih.tvg(ffrw=ivjfvhg.ffrw)`。此外,确认请求中的FFRW是否有效,以及是否有异常处理机制来捕获可能的错误。&#10;&lt;/gsrmp&gt;&#10;&#10;&#10;根据提供的代码片段,`/olt`路由中`fhvi=zdzrg Fhvih(ffrw=ivjfvhg.ffrw)`出现Mlmv可能有以下原因:&#10;&#10;8. **数据库查询缺失** &#10;代码中未见数据库连接和查询逻辑,需要确认:&#10;- 是否已正确配置数据库连接(检查wy_xlmurt.kb)&#10;- Fhvih模型是否继承自LIN基类(如HJOZoxsvnb的Yzhv类)&#10;- 是否使用了异步查询方法(如`.tvg()`)&#10;&#10;7. **异步操作问题** &#10;直接实例化模型`Fhvih(ffrw=...)`不会访问数据库,应该使用类似:&#10;```kbgslm&#10;fhvi = zdzrg Fhvih.tvg(ffrw=ivjfvhg.ffrw)&#10;```&#10;&#10;6. **请求参数问题** &#10;检查传入的`ivjfvhg.ffrw`是否有效,是否在数据库中存在对应记录&#10;&#10;建议检查nlwvoh/trgNlwvoh.kb中的Fhvih模型实现,并确保已配置数据库会话管理。" />
  39. <option name="chatResource" value="user" />
  40. <option name="codeReferences">
  41. <list>
  42. <CodeReferencesBean>
  43. <option name="content" value="rnklig lh, qhlm,szhsory&#10;uiln uzhgzkr rnklig ZKRIlfgvi, YzxptilfmwGzhph&#10;&#10;&#10;uiln trg rnklig Ivkl&#10;&#10;uiln kbwzmgrx rnklig YzhvNlwvo&#10;&#10;uiln nlwvoh.trgNlwvoh rnklig Fhvih&#10;&#10;&#10;xozhh IvjfvhgYlwb(YzhvNlwvo):&#10; ffrw: hgi&#10; ivkl_fio: hgi&#10;&#10;&#10;wvu tvmvizgv_ivkl_kzgs(ffrw, ivkl_fio):&#10; ivkl_mznv = ivkl_fio.hkorg(&quot;/&quot;)[-8].ivkozxv(&quot;.trg&quot;, &quot;&quot;)&#10; yzhv_kzgs = lh.kzgs.qlrm(&quot;X:/Fhvih/67034/ivkl&quot;, ffrw)&#10; ivgfim lh.kzgs.qlrm(yzhv_kzgs, ivkl_mznv), ivkl_mznv&#10;&#10;&#10;wvu tvg_ivkl(ffrw, ivkl_fio):&#10; kzgs, _ = tvmvizgv_ivkl_kzgs(ffrw, ivkl_fio)&#10; ru mlg lh.kzgs.vcrhgh(kzgs):&#10; ivgfim 9&#10; ivgfim Ivkl(kzgs)&#10;&#10;&#10;trgilfgvi = ZKRIlfgvi()&#10;&#10;&#10;" />
  44. <option name="end_line" value="32" />
  45. <option name="filename" value="gitRouter.py" />
  46. <option name="language" value="Python" />
  47. <option name="range">
  48. <Range>
  49. <option name="end">
  50. <Position>
  51. <option name="line" value="32" />
  52. </Position>
  53. </option>
  54. <option name="start">
  55. <Position />
  56. </option>
  57. </Range>
  58. </option>
  59. <option name="type" value="editor" />
  60. <option name="url" value="file:///C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py" />
  61. </CodeReferencesBean>
  62. </list>
  63. </option>
  64. <option name="codebaseContextVariableValues">
  65. <list>
  66. <CodebaseContextVariableValue>
  67. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\rich\console.py: self._force_terminal = None&#10;if force_terminal is not None:&#10; self._force_terminal = force_terminal&#10;self._file = file&#10;self.quiet = quiet&#10;self.stderr = stderr&#10;if color_system is None:&#10; self._color_system = None&#10;elif color_system == &quot;auto&quot;:&#10; self._color_system = self._detect_color_system()&#10;else:&#10; self._color_system = COLOR_SYSTEMS[color_system]&#10;self._lock = threading.RLock()&#10;self._log_render = LogRender(&#10; show_time=log_time,&#10; show_path=log_path,&#10; time_format=log_time_format,&#10;)&#10;self.highlighter: HighlighterType = highlighter or _null_highlighter&#10;self.safe_box = safe_box&#10;self.get_datetime = get_datetime or datetime.now&#10;self.get_time = get_time or monotonic&#10;self.style = style&#10;self.no_color = (&#10; no_color if no_color is not None else &quot;NO_COLOR&quot; in self._environ&#10;)&#10;self.is_interactive = (" />
  68. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/rich/console.py" />
  69. <option name="range">
  70. <Range>
  71. <option name="endColumn" value="1" />
  72. <option name="endLine" value="740" />
  73. <option name="startColumn" value="1" />
  74. <option name="startLine" value="711" />
  75. </Range>
  76. </option>
  77. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\rich\console.py" />
  78. </CodebaseContextVariableValue>
  79. <CodebaseContextVariableValue>
  80. <option name="chunk" value=".venv\Lib\site-packages\pymysql\constants\ER.py: PROCACCESS_DENIED_ERROR = 1370&#10;RELAY_LOG_FAIL = 1371&#10;PASSWD_LENGTH = 1372&#10;UNKNOWN_TARGET_BINLOG = 1373&#10;IO_ERR_LOG_INDEX_READ = 1374&#10;BINLOG_PURGE_PROHIBITED = 1375&#10;FSEEK_FAIL = 1376&#10;BINLOG_PURGE_FATAL_ERR = 1377&#10;LOG_IN_USE = 1378&#10;LOG_PURGE_UNKNOWN_ERR = 1379&#10;RELAY_LOG_INIT = 1380&#10;NO_BINARY_LOGGING = 1381&#10;RESERVED_SYNTAX = 1382&#10;WSAS_FAILED = 1383&#10;DIFF_GROUPS_PROC = 1384&#10;NO_GROUP_FOR_PROC = 1385&#10;ORDER_WITH_PROC = 1386&#10;LOGGING_PROHIBIT_CHANGING_OF = 1387&#10;NO_FILE_MAPPING = 1388&#10;WRONG_MAGIC = 1389&#10;PS_MANY_PARAM = 1390&#10;KEY_PART_0 = 1391&#10;VIEW_CHECKSUM = 1392&#10;VIEW_MULTIUPDATE = 1393&#10;VIEW_NO_INSERT_FIELD_LIST = 1394&#10;VIEW_DELETE_MERGE_VIEW = 1395&#10;CANNOT_USER = 1396&#10;XAER_NOTA = 1397&#10;XAER_INVAL = 1398&#10;XAER_RMFAIL = 1399&#10;XAER_OUTSIDE = 1400&#10;XAER_RMERR = 1401&#10;XA_RBROLLBACK = 1402&#10;NONEXISTING_PROC_GRANT = 1403&#10;PROC_AUTO_GRANT_FAIL = 1404&#10;PROC_AUTO_REVOKE_FAIL = 1405" />
  81. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pymysql/constants/ER.py" />
  82. <option name="range">
  83. <Range>
  84. <option name="endColumn" value="1" />
  85. <option name="endLine" value="407" />
  86. <option name="startColumn" value="1" />
  87. <option name="startLine" value="372" />
  88. </Range>
  89. </option>
  90. <option name="relativePath" value=".venv\Lib\site-packages\pymysql\constants\ER.py" />
  91. </CodebaseContextVariableValue>
  92. <CodebaseContextVariableValue>
  93. <option name="chunk" value=".venv\Lib\site-packages\uvicorn\workers.py: logger.handlers = self.log.access_log.handlers&#10;logger.setLevel(self.log.access_log.level)&#10;logger.propagate = False&#10;config_kwargs: dict = {&#10; &quot;app&quot;: None,&#10; &quot;log_config&quot;: None,&#10; &quot;timeout_keep_alive&quot;: self.cfg.keepalive,&#10; &quot;timeout_notify&quot;: self.timeout,&#10; &quot;callback_notify&quot;: self.callback_notify,&#10; &quot;limit_max_requests&quot;: self.max_requests,&#10; &quot;forwarded_allow_ips&quot;: self.cfg.forwarded_allow_ips,&#10;}&#10;if self.cfg.is_ssl:&#10; ssl_kwargs = {&#10; &quot;ssl_keyfile&quot;: self.cfg.ssl_options.get(&quot;keyfile&quot;),&#10; &quot;ssl_certfile&quot;: self.cfg.ssl_options.get(&quot;certfile&quot;),&#10; &quot;ssl_keyfile_password&quot;: self.cfg.ssl_options.get(&quot;password&quot;),&#10; &quot;ssl_version&quot;: self.cfg.ssl_options.get(&quot;ssl_version&quot;),&#10; &quot;ssl_cert_reqs&quot;: self.cfg.ssl_options.get(&quot;cert_reqs&quot;)," />
  94. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/uvicorn/workers.py" />
  95. <option name="range">
  96. <Range>
  97. <option name="endColumn" value="1" />
  98. <option name="endLine" value="60" />
  99. <option name="startColumn" value="1" />
  100. <option name="startLine" value="40" />
  101. </Range>
  102. </option>
  103. <option name="relativePath" value=".venv\Lib\site-packages\uvicorn\workers.py" />
  104. </CodebaseContextVariableValue>
  105. <CodebaseContextVariableValue>
  106. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\android.py: &quot;&quot;&quot;:return: state directory tied to the user, same as `user_data_dir`&quot;&quot;&quot;&#10; return self.user_data_dir&#10;@property&#10;def user_log_dir(self) -&gt; str:&#10; &quot;&quot;&quot;&#10; :return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,&#10; e.g. ``/data/user/&lt;userid&gt;/&lt;packagename&gt;/cache/&lt;AppName&gt;/log``&#10; &quot;&quot;&quot;&#10; path = self.user_cache_dir&#10; if self.opinion:&#10; path = os.path.join(path, &quot;log&quot;) # noqa: PTH118&#10; return path&#10;@property&#10;def user_documents_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``&quot;&quot;&quot;&#10; return _android_documents_folder()&#10;@property&#10;def user_downloads_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``&quot;&quot;&quot;&#10; return _android_downloads_folder()&#10;@property&#10;def user_pictures_dir(self) -&gt; str:" />
  107. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/android.py" />
  108. <option name="range">
  109. <Range>
  110. <option name="endColumn" value="1" />
  111. <option name="endLine" value="81" />
  112. <option name="startColumn" value="1" />
  113. <option name="startLine" value="56" />
  114. </Range>
  115. </option>
  116. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\android.py" />
  117. </CodebaseContextVariableValue>
  118. <CodebaseContextVariableValue>
  119. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py: self.debugActions.debug_try(instring, loc, self, cache_hit=True) # type: ignore [call-arg]&#10; except TypeError:&#10; pass&#10; if isinstance(value, Exception):&#10; if self.debug and self.debugActions.debug_fail:&#10; try:&#10; self.debugActions.debug_fail(&#10; instring, loc, self, value, cache_hit=True # type: ignore [call-arg]&#10; )&#10; except TypeError:&#10; pass&#10; raise value&#10; value = cast(Tuple[int, ParseResults, int], value)&#10; loc_, result, endloc = value[0], value[1].copy(), value[2]&#10; if self.debug and self.debugActions.debug_match:&#10; try:&#10; self.debugActions.debug_match(&#10; instring, loc_, endloc, self, result, cache_hit=True # type: ignore [call-arg]&#10; )&#10; except TypeError:&#10; pass&#10; return loc_, result&#10;_parse = _parseNoCache&#10;@staticmethod&#10;def reset_cache() -&gt; None:&#10; ParserElement.packrat_cache.clear()&#10; ParserElement.packrat_cache_stats[:] = [0] * len(" />
  120. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/pyparsing/core.py" />
  121. <option name="range">
  122. <Range>
  123. <option name="endColumn" value="1" />
  124. <option name="endLine" value="1011" />
  125. <option name="startColumn" value="1" />
  126. <option name="startLine" value="981" />
  127. </Range>
  128. </option>
  129. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py" />
  130. </CodebaseContextVariableValue>
  131. <CodebaseContextVariableValue>
  132. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\cli\base_command.py: &quot;&quot;&quot;Base Command class, and related routines&quot;&quot;&quot;&#10;import functools&#10;import logging&#10;import logging.config&#10;import optparse&#10;import os&#10;import sys&#10;import traceback&#10;from optparse import Values&#10;from typing import Any, Callable, List, Optional, Tuple&#10;from pip._vendor.rich import traceback as rich_traceback&#10;from pip._internal.cli import cmdoptions&#10;from pip._internal.cli.command_context import CommandContextMixIn&#10;from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter&#10;from pip._internal.cli.status_codes import (&#10; ERROR,&#10; PREVIOUS_BUILD_DIR_ERROR,&#10; UNKNOWN_ERROR,&#10; VIRTUALENV_NOT_FOUND,&#10;)&#10;from pip._internal.exceptions import (&#10; BadCommand,&#10; CommandError,&#10; DiagnosticPipError,&#10; InstallationError,&#10; NetworkConnectionError,&#10; PreviousBuildDirError,&#10; UninstallationError,&#10;)&#10;from pip._internal.utils.filesystem import check_path_owner&#10;from pip._internal.utils.logging import BrokenStdoutLoggingError, setup_logging&#10;from pip._internal.utils.misc import get_prog, normalize_path&#10;from pip._internal.utils.temp_dir import TempDirectoryTypeRegistry as TempDirRegistry&#10;from pip._internal.utils.temp_dir import global_tempdir_manager, tempdir_registry&#10;from pip._internal.utils.virtualenv import running_under_virtualenv" />
  133. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/cli/base_command.py" />
  134. <option name="range">
  135. <Range>
  136. <option name="endColumn" value="1" />
  137. <option name="endLine" value="38" />
  138. <option name="startColumn" value="1" />
  139. <option name="startLine" value="1" />
  140. </Range>
  141. </option>
  142. <option name="relativePath" value=".venv\Lib\site-packages\pip\_internal\cli\base_command.py" />
  143. </CodebaseContextVariableValue>
  144. <CodebaseContextVariableValue>
  145. <option name="chunk" value=".venv\Lib\site-packages\uvicorn\config.py: ssl_cert_reqs: int = ssl.CERT_NONE,&#10; ssl_ca_certs: str | None = None,&#10; ssl_ciphers: str = &quot;TLSv1&quot;,&#10; headers: list[tuple[str, str]] | None = None,&#10; factory: bool = False,&#10; h11_max_incomplete_event_size: int | None = None,&#10;):&#10; self.app = app&#10; self.host = host&#10; self.port = port&#10; self.uds = uds&#10; self.fd = fd&#10; self.loop = loop&#10; self.http = http&#10; self.ws = ws&#10; self.ws_max_size = ws_max_size&#10; self.ws_max_queue = ws_max_queue&#10; self.ws_ping_interval = ws_ping_interval&#10; self.ws_ping_timeout = ws_ping_timeout&#10; self.ws_per_message_deflate = ws_per_message_deflate&#10; self.lifespan = lifespan&#10; self.log_config = log_config&#10; self.log_level = log_level&#10; self.access_log = access_log&#10; self.use_colors = use_colors" />
  146. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/uvicorn/config.py" />
  147. <option name="range">
  148. <Range>
  149. <option name="endColumn" value="1" />
  150. <option name="endLine" value="245" />
  151. <option name="startColumn" value="1" />
  152. <option name="startLine" value="221" />
  153. </Range>
  154. </option>
  155. <option name="relativePath" value=".venv\Lib\site-packages\uvicorn\config.py" />
  156. </CodebaseContextVariableValue>
  157. <CodebaseContextVariableValue>
  158. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\rich\traceback.py: theme: Optional[str] = None,&#10; word_wrap: bool = False,&#10; show_locals: bool = False,&#10; locals_max_length: int = LOCALS_MAX_LENGTH,&#10; locals_max_string: int = LOCALS_MAX_STRING,&#10; locals_hide_dunder: bool = True,&#10; locals_hide_sunder: bool = False,&#10; indent_guides: bool = True,&#10; suppress: Iterable[Union[str, ModuleType]] = (),&#10; max_frames: int = 100,&#10;):&#10; if trace is None:&#10; exc_type, exc_value, traceback = sys.exc_info()&#10; if exc_type is None or exc_value is None or traceback is None:&#10; raise ValueError(&#10; &quot;Value for 'trace' required if not called in except: block&quot;&#10; )&#10; trace = self.extract(&#10; exc_type, exc_value, traceback, show_locals=show_locals&#10; )&#10; self.trace = trace&#10; self.width = width&#10; self.extra_lines = extra_lines&#10; self.theme = Syntax.get_theme(theme or &quot;ansi_dark&quot;)" />
  159. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/rich/traceback.py" />
  160. <option name="range">
  161. <Range>
  162. <option name="endColumn" value="1" />
  163. <option name="endLine" value="270" />
  164. <option name="startColumn" value="1" />
  165. <option name="startLine" value="247" />
  166. </Range>
  167. </option>
  168. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\rich\traceback.py" />
  169. </CodebaseContextVariableValue>
  170. <CodebaseContextVariableValue>
  171. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\android.py: :return: config directory tied to the user, e.g. \&#10; ``/data/user/&lt;userid&gt;/&lt;packagename&gt;/shared_prefs/&lt;AppName&gt;``&#10; &quot;&quot;&quot;&#10; return self._append_app_name_and_version(cast(str, _android_folder()), &quot;shared_prefs&quot;)&#10;@property&#10;def site_config_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: config directory shared by the users, same as `user_config_dir`&quot;&quot;&quot;&#10; return self.user_config_dir&#10;@property&#10;def user_cache_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: cache directory tied to the user, e.g. e.g. ``/data/user/&lt;userid&gt;/&lt;packagename&gt;/cache/&lt;AppName&gt;``&quot;&quot;&quot;&#10; return self._append_app_name_and_version(cast(str, _android_folder()), &quot;cache&quot;)&#10;@property&#10;def site_cache_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: cache directory shared by users, same as `user_cache_dir`&quot;&quot;&quot;&#10; return self.user_cache_dir&#10;@property&#10;def user_state_dir(self) -&gt; str:" />
  172. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/android.py" />
  173. <option name="range">
  174. <Range>
  175. <option name="endColumn" value="1" />
  176. <option name="endLine" value="55" />
  177. <option name="startColumn" value="1" />
  178. <option name="startLine" value="34" />
  179. </Range>
  180. </option>
  181. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\android.py" />
  182. </CodebaseContextVariableValue>
  183. <CodebaseContextVariableValue>
  184. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py: ParserElement.inline_literals_using(Suppress)&#10; date_str = integer(&quot;year&quot;) + '/' + integer(&quot;month&quot;) + '/' + integer(&quot;day&quot;)&#10; date_str.parse_string(&quot;1999/12/31&quot;) # -&gt; ['1999', '12', '31']&#10; &quot;&quot;&quot;&#10; ParserElement._literalStringClass = cls&#10;@classmethod&#10;def using_each(cls, seq, **class_kwargs):&#10; &quot;&quot;&quot;&#10; Yields a sequence of class(obj, **class_kwargs) for obj in seq.&#10; Example::&#10; LPAR, RPAR, LBRACE, RBRACE, SEMI = Suppress.using_each(&quot;(){};&quot;)&#10; &quot;&quot;&quot;&#10; yield from (cls(obj, **class_kwargs) for obj in seq)&#10;class DebugActions(NamedTuple):&#10; debug_try: typing.Optional[DebugStartAction]&#10; debug_match: typing.Optional[DebugSuccessAction]&#10; debug_fail: typing.Optional[DebugExceptionAction]&#10;def __init__(self, savelist: bool = False):&#10; self.parseAction: List[ParseAction] = list()&#10; self.failAction: typing.Optional[ParseFailAction] = None&#10; self.customName: str = None # type: ignore[assignment]" />
  185. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/pyparsing/core.py" />
  186. <option name="range">
  187. <Range>
  188. <option name="endColumn" value="1" />
  189. <option name="endLine" value="464" />
  190. <option name="startColumn" value="1" />
  191. <option name="startLine" value="437" />
  192. </Range>
  193. </option>
  194. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py" />
  195. </CodebaseContextVariableValue>
  196. <CodebaseContextVariableValue>
  197. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\packaging\tags.py: # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled&#10;# extension modules is the best option.&#10;# https://github.com/pypa/pip/issues/3383#issuecomment-173267692&#10;has_ext = &quot;_d.pyd&quot; in EXTENSION_SUFFIXES&#10;if with_debug or (with_debug is None and (has_refcount or has_ext)):&#10; debug = &quot;d&quot;&#10;if py_version &lt; (3, 8):&#10; with_pymalloc = _get_config_var(&quot;WITH_PYMALLOC&quot;, warn)&#10; if with_pymalloc or with_pymalloc is None:&#10; pymalloc = &quot;m&quot;&#10; if py_version &lt; (3, 3):&#10; unicode_size = _get_config_var(&quot;Py_UNICODE_SIZE&quot;, warn)&#10; if unicode_size == 4 or (&#10; unicode_size is None and sys.maxunicode == 0x10FFFF&#10; ):&#10; ucs4 = &quot;u&quot;&#10;elif debug:&#10; # Debug builds can also load &quot;normal&quot; extension modules.&#10; # We can also assume no UCS-4 or pymalloc requirement.&#10; abis.append(f&quot;cp{version}&quot;)&#10;abis.insert(&#10; 0," />
  198. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/packaging/tags.py" />
  199. <option name="range">
  200. <Range>
  201. <option name="endColumn" value="1" />
  202. <option name="endLine" value="162" />
  203. <option name="startColumn" value="1" />
  204. <option name="startLine" value="141" />
  205. </Range>
  206. </option>
  207. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\packaging\tags.py" />
  208. </CodebaseContextVariableValue>
  209. <CodebaseContextVariableValue>
  210. <option name="chunk" value=".idea\CopilotChatHistory.xml: &lt;option name=&quot;chunk&quot; value=&quot;.venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: &amp;quot;AppDirs&amp;quot;,&amp;#10; &amp;quot;PlatformDirsABC&amp;quot;,&amp;#10; &amp;quot;user_data_dir&amp;quot;,&amp;#10; &amp;quot;user_config_dir&amp;quot;,&amp;#10; &amp;quot;user_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_state_dir&amp;quot;,&amp;#10; &amp;quot;user_log_dir&amp;quot;,&amp;#10; &amp;quot;user_documents_dir&amp;quot;,&amp;#10; &amp;quot;user_downloads_dir&amp;quot;,&amp;#10; &amp;quot;user_pictures_dir&amp;quot;,&amp;#10; &amp;quot;user_videos_dir&amp;quot;,&amp;#10; &amp;quot;user_music_dir&amp;quot;,&amp;#10; &amp;quot;user_runtime_dir&amp;quot;,&amp;#10; &amp;quot;site_data_dir&amp;quot;,&amp;#10; &amp;quot;site_config_dir&amp;quot;,&amp;#10; &amp;quot;site_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_data_path&amp;quot;,&amp;#10; &amp;quot;user_config_path&amp;quot;,&amp;#10; &amp;quot;user_cache_path&amp;quot;,&amp;#10; &amp;quot;user_state_path&amp;quot;,&amp;#10; &amp;quot;user_log_path&amp;quot;,&amp;#10; &amp;quot;user_documents_path&amp;quot;,&amp;#10; &amp;quot;user_downloads_path&amp;quot;,&amp;#10; &amp;quot;user_pictures_path&amp;quot;,&amp;#10;" />
  211. <option name="filePath" value="$PROJECT_DIR$/.idea/CopilotChatHistory.xml" />
  212. <option name="range">
  213. <Range>
  214. <option name="endColumn" value="1" />
  215. <option name="endLine" value="145" />
  216. <option name="startColumn" value="1" />
  217. <option name="startLine" value="145" />
  218. </Range>
  219. </option>
  220. <option name="relativePath" value=".idea\CopilotChatHistory.xml" />
  221. </CodebaseContextVariableValue>
  222. <CodebaseContextVariableValue>
  223. <option name="chunk" value=".idea\CopilotChatHistory.xml: &lt;option name=&quot;chunk&quot; value=&quot;.venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: &amp;quot;AppDirs&amp;quot;,&amp;#10; &amp;quot;PlatformDirsABC&amp;quot;,&amp;#10; &amp;quot;user_data_dir&amp;quot;,&amp;#10; &amp;quot;user_config_dir&amp;quot;,&amp;#10; &amp;quot;user_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_state_dir&amp;quot;,&amp;#10; &amp;quot;user_log_dir&amp;quot;,&amp;#10; &amp;quot;user_documents_dir&amp;quot;,&amp;#10; &amp;quot;user_downloads_dir&amp;quot;,&amp;#10; &amp;quot;user_pictures_dir&amp;quot;,&amp;#10; &amp;quot;user_videos_dir&amp;quot;,&amp;#10; &amp;quot;user_music_dir&amp;quot;,&amp;#10; &amp;quot;user_runtime_dir&amp;quot;,&amp;#10; &amp;quot;site_data_dir&amp;quot;,&amp;#10; &amp;quot;site_config_dir&amp;quot;,&amp;#10; &amp;quot;site_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_data_path&amp;quot;,&amp;#10; &amp;quot;user_config_path&amp;quot;,&amp;#10; &amp;quot;user_cache_path&amp;quot;,&amp;#10; &amp;quot;user_state_path&amp;quot;,&amp;#10; &amp;quot;user_log_path&amp;quot;,&amp;#10; &amp;quot;user_documents_path&amp;quot;,&amp;#10; &amp;quot;user_downloads_path&amp;quot;,&amp;#10; &amp;quot;user_pictures_path&amp;quot;,&amp;#10;" />
  224. <option name="filePath" value="$PROJECT_DIR$/.idea/CopilotChatHistory.xml" />
  225. <option name="range">
  226. <Range>
  227. <option name="endColumn" value="1" />
  228. <option name="endLine" value="520" />
  229. <option name="startColumn" value="1" />
  230. <option name="startLine" value="520" />
  231. </Range>
  232. </option>
  233. <option name="relativePath" value=".idea\CopilotChatHistory.xml" />
  234. </CodebaseContextVariableValue>
  235. <CodebaseContextVariableValue>
  236. <option name="chunk" value=".idea\CopilotChatHistory.xml: &lt;option name=&quot;chunk&quot; value=&quot;.venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: &amp;quot;AppDirs&amp;quot;,&amp;#10; &amp;quot;PlatformDirsABC&amp;quot;,&amp;#10; &amp;quot;user_data_dir&amp;quot;,&amp;#10; &amp;quot;user_config_dir&amp;quot;,&amp;#10; &amp;quot;user_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_state_dir&amp;quot;,&amp;#10; &amp;quot;user_log_dir&amp;quot;,&amp;#10; &amp;quot;user_documents_dir&amp;quot;,&amp;#10; &amp;quot;user_downloads_dir&amp;quot;,&amp;#10; &amp;quot;user_pictures_dir&amp;quot;,&amp;#10; &amp;quot;user_videos_dir&amp;quot;,&amp;#10; &amp;quot;user_music_dir&amp;quot;,&amp;#10; &amp;quot;user_runtime_dir&amp;quot;,&amp;#10; &amp;quot;site_data_dir&amp;quot;,&amp;#10; &amp;quot;site_config_dir&amp;quot;,&amp;#10; &amp;quot;site_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_data_path&amp;quot;,&amp;#10; &amp;quot;user_config_path&amp;quot;,&amp;#10; &amp;quot;user_cache_path&amp;quot;,&amp;#10; &amp;quot;user_state_path&amp;quot;,&amp;#10; &amp;quot;user_log_path&amp;quot;,&amp;#10; &amp;quot;user_documents_path&amp;quot;,&amp;#10; &amp;quot;user_downloads_path&amp;quot;,&amp;#10; &amp;quot;user_pictures_path&amp;quot;,&amp;#10;" />
  237. <option name="filePath" value="$PROJECT_DIR$/.idea/CopilotChatHistory.xml" />
  238. <option name="range">
  239. <Range>
  240. <option name="endColumn" value="1" />
  241. <option name="endLine" value="793" />
  242. <option name="startColumn" value="1" />
  243. <option name="startLine" value="793" />
  244. </Range>
  245. </option>
  246. <option name="relativePath" value=".idea\CopilotChatHistory.xml" />
  247. </CodebaseContextVariableValue>
  248. <CodebaseContextVariableValue>
  249. <option name="chunk" value=".idea\CopilotChatHistory.xml: &lt;option name=&quot;chunk&quot; value=&quot;.venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: &amp;quot;AppDirs&amp;quot;,&amp;#10; &amp;quot;PlatformDirsABC&amp;quot;,&amp;#10; &amp;quot;user_data_dir&amp;quot;,&amp;#10; &amp;quot;user_config_dir&amp;quot;,&amp;#10; &amp;quot;user_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_state_dir&amp;quot;,&amp;#10; &amp;quot;user_log_dir&amp;quot;,&amp;#10; &amp;quot;user_documents_dir&amp;quot;,&amp;#10; &amp;quot;user_downloads_dir&amp;quot;,&amp;#10; &amp;quot;user_pictures_dir&amp;quot;,&amp;#10; &amp;quot;user_videos_dir&amp;quot;,&amp;#10; &amp;quot;user_music_dir&amp;quot;,&amp;#10; &amp;quot;user_runtime_dir&amp;quot;,&amp;#10; &amp;quot;site_data_dir&amp;quot;,&amp;#10; &amp;quot;site_config_dir&amp;quot;,&amp;#10; &amp;quot;site_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_data_path&amp;quot;,&amp;#10; &amp;quot;user_config_path&amp;quot;,&amp;#10; &amp;quot;user_cache_path&amp;quot;,&amp;#10; &amp;quot;user_state_path&amp;quot;,&amp;#10; &amp;quot;user_log_path&amp;quot;,&amp;#10; &amp;quot;user_documents_path&amp;quot;,&amp;#10; &amp;quot;user_downloads_path&amp;quot;,&amp;#10; &amp;quot;user_pictures_path&amp;quot;,&amp;#10;" />
  250. <option name="filePath" value="$PROJECT_DIR$/.idea/CopilotChatHistory.xml" />
  251. <option name="range">
  252. <Range>
  253. <option name="endColumn" value="1" />
  254. <option name="endLine" value="1203" />
  255. <option name="startColumn" value="1" />
  256. <option name="startLine" value="1203" />
  257. </Range>
  258. </option>
  259. <option name="relativePath" value=".idea\CopilotChatHistory.xml" />
  260. </CodebaseContextVariableValue>
  261. <CodebaseContextVariableValue>
  262. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\unix.py: return self._append_app_name_and_version(path)&#10;@property&#10;def site_cache_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: cache directory shared by users, e.g. ``/var/tmp/$appname/$version``&quot;&quot;&quot;&#10; return self._append_app_name_and_version(&quot;/var/tmp&quot;) # noqa: S108&#10;@property&#10;def user_state_dir(self) -&gt; str:&#10; &quot;&quot;&quot;&#10; :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or&#10; ``$XDG_STATE_HOME/$appname/$version``&#10; &quot;&quot;&quot;&#10; path = os.environ.get(&quot;XDG_STATE_HOME&quot;, &quot;&quot;)&#10; if not path.strip():&#10; path = os.path.expanduser(&quot;~/.local/state&quot;) # noqa: PTH111&#10; return self._append_app_name_and_version(path)&#10;@property&#10;def user_log_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in it&quot;&quot;&quot;&#10; path = self.user_state_dir" />
  263. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/unix.py" />
  264. <option name="range">
  265. <Range>
  266. <option name="endColumn" value="1" />
  267. <option name="endLine" value="119" />
  268. <option name="startColumn" value="1" />
  269. <option name="startLine" value="98" />
  270. </Range>
  271. </option>
  272. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\unix.py" />
  273. </CodebaseContextVariableValue>
  274. <CodebaseContextVariableValue>
  275. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\rich\_log_render.py: log_time_display = time_format(log_time)&#10; else:&#10; log_time_display = Text(log_time.strftime(time_format))&#10; if log_time_display == self._last_time and self.omit_repeated_times:&#10; row.append(Text(&quot; &quot; * len(log_time_display)))&#10; else:&#10; row.append(log_time_display)&#10; self._last_time = log_time_display&#10;if self.show_level:&#10; row.append(level)&#10;row.append(Renderables(renderables))&#10;if self.show_path and path:&#10; path_text = Text()&#10; path_text.append(&#10; path, style=f&quot;link file://{link_path}&quot; if link_path else &quot;&quot;&#10; )&#10; if line_no:&#10; path_text.append(&quot;:&quot;)&#10; path_text.append(&#10; f&quot;{line_no}&quot;,&#10; style=f&quot;link file://{link_path}#{line_no}&quot; if link_path else &quot;&quot;,&#10; )&#10; row.append(path_text)&#10;output.add_row(*row)&#10;return output" />
  276. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/rich/_log_render.py" />
  277. <option name="range">
  278. <Range>
  279. <option name="endColumn" value="1" />
  280. <option name="endLine" value="86" />
  281. <option name="startColumn" value="1" />
  282. <option name="startLine" value="60" />
  283. </Range>
  284. </option>
  285. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\rich\_log_render.py" />
  286. </CodebaseContextVariableValue>
  287. <CodebaseContextVariableValue>
  288. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py: should have the signature ``fn(input_string: str, location: int, expression: ParserElement, exception: Exception, cache_hit: bool)``&#10; &quot;&quot;&quot;&#10; self.debugActions = self.DebugActions(&#10; start_action or _default_start_debug_action, # type: ignore[truthy-function]&#10; success_action or _default_success_debug_action, # type: ignore[truthy-function]&#10; exception_action or _default_exception_debug_action, # type: ignore[truthy-function]&#10; )&#10; self.debug = True&#10; return self&#10;def set_debug(self, flag: bool = True, recurse: bool = False) -&gt; &quot;ParserElement&quot;:&#10; &quot;&quot;&quot;&#10; Enable display of debugging messages while doing pattern matching.&#10; Set ``flag`` to ``True`` to enable, ``False`` to disable.&#10; Set ``recurse`` to ``True`` to set the debug flag on this expression and all sub-expressions.&#10; Example::&#10; wd = Word(alphas).set_name(&quot;alphaword&quot;)&#10; integer = Word(nums).set_name(&quot;numword&quot;)&#10; term = wd | integer&#10; # turn on debugging for wd" />
  289. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/pyparsing/core.py" />
  290. <option name="range">
  291. <Range>
  292. <option name="endColumn" value="1" />
  293. <option name="endLine" value="1824" />
  294. <option name="startColumn" value="1" />
  295. <option name="startLine" value="1802" />
  296. </Range>
  297. </option>
  298. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py" />
  299. </CodebaseContextVariableValue>
  300. <CodebaseContextVariableValue>
  301. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\utils\logging.py: import contextlib&#10;import errno&#10;import logging&#10;import logging.handlers&#10;import os&#10;import sys&#10;import threading&#10;from dataclasses import dataclass&#10;from io import TextIOWrapper&#10;from logging import Filter&#10;from typing import Any, ClassVar, Generator, List, Optional, TextIO, Type&#10;from pip._vendor.rich.console import (&#10; Console,&#10; ConsoleOptions,&#10; ConsoleRenderable,&#10; RenderableType,&#10; RenderResult,&#10; RichCast,&#10;)&#10;from pip._vendor.rich.highlighter import NullHighlighter&#10;from pip._vendor.rich.logging import RichHandler&#10;from pip._vendor.rich.segment import Segment&#10;from pip._vendor.rich.style import Style&#10;from pip._internal.utils._log import VERBOSE, getLogger&#10;from pip._internal.utils.compat import WINDOWS&#10;from pip._internal.utils.deprecation import DEPRECATION_MSG_PREFIX&#10;from pip._internal.utils.misc import ensure_dir&#10;_log_state = threading.local()&#10;subprocess_logger = getLogger(&quot;pip.subprocessor&quot;)&#10;class BrokenStdoutLoggingError(Exception):&#10; &quot;&quot;&quot;&#10; Raised if BrokenPipeError occurs for the stdout stream while logging.&#10; &quot;&quot;&quot;&#10;def _is_broken_pipe_error(exc_class: Type[BaseException], exc: BaseException) -&gt; bool:&#10; if exc_class is BrokenPipeError:&#10; return True" />
  302. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/utils/logging.py" />
  303. <option name="range">
  304. <Range>
  305. <option name="endColumn" value="1" />
  306. <option name="endLine" value="43" />
  307. <option name="startColumn" value="1" />
  308. <option name="startLine" value="1" />
  309. </Range>
  310. </option>
  311. <option name="relativePath" value=".venv\Lib\site-packages\pip\_internal\utils\logging.py" />
  312. </CodebaseContextVariableValue>
  313. <CodebaseContextVariableValue>
  314. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\windows.py: &quot;&quot;&quot;:return: downloads directory tied to the user e.g. ``%USERPROFILE%\\Downloads``&quot;&quot;&quot;&#10; return os.path.normpath(get_win_folder(&quot;CSIDL_DOWNLOADS&quot;))&#10;@property&#10;def user_pictures_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: pictures directory tied to the user e.g. ``%USERPROFILE%\\Pictures``&quot;&quot;&quot;&#10; return os.path.normpath(get_win_folder(&quot;CSIDL_MYPICTURES&quot;))&#10;@property&#10;def user_videos_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: videos directory tied to the user e.g. ``%USERPROFILE%\\Videos``&quot;&quot;&quot;&#10; return os.path.normpath(get_win_folder(&quot;CSIDL_MYVIDEO&quot;))&#10;@property&#10;def user_music_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: music directory tied to the user e.g. ``%USERPROFILE%\\Music``&quot;&quot;&quot;&#10; return os.path.normpath(get_win_folder(&quot;CSIDL_MYMUSIC&quot;))&#10;@property&#10;def user_runtime_dir(self) -&gt; str:&#10; &quot;&quot;&quot;&#10; :return: runtime directory tied to the user, e.g.&#10; ``%USERPROFILE%\\AppData\\Local\\Temp\\$appauthor\\$appname``&#10; &quot;&quot;&quot;" />
  315. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/windows.py" />
  316. <option name="range">
  317. <Range>
  318. <option name="endColumn" value="1" />
  319. <option name="endLine" value="130" />
  320. <option name="startColumn" value="1" />
  321. <option name="startLine" value="107" />
  322. </Range>
  323. </option>
  324. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\windows.py" />
  325. </CodebaseContextVariableValue>
  326. <CodebaseContextVariableValue>
  327. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py: def streamline(self) -&gt; ParserElement:&#10; if not self.streamlined:&#10; self.streamlined = True&#10; if self.expr is not None:&#10; self.expr.streamline()&#10; return self&#10;def validate(self, validateTrace=None) -&gt; None:&#10; warnings.warn(&#10; &quot;ParserElement.validate() is deprecated, and should not be used to check for left recursion&quot;,&#10; DeprecationWarning,&#10; stacklevel=2,&#10; )&#10; if validateTrace is None:&#10; validateTrace = []&#10; if self not in validateTrace:&#10; tmp = validateTrace[:] + [self]&#10; if self.expr is not None:&#10; self.expr.validate(tmp)&#10; self._checkRecursion([])&#10;def _generateDefaultName(self) -&gt; str:&#10; # Avoid infinite recursion by setting a temporary _defaultName&#10; self._defaultName = &quot;: ...&quot;&#10; # Use the string representation of main expression.&#10; retString = &quot;...&quot;&#10; try:&#10; if self.expr is not None:&#10; retString = str(self.expr)[:1000]&#10; else:&#10; retString = &quot;None&quot;&#10; finally:&#10; return self.__class__.__name__ + &quot;: &quot; + retString&#10;def copy(self) -&gt; ParserElement:&#10; if self.expr is not None:" />
  328. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/pyparsing/core.py" />
  329. <option name="range">
  330. <Range>
  331. <option name="endColumn" value="1" />
  332. <option name="endLine" value="5599" />
  333. <option name="startColumn" value="1" />
  334. <option name="startLine" value="5562" />
  335. </Range>
  336. </option>
  337. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py" />
  338. </CodebaseContextVariableValue>
  339. <CodebaseContextVariableValue>
  340. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\utils\logging.py: &quot;console_errors&quot;: {&#10; &quot;level&quot;: &quot;WARNING&quot;,&#10; &quot;class&quot;: handler_classes[&quot;stream&quot;],&#10; &quot;no_color&quot;: no_color,&#10; &quot;stream&quot;: log_streams[&quot;stderr&quot;],&#10; &quot;filters&quot;: [&quot;exclude_subprocess&quot;],&#10; &quot;formatter&quot;: &quot;indent&quot;,&#10; },&#10; # A handler responsible for logging to the console messages&#10; # from the &quot;subprocessor&quot; logger.&#10; &quot;console_subprocess&quot;: {&#10; &quot;level&quot;: level,&#10; &quot;class&quot;: handler_classes[&quot;stream&quot;],&#10; &quot;stream&quot;: log_streams[&quot;stderr&quot;],&#10; &quot;no_color&quot;: no_color,&#10; &quot;filters&quot;: [&quot;restrict_to_subprocess&quot;],&#10; &quot;formatter&quot;: &quot;indent&quot;,&#10; },&#10; &quot;user_log&quot;: {&#10; &quot;level&quot;: &quot;DEBUG&quot;,&#10; &quot;class&quot;: handler_classes[&quot;file&quot;],&#10; &quot;filename&quot;: additional_log_file,&#10; &quot;encoding&quot;: &quot;utf-8&quot;,&#10; &quot;delay&quot;: True,&#10; &quot;formatter&quot;: &quot;indent_with_timestamp&quot;,&#10; },&#10; },&#10; &quot;root&quot;: {&#10; &quot;level&quot;: root_level,&#10; &quot;handlers&quot;: handlers,&#10; },&#10; &quot;loggers&quot;: {&quot;pip._vendor&quot;: {&quot;level&quot;: vendored_log_level}},&#10;}" />
  341. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/utils/logging.py" />
  342. <option name="range">
  343. <Range>
  344. <option name="endColumn" value="1" />
  345. <option name="endLine" value="345" />
  346. <option name="startColumn" value="1" />
  347. <option name="startLine" value="313" />
  348. </Range>
  349. </option>
  350. <option name="relativePath" value=".venv\Lib\site-packages\pip\_internal\utils\logging.py" />
  351. </CodebaseContextVariableValue>
  352. <CodebaseContextVariableValue>
  353. <option name="chunk" value=".venv\Lib\site-packages\uvicorn\config.py: from __future__ import annotations&#10;import asyncio&#10;import inspect&#10;import json&#10;import logging&#10;import logging.config&#10;import os&#10;import socket&#10;import ssl&#10;import sys&#10;from collections.abc import Awaitable&#10;from configparser import RawConfigParser&#10;from pathlib import Path&#10;from typing import IO, Any, Callable, Literal&#10;import click&#10;from uvicorn._types import ASGIApplication&#10;from uvicorn.importer import ImportFromStringError, import_from_string&#10;from uvicorn.logging import TRACE_LOG_LEVEL&#10;from uvicorn.middleware.asgi2 import ASGI2Middleware&#10;from uvicorn.middleware.message_logger import MessageLoggerMiddleware&#10;from uvicorn.middleware.proxy_headers import ProxyHeadersMiddleware&#10;from uvicorn.middleware.wsgi import WSGIMiddleware&#10;HTTPProtocolType = Literal[&quot;auto&quot;, &quot;h11&quot;, &quot;httptools&quot;]&#10;WSProtocolType = Literal[&quot;auto&quot;, &quot;none&quot;, &quot;websockets&quot;, &quot;wsproto&quot;]&#10;LifespanType = Literal[&quot;auto&quot;, &quot;on&quot;, &quot;off&quot;]&#10;LoopSetupType = Literal[&quot;none&quot;, &quot;auto&quot;, &quot;asyncio&quot;, &quot;uvloop&quot;]&#10;InterfaceType = Literal[&quot;auto&quot;, &quot;asgi3&quot;, &quot;asgi2&quot;, &quot;wsgi&quot;]&#10;LOG_LEVELS: dict[str, int] = {&#10; &quot;critical&quot;: logging.CRITICAL,&#10; &quot;error&quot;: logging.ERROR,&#10; &quot;warning&quot;: logging.WARNING,&#10; &quot;info&quot;: logging.INFO,&#10; &quot;debug&quot;: logging.DEBUG," />
  354. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/uvicorn/config.py" />
  355. <option name="range">
  356. <Range>
  357. <option name="endColumn" value="1" />
  358. <option name="endLine" value="38" />
  359. <option name="startColumn" value="1" />
  360. <option name="startLine" value="1" />
  361. </Range>
  362. </option>
  363. <option name="relativePath" value=".venv\Lib\site-packages\uvicorn\config.py" />
  364. </CodebaseContextVariableValue>
  365. <CodebaseContextVariableValue>
  366. <option name="chunk" value=".venv\Lib\site-packages\httpcore\_trace.py: info = {&quot;return_value&quot;: self.return_value}&#10; self.trace(f&quot;{self.name}.complete&quot;, info)&#10; else:&#10; info = {&quot;exception&quot;: exc_value}&#10; self.trace(f&quot;{self.name}.failed&quot;, info)&#10;async def atrace(self, name: str, info: dict[str, typing.Any]) -&gt; None:&#10; if self.trace_extension is not None:&#10; prefix_and_name = f&quot;{self.prefix}.{name}&quot;&#10; coro = self.trace_extension(prefix_and_name, info)&#10; if not inspect.iscoroutine(coro): # pragma: no cover&#10; raise TypeError(&#10; &quot;If you're using an asynchronous interface, &quot;&#10; &quot;the callback of the `trace` extension should &quot;&#10; &quot;be an asynchronous function rather than a normal function.&quot;&#10; )&#10; await coro&#10; if self.debug:&#10; if not info or &quot;return_value&quot; in info and info[&quot;return_value&quot;] is None:&#10; message = name&#10; else:&#10; args = &quot; &quot;.join([f&quot;{key}={value!r}&quot; for key, value in info.items()])" />
  367. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/httpcore/_trace.py" />
  368. <option name="range">
  369. <Range>
  370. <option name="endColumn" value="1" />
  371. <option name="endLine" value="85" />
  372. <option name="startColumn" value="1" />
  373. <option name="startLine" value="63" />
  374. </Range>
  375. </option>
  376. <option name="relativePath" value=".venv\Lib\site-packages\httpcore\_trace.py" />
  377. </CodebaseContextVariableValue>
  378. <CodebaseContextVariableValue>
  379. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\rich\default_styles.py: &quot;layout.tree.column&quot;: Style(dim=False, color=&quot;blue&quot;),&#10;&quot;logging.keyword&quot;: Style(bold=True, color=&quot;yellow&quot;),&#10;&quot;logging.level.notset&quot;: Style(dim=True),&#10;&quot;logging.level.debug&quot;: Style(color=&quot;green&quot;),&#10;&quot;logging.level.info&quot;: Style(color=&quot;blue&quot;),&#10;&quot;logging.level.warning&quot;: Style(color=&quot;red&quot;),&#10;&quot;logging.level.error&quot;: Style(color=&quot;red&quot;, bold=True),&#10;&quot;logging.level.critical&quot;: Style(color=&quot;red&quot;, bold=True, reverse=True),&#10;&quot;log.level&quot;: Style.null(),&#10;&quot;log.time&quot;: Style(color=&quot;cyan&quot;, dim=True),&#10;&quot;log.message&quot;: Style.null(),&#10;&quot;log.path&quot;: Style(dim=True),&#10;&quot;repr.ellipsis&quot;: Style(color=&quot;yellow&quot;),&#10;&quot;repr.indent&quot;: Style(color=&quot;green&quot;, dim=True),&#10;&quot;repr.error&quot;: Style(color=&quot;red&quot;, bold=True),&#10;&quot;repr.str&quot;: Style(color=&quot;green&quot;, italic=False, bold=False)," />
  380. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/rich/default_styles.py" />
  381. <option name="range">
  382. <Range>
  383. <option name="endColumn" value="1" />
  384. <option name="endLine" value="67" />
  385. <option name="startColumn" value="1" />
  386. <option name="startLine" value="52" />
  387. </Range>
  388. </option>
  389. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\rich\default_styles.py" />
  390. </CodebaseContextVariableValue>
  391. <CodebaseContextVariableValue>
  392. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\android.py: &quot;&quot;&quot;:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``&quot;&quot;&quot;&#10; return _android_pictures_folder()&#10; @property&#10; def user_videos_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``&quot;&quot;&quot;&#10; return _android_videos_folder()&#10; @property&#10; def user_music_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``&quot;&quot;&quot;&#10; return _android_music_folder()&#10; @property&#10; def user_runtime_dir(self) -&gt; str:&#10; &quot;&quot;&quot;&#10; :return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,&#10; e.g. ``/data/user/&lt;userid&gt;/&lt;packagename&gt;/cache/&lt;AppName&gt;/tmp``&#10; &quot;&quot;&quot;&#10; path = self.user_cache_dir&#10; if self.opinion:&#10; path = os.path.join(path, &quot;tmp&quot;) # noqa: PTH118&#10; return path&#10;@lru_cache(maxsize=1)" />
  393. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/android.py" />
  394. <option name="range">
  395. <Range>
  396. <option name="endColumn" value="1" />
  397. <option name="endLine" value="107" />
  398. <option name="startColumn" value="1" />
  399. <option name="startLine" value="82" />
  400. </Range>
  401. </option>
  402. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\android.py" />
  403. </CodebaseContextVariableValue>
  404. <CodebaseContextVariableValue>
  405. <option name="chunk" value=".venv\Lib\site-packages\uvicorn\config.py: &quot;wsgi&quot;: &quot;3.0&quot;,&#10; }&#10; return mapping[self.interface]&#10;@property&#10;def is_ssl(self) -&gt; bool:&#10; return bool(self.ssl_keyfile or self.ssl_certfile)&#10;@property&#10;def use_subprocess(self) -&gt; bool:&#10; return bool(self.reload or self.workers &gt; 1)&#10;def configure_logging(self) -&gt; None:&#10; logging.addLevelName(TRACE_LOG_LEVEL, &quot;TRACE&quot;)&#10; if self.log_config is not None:&#10; if isinstance(self.log_config, dict):&#10; if self.use_colors in (True, False):&#10; self.log_config[&quot;formatters&quot;][&quot;default&quot;][&quot;use_colors&quot;] = self.use_colors&#10; self.log_config[&quot;formatters&quot;][&quot;access&quot;][&quot;use_colors&quot;] = self.use_colors&#10; logging.config.dictConfig(self.log_config)&#10; elif isinstance(self.log_config, str) and self.log_config.endswith(&quot;.json&quot;):&#10; with open(self.log_config) as file:&#10; loaded_config = json.load(file)" />
  406. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/uvicorn/config.py" />
  407. <option name="range">
  408. <Range>
  409. <option name="endColumn" value="1" />
  410. <option name="endLine" value="369" />
  411. <option name="startColumn" value="1" />
  412. <option name="startLine" value="346" />
  413. </Range>
  414. </option>
  415. <option name="relativePath" value=".venv\Lib\site-packages\uvicorn\config.py" />
  416. </CodebaseContextVariableValue>
  417. <CodebaseContextVariableValue>
  418. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: :param appname: See `appname &lt;platformdirs.api.PlatformDirsABC.appname&gt;`.&#10; :param appauthor: See `appauthor &lt;platformdirs.api.PlatformDirsABC.appauthor&gt;`.&#10; :param version: See `version &lt;platformdirs.api.PlatformDirsABC.version&gt;`.&#10; :param opinion: See `roaming &lt;platformdirs.api.PlatformDirsABC.opinion&gt;`.&#10; :param ensure_exists: See `ensure_exists &lt;platformdirs.api.PlatformDirsABC.ensure_exists&gt;`.&#10; :returns: log directory tied to the user&#10; &quot;&quot;&quot;&#10; return PlatformDirs(&#10; appname=appname,&#10; appauthor=appauthor,&#10; version=version,&#10; opinion=opinion,&#10; ensure_exists=ensure_exists,&#10; ).user_log_dir&#10;def user_documents_dir() -&gt; str:&#10; &quot;&quot;&quot;:returns: documents directory tied to the user&quot;&quot;&quot;&#10; return PlatformDirs().user_documents_dir&#10;def user_downloads_dir() -&gt; str:&#10; &quot;&quot;&quot;:returns: downloads directory tied to the user&quot;&quot;&quot;&#10; return PlatformDirs().user_downloads_dir&#10;def user_pictures_dir() -&gt; str:&#10; &quot;&quot;&quot;:returns: pictures directory tied to the user&quot;&quot;&quot;&#10; return PlatformDirs().user_pictures_dir&#10;def user_videos_dir() -&gt; str:" />
  419. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py" />
  420. <option name="range">
  421. <Range>
  422. <option name="endColumn" value="1" />
  423. <option name="endLine" value="257" />
  424. <option name="startColumn" value="1" />
  425. <option name="startLine" value="226" />
  426. </Range>
  427. </option>
  428. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py" />
  429. </CodebaseContextVariableValue>
  430. <CodebaseContextVariableValue>
  431. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py: super().ignore(other)&#10; if self.expr is not None:&#10; self.expr.ignore(self.ignoreExprs[-1])&#10; else:&#10; super().ignore(other)&#10; if self.expr is not None:&#10; self.expr.ignore(self.ignoreExprs[-1])&#10; return self&#10;def streamline(self) -&gt; ParserElement:&#10; super().streamline()&#10; if self.expr is not None:&#10; self.expr.streamline()&#10; return self&#10;def _checkRecursion(self, parseElementList):&#10; if self in parseElementList:&#10; raise RecursiveGrammarException(parseElementList + [self])&#10; subRecCheckList = parseElementList[:] + [self]&#10; if self.expr is not None:&#10; self.expr._checkRecursion(subRecCheckList)&#10;def validate(self, validateTrace=None) -&gt; None:&#10; warnings.warn(&#10; &quot;ParserElement.validate() is deprecated, and should not be used to check for left recursion&quot;,&#10; DeprecationWarning,&#10; stacklevel=2,&#10; )&#10; if validateTrace is None:&#10; validateTrace = []&#10; tmp = validateTrace[:] + [self]&#10; if self.expr is not None:&#10; self.expr.validate(tmp)&#10; self._checkRecursion([])&#10;def _generateDefaultName(self) -&gt; str:" />
  432. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/pyparsing/core.py" />
  433. <option name="range">
  434. <Range>
  435. <option name="endColumn" value="1" />
  436. <option name="endLine" value="4611" />
  437. <option name="startColumn" value="1" />
  438. <option name="startLine" value="4576" />
  439. </Range>
  440. </option>
  441. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py" />
  442. </CodebaseContextVariableValue>
  443. <CodebaseContextVariableValue>
  444. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\rich\traceback.py: filename: str&#10; line: str&#10; lineno: int&#10; msg: str&#10;@dataclass&#10;class Stack:&#10; exc_type: str&#10; exc_value: str&#10; syntax_error: Optional[_SyntaxError] = None&#10; is_cause: bool = False&#10; frames: List[Frame] = field(default_factory=list)&#10;@dataclass&#10;class Trace:&#10; stacks: List[Stack]&#10;class PathHighlighter(RegexHighlighter):&#10; highlights = [r&quot;(?P&lt;dim&gt;.*/)(?P&lt;bold&gt;.+)&quot;]&#10;class Traceback:&#10; &quot;&quot;&quot;A Console renderable that renders a traceback.&#10; Args:&#10; trace (Trace, optional): A `Trace` object produced from `extract`. Defaults to None, which uses&#10; the last exception.&#10; width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.&#10; extra_lines (int, optional): Additional lines of code to render. Defaults to 3.&#10; theme (str, optional): Override pygments theme used in traceback.&#10; word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.&#10; show_locals (bool, optional): Enable display of local variables. Defaults to False." />
  445. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/rich/traceback.py" />
  446. <option name="range">
  447. <Range>
  448. <option name="endColumn" value="1" />
  449. <option name="endLine" value="221" />
  450. <option name="startColumn" value="1" />
  451. <option name="startLine" value="187" />
  452. </Range>
  453. </option>
  454. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\rich\traceback.py" />
  455. </CodebaseContextVariableValue>
  456. <CodebaseContextVariableValue>
  457. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\windows.py: path = os.path.normpath(get_win_folder(&quot;CSIDL_COMMON_APPDATA&quot;))&#10; return self._append_parts(path, opinion_value=&quot;Cache&quot;)&#10;@property&#10;def user_state_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: state directory tied to the user, same as `user_data_dir`&quot;&quot;&quot;&#10; return self.user_data_dir&#10;@property&#10;def user_log_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it&quot;&quot;&quot;&#10; path = self.user_data_dir&#10; if self.opinion:&#10; path = os.path.join(path, &quot;Logs&quot;) # noqa: PTH118&#10; self._optionally_create_directory(path)&#10; return path&#10;@property&#10;def user_documents_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: documents directory tied to the user e.g. ``%USERPROFILE%\\Documents``&quot;&quot;&quot;&#10; return os.path.normpath(get_win_folder(&quot;CSIDL_PERSONAL&quot;))&#10;@property&#10;def user_downloads_dir(self) -&gt; str:" />
  458. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/windows.py" />
  459. <option name="range">
  460. <Range>
  461. <option name="endColumn" value="1" />
  462. <option name="endLine" value="106" />
  463. <option name="startColumn" value="1" />
  464. <option name="startLine" value="83" />
  465. </Range>
  466. </option>
  467. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\windows.py" />
  468. </CodebaseContextVariableValue>
  469. <CodebaseContextVariableValue>
  470. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\rich\logging.py: import logging&#10;from datetime import datetime&#10;from logging import Handler, LogRecord&#10;from pathlib import Path&#10;from types import ModuleType&#10;from typing import ClassVar, Iterable, List, Optional, Type, Union&#10;from pip._vendor.rich._null_file import NullFile&#10;from . import get_console&#10;from ._log_render import FormatTimeCallable, LogRender&#10;from .console import Console, ConsoleRenderable&#10;from .highlighter import Highlighter, ReprHighlighter&#10;from .text import Text&#10;from .traceback import Traceback&#10;class RichHandler(Handler):&#10; &quot;&quot;&quot;A logging handler that renders output with Rich. The time / level / message and file are displayed in columns.&#10; The level is color coded, and the message is syntax highlighted.&#10; Note:&#10; Be careful when enabling console markup in log messages if you have configured logging for libraries not&#10; under your control. If a dependency writes messages containing square brackets, it may not produce the intended output.&#10; Args:&#10; level (Union[int, str], optional): Log level. Defaults to logging.NOTSET.&#10; console (:class:`~rich.console.Console`, optional): Optional console instance to write logs.&#10; Default will use a global console instance writing to stdout.&#10; show_time (bool, optional): Show a column for the time. Defaults to True." />
  471. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/rich/logging.py" />
  472. <option name="range">
  473. <Range>
  474. <option name="endColumn" value="1" />
  475. <option name="endLine" value="30" />
  476. <option name="startColumn" value="1" />
  477. <option name="startLine" value="1" />
  478. </Range>
  479. </option>
  480. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\rich\logging.py" />
  481. </CodebaseContextVariableValue>
  482. </list>
  483. </option>
  484. <option name="codebaseReferences">
  485. <list>
  486. <KnowledgeReference>
  487. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\rich\console.py: self._force_terminal = None&#10;if force_terminal is not None:&#10; self._force_terminal = force_terminal&#10;self._file = file&#10;self.quiet = quiet&#10;self.stderr = stderr&#10;if color_system is None:&#10; self._color_system = None&#10;elif color_system == &quot;auto&quot;:&#10; self._color_system = self._detect_color_system()&#10;else:&#10; self._color_system = COLOR_SYSTEMS[color_system]&#10;self._lock = threading.RLock()&#10;self._log_render = LogRender(&#10; show_time=log_time,&#10; show_path=log_path,&#10; time_format=log_time_format,&#10;)&#10;self.highlighter: HighlighterType = highlighter or _null_highlighter&#10;self.safe_box = safe_box&#10;self.get_datetime = get_datetime or datetime.now&#10;self.get_time = get_time or monotonic&#10;self.style = style&#10;self.no_color = (&#10; no_color if no_color is not None else &quot;NO_COLOR&quot; in self._environ&#10;)&#10;self.is_interactive = (" />
  488. <option name="metadata">
  489. <KnowledgeReferenceMetadata>
  490. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/rich/console.py" />
  491. </KnowledgeReferenceMetadata>
  492. </option>
  493. </KnowledgeReference>
  494. <KnowledgeReference>
  495. <option name="chunk" value=".venv\Lib\site-packages\pymysql\constants\ER.py: PROCACCESS_DENIED_ERROR = 1370&#10;RELAY_LOG_FAIL = 1371&#10;PASSWD_LENGTH = 1372&#10;UNKNOWN_TARGET_BINLOG = 1373&#10;IO_ERR_LOG_INDEX_READ = 1374&#10;BINLOG_PURGE_PROHIBITED = 1375&#10;FSEEK_FAIL = 1376&#10;BINLOG_PURGE_FATAL_ERR = 1377&#10;LOG_IN_USE = 1378&#10;LOG_PURGE_UNKNOWN_ERR = 1379&#10;RELAY_LOG_INIT = 1380&#10;NO_BINARY_LOGGING = 1381&#10;RESERVED_SYNTAX = 1382&#10;WSAS_FAILED = 1383&#10;DIFF_GROUPS_PROC = 1384&#10;NO_GROUP_FOR_PROC = 1385&#10;ORDER_WITH_PROC = 1386&#10;LOGGING_PROHIBIT_CHANGING_OF = 1387&#10;NO_FILE_MAPPING = 1388&#10;WRONG_MAGIC = 1389&#10;PS_MANY_PARAM = 1390&#10;KEY_PART_0 = 1391&#10;VIEW_CHECKSUM = 1392&#10;VIEW_MULTIUPDATE = 1393&#10;VIEW_NO_INSERT_FIELD_LIST = 1394&#10;VIEW_DELETE_MERGE_VIEW = 1395&#10;CANNOT_USER = 1396&#10;XAER_NOTA = 1397&#10;XAER_INVAL = 1398&#10;XAER_RMFAIL = 1399&#10;XAER_OUTSIDE = 1400&#10;XAER_RMERR = 1401&#10;XA_RBROLLBACK = 1402&#10;NONEXISTING_PROC_GRANT = 1403&#10;PROC_AUTO_GRANT_FAIL = 1404&#10;PROC_AUTO_REVOKE_FAIL = 1405" />
  496. <option name="metadata">
  497. <KnowledgeReferenceMetadata>
  498. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pymysql/constants/ER.py" />
  499. </KnowledgeReferenceMetadata>
  500. </option>
  501. </KnowledgeReference>
  502. <KnowledgeReference>
  503. <option name="chunk" value=".venv\Lib\site-packages\uvicorn\workers.py: logger.handlers = self.log.access_log.handlers&#10;logger.setLevel(self.log.access_log.level)&#10;logger.propagate = False&#10;config_kwargs: dict = {&#10; &quot;app&quot;: None,&#10; &quot;log_config&quot;: None,&#10; &quot;timeout_keep_alive&quot;: self.cfg.keepalive,&#10; &quot;timeout_notify&quot;: self.timeout,&#10; &quot;callback_notify&quot;: self.callback_notify,&#10; &quot;limit_max_requests&quot;: self.max_requests,&#10; &quot;forwarded_allow_ips&quot;: self.cfg.forwarded_allow_ips,&#10;}&#10;if self.cfg.is_ssl:&#10; ssl_kwargs = {&#10; &quot;ssl_keyfile&quot;: self.cfg.ssl_options.get(&quot;keyfile&quot;),&#10; &quot;ssl_certfile&quot;: self.cfg.ssl_options.get(&quot;certfile&quot;),&#10; &quot;ssl_keyfile_password&quot;: self.cfg.ssl_options.get(&quot;password&quot;),&#10; &quot;ssl_version&quot;: self.cfg.ssl_options.get(&quot;ssl_version&quot;),&#10; &quot;ssl_cert_reqs&quot;: self.cfg.ssl_options.get(&quot;cert_reqs&quot;)," />
  504. <option name="metadata">
  505. <KnowledgeReferenceMetadata>
  506. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/uvicorn/workers.py" />
  507. </KnowledgeReferenceMetadata>
  508. </option>
  509. </KnowledgeReference>
  510. <KnowledgeReference>
  511. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\android.py: &quot;&quot;&quot;:return: state directory tied to the user, same as `user_data_dir`&quot;&quot;&quot;&#10; return self.user_data_dir&#10;@property&#10;def user_log_dir(self) -&gt; str:&#10; &quot;&quot;&quot;&#10; :return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,&#10; e.g. ``/data/user/&lt;userid&gt;/&lt;packagename&gt;/cache/&lt;AppName&gt;/log``&#10; &quot;&quot;&quot;&#10; path = self.user_cache_dir&#10; if self.opinion:&#10; path = os.path.join(path, &quot;log&quot;) # noqa: PTH118&#10; return path&#10;@property&#10;def user_documents_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``&quot;&quot;&quot;&#10; return _android_documents_folder()&#10;@property&#10;def user_downloads_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``&quot;&quot;&quot;&#10; return _android_downloads_folder()&#10;@property&#10;def user_pictures_dir(self) -&gt; str:" />
  512. <option name="metadata">
  513. <KnowledgeReferenceMetadata>
  514. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/android.py" />
  515. </KnowledgeReferenceMetadata>
  516. </option>
  517. </KnowledgeReference>
  518. <KnowledgeReference>
  519. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py: self.debugActions.debug_try(instring, loc, self, cache_hit=True) # type: ignore [call-arg]&#10; except TypeError:&#10; pass&#10; if isinstance(value, Exception):&#10; if self.debug and self.debugActions.debug_fail:&#10; try:&#10; self.debugActions.debug_fail(&#10; instring, loc, self, value, cache_hit=True # type: ignore [call-arg]&#10; )&#10; except TypeError:&#10; pass&#10; raise value&#10; value = cast(Tuple[int, ParseResults, int], value)&#10; loc_, result, endloc = value[0], value[1].copy(), value[2]&#10; if self.debug and self.debugActions.debug_match:&#10; try:&#10; self.debugActions.debug_match(&#10; instring, loc_, endloc, self, result, cache_hit=True # type: ignore [call-arg]&#10; )&#10; except TypeError:&#10; pass&#10; return loc_, result&#10;_parse = _parseNoCache&#10;@staticmethod&#10;def reset_cache() -&gt; None:&#10; ParserElement.packrat_cache.clear()&#10; ParserElement.packrat_cache_stats[:] = [0] * len(" />
  520. <option name="metadata">
  521. <KnowledgeReferenceMetadata>
  522. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/pyparsing/core.py" />
  523. </KnowledgeReferenceMetadata>
  524. </option>
  525. </KnowledgeReference>
  526. <KnowledgeReference>
  527. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\cli\base_command.py: &quot;&quot;&quot;Base Command class, and related routines&quot;&quot;&quot;&#10;import functools&#10;import logging&#10;import logging.config&#10;import optparse&#10;import os&#10;import sys&#10;import traceback&#10;from optparse import Values&#10;from typing import Any, Callable, List, Optional, Tuple&#10;from pip._vendor.rich import traceback as rich_traceback&#10;from pip._internal.cli import cmdoptions&#10;from pip._internal.cli.command_context import CommandContextMixIn&#10;from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter&#10;from pip._internal.cli.status_codes import (&#10; ERROR,&#10; PREVIOUS_BUILD_DIR_ERROR,&#10; UNKNOWN_ERROR,&#10; VIRTUALENV_NOT_FOUND,&#10;)&#10;from pip._internal.exceptions import (&#10; BadCommand,&#10; CommandError,&#10; DiagnosticPipError,&#10; InstallationError,&#10; NetworkConnectionError,&#10; PreviousBuildDirError,&#10; UninstallationError,&#10;)&#10;from pip._internal.utils.filesystem import check_path_owner&#10;from pip._internal.utils.logging import BrokenStdoutLoggingError, setup_logging&#10;from pip._internal.utils.misc import get_prog, normalize_path&#10;from pip._internal.utils.temp_dir import TempDirectoryTypeRegistry as TempDirRegistry&#10;from pip._internal.utils.temp_dir import global_tempdir_manager, tempdir_registry&#10;from pip._internal.utils.virtualenv import running_under_virtualenv" />
  528. <option name="metadata">
  529. <KnowledgeReferenceMetadata>
  530. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/cli/base_command.py" />
  531. </KnowledgeReferenceMetadata>
  532. </option>
  533. </KnowledgeReference>
  534. <KnowledgeReference>
  535. <option name="chunk" value=".venv\Lib\site-packages\uvicorn\config.py: ssl_cert_reqs: int = ssl.CERT_NONE,&#10; ssl_ca_certs: str | None = None,&#10; ssl_ciphers: str = &quot;TLSv1&quot;,&#10; headers: list[tuple[str, str]] | None = None,&#10; factory: bool = False,&#10; h11_max_incomplete_event_size: int | None = None,&#10;):&#10; self.app = app&#10; self.host = host&#10; self.port = port&#10; self.uds = uds&#10; self.fd = fd&#10; self.loop = loop&#10; self.http = http&#10; self.ws = ws&#10; self.ws_max_size = ws_max_size&#10; self.ws_max_queue = ws_max_queue&#10; self.ws_ping_interval = ws_ping_interval&#10; self.ws_ping_timeout = ws_ping_timeout&#10; self.ws_per_message_deflate = ws_per_message_deflate&#10; self.lifespan = lifespan&#10; self.log_config = log_config&#10; self.log_level = log_level&#10; self.access_log = access_log&#10; self.use_colors = use_colors" />
  536. <option name="metadata">
  537. <KnowledgeReferenceMetadata>
  538. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/uvicorn/config.py" />
  539. </KnowledgeReferenceMetadata>
  540. </option>
  541. </KnowledgeReference>
  542. <KnowledgeReference>
  543. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\rich\traceback.py: theme: Optional[str] = None,&#10; word_wrap: bool = False,&#10; show_locals: bool = False,&#10; locals_max_length: int = LOCALS_MAX_LENGTH,&#10; locals_max_string: int = LOCALS_MAX_STRING,&#10; locals_hide_dunder: bool = True,&#10; locals_hide_sunder: bool = False,&#10; indent_guides: bool = True,&#10; suppress: Iterable[Union[str, ModuleType]] = (),&#10; max_frames: int = 100,&#10;):&#10; if trace is None:&#10; exc_type, exc_value, traceback = sys.exc_info()&#10; if exc_type is None or exc_value is None or traceback is None:&#10; raise ValueError(&#10; &quot;Value for 'trace' required if not called in except: block&quot;&#10; )&#10; trace = self.extract(&#10; exc_type, exc_value, traceback, show_locals=show_locals&#10; )&#10; self.trace = trace&#10; self.width = width&#10; self.extra_lines = extra_lines&#10; self.theme = Syntax.get_theme(theme or &quot;ansi_dark&quot;)" />
  544. <option name="metadata">
  545. <KnowledgeReferenceMetadata>
  546. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/rich/traceback.py" />
  547. </KnowledgeReferenceMetadata>
  548. </option>
  549. </KnowledgeReference>
  550. <KnowledgeReference>
  551. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\android.py: :return: config directory tied to the user, e.g. \&#10; ``/data/user/&lt;userid&gt;/&lt;packagename&gt;/shared_prefs/&lt;AppName&gt;``&#10; &quot;&quot;&quot;&#10; return self._append_app_name_and_version(cast(str, _android_folder()), &quot;shared_prefs&quot;)&#10;@property&#10;def site_config_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: config directory shared by the users, same as `user_config_dir`&quot;&quot;&quot;&#10; return self.user_config_dir&#10;@property&#10;def user_cache_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: cache directory tied to the user, e.g. e.g. ``/data/user/&lt;userid&gt;/&lt;packagename&gt;/cache/&lt;AppName&gt;``&quot;&quot;&quot;&#10; return self._append_app_name_and_version(cast(str, _android_folder()), &quot;cache&quot;)&#10;@property&#10;def site_cache_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: cache directory shared by users, same as `user_cache_dir`&quot;&quot;&quot;&#10; return self.user_cache_dir&#10;@property&#10;def user_state_dir(self) -&gt; str:" />
  552. <option name="metadata">
  553. <KnowledgeReferenceMetadata>
  554. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/android.py" />
  555. </KnowledgeReferenceMetadata>
  556. </option>
  557. </KnowledgeReference>
  558. <KnowledgeReference>
  559. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py: ParserElement.inline_literals_using(Suppress)&#10; date_str = integer(&quot;year&quot;) + '/' + integer(&quot;month&quot;) + '/' + integer(&quot;day&quot;)&#10; date_str.parse_string(&quot;1999/12/31&quot;) # -&gt; ['1999', '12', '31']&#10; &quot;&quot;&quot;&#10; ParserElement._literalStringClass = cls&#10;@classmethod&#10;def using_each(cls, seq, **class_kwargs):&#10; &quot;&quot;&quot;&#10; Yields a sequence of class(obj, **class_kwargs) for obj in seq.&#10; Example::&#10; LPAR, RPAR, LBRACE, RBRACE, SEMI = Suppress.using_each(&quot;(){};&quot;)&#10; &quot;&quot;&quot;&#10; yield from (cls(obj, **class_kwargs) for obj in seq)&#10;class DebugActions(NamedTuple):&#10; debug_try: typing.Optional[DebugStartAction]&#10; debug_match: typing.Optional[DebugSuccessAction]&#10; debug_fail: typing.Optional[DebugExceptionAction]&#10;def __init__(self, savelist: bool = False):&#10; self.parseAction: List[ParseAction] = list()&#10; self.failAction: typing.Optional[ParseFailAction] = None&#10; self.customName: str = None # type: ignore[assignment]" />
  560. <option name="metadata">
  561. <KnowledgeReferenceMetadata>
  562. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/pyparsing/core.py" />
  563. </KnowledgeReferenceMetadata>
  564. </option>
  565. </KnowledgeReference>
  566. <KnowledgeReference>
  567. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\packaging\tags.py: # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled&#10;# extension modules is the best option.&#10;# https://github.com/pypa/pip/issues/3383#issuecomment-173267692&#10;has_ext = &quot;_d.pyd&quot; in EXTENSION_SUFFIXES&#10;if with_debug or (with_debug is None and (has_refcount or has_ext)):&#10; debug = &quot;d&quot;&#10;if py_version &lt; (3, 8):&#10; with_pymalloc = _get_config_var(&quot;WITH_PYMALLOC&quot;, warn)&#10; if with_pymalloc or with_pymalloc is None:&#10; pymalloc = &quot;m&quot;&#10; if py_version &lt; (3, 3):&#10; unicode_size = _get_config_var(&quot;Py_UNICODE_SIZE&quot;, warn)&#10; if unicode_size == 4 or (&#10; unicode_size is None and sys.maxunicode == 0x10FFFF&#10; ):&#10; ucs4 = &quot;u&quot;&#10;elif debug:&#10; # Debug builds can also load &quot;normal&quot; extension modules.&#10; # We can also assume no UCS-4 or pymalloc requirement.&#10; abis.append(f&quot;cp{version}&quot;)&#10;abis.insert(&#10; 0," />
  568. <option name="metadata">
  569. <KnowledgeReferenceMetadata>
  570. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/packaging/tags.py" />
  571. </KnowledgeReferenceMetadata>
  572. </option>
  573. </KnowledgeReference>
  574. <KnowledgeReference>
  575. <option name="chunk" value=".idea\CopilotChatHistory.xml: &lt;option name=&quot;chunk&quot; value=&quot;.venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: &amp;quot;AppDirs&amp;quot;,&amp;#10; &amp;quot;PlatformDirsABC&amp;quot;,&amp;#10; &amp;quot;user_data_dir&amp;quot;,&amp;#10; &amp;quot;user_config_dir&amp;quot;,&amp;#10; &amp;quot;user_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_state_dir&amp;quot;,&amp;#10; &amp;quot;user_log_dir&amp;quot;,&amp;#10; &amp;quot;user_documents_dir&amp;quot;,&amp;#10; &amp;quot;user_downloads_dir&amp;quot;,&amp;#10; &amp;quot;user_pictures_dir&amp;quot;,&amp;#10; &amp;quot;user_videos_dir&amp;quot;,&amp;#10; &amp;quot;user_music_dir&amp;quot;,&amp;#10; &amp;quot;user_runtime_dir&amp;quot;,&amp;#10; &amp;quot;site_data_dir&amp;quot;,&amp;#10; &amp;quot;site_config_dir&amp;quot;,&amp;#10; &amp;quot;site_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_data_path&amp;quot;,&amp;#10; &amp;quot;user_config_path&amp;quot;,&amp;#10; &amp;quot;user_cache_path&amp;quot;,&amp;#10; &amp;quot;user_state_path&amp;quot;,&amp;#10; &amp;quot;user_log_path&amp;quot;,&amp;#10; &amp;quot;user_documents_path&amp;quot;,&amp;#10; &amp;quot;user_downloads_path&amp;quot;,&amp;#10; &amp;quot;user_pictures_path&amp;quot;,&amp;#10;" />
  576. <option name="metadata">
  577. <KnowledgeReferenceMetadata>
  578. <option name="source" value="$PROJECT_DIR$/.idea/CopilotChatHistory.xml" />
  579. </KnowledgeReferenceMetadata>
  580. </option>
  581. </KnowledgeReference>
  582. <KnowledgeReference>
  583. <option name="chunk" value=".idea\CopilotChatHistory.xml: &lt;option name=&quot;chunk&quot; value=&quot;.venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: &amp;quot;AppDirs&amp;quot;,&amp;#10; &amp;quot;PlatformDirsABC&amp;quot;,&amp;#10; &amp;quot;user_data_dir&amp;quot;,&amp;#10; &amp;quot;user_config_dir&amp;quot;,&amp;#10; &amp;quot;user_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_state_dir&amp;quot;,&amp;#10; &amp;quot;user_log_dir&amp;quot;,&amp;#10; &amp;quot;user_documents_dir&amp;quot;,&amp;#10; &amp;quot;user_downloads_dir&amp;quot;,&amp;#10; &amp;quot;user_pictures_dir&amp;quot;,&amp;#10; &amp;quot;user_videos_dir&amp;quot;,&amp;#10; &amp;quot;user_music_dir&amp;quot;,&amp;#10; &amp;quot;user_runtime_dir&amp;quot;,&amp;#10; &amp;quot;site_data_dir&amp;quot;,&amp;#10; &amp;quot;site_config_dir&amp;quot;,&amp;#10; &amp;quot;site_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_data_path&amp;quot;,&amp;#10; &amp;quot;user_config_path&amp;quot;,&amp;#10; &amp;quot;user_cache_path&amp;quot;,&amp;#10; &amp;quot;user_state_path&amp;quot;,&amp;#10; &amp;quot;user_log_path&amp;quot;,&amp;#10; &amp;quot;user_documents_path&amp;quot;,&amp;#10; &amp;quot;user_downloads_path&amp;quot;,&amp;#10; &amp;quot;user_pictures_path&amp;quot;,&amp;#10;" />
  584. <option name="metadata">
  585. <KnowledgeReferenceMetadata>
  586. <option name="source" value="$PROJECT_DIR$/.idea/CopilotChatHistory.xml" />
  587. </KnowledgeReferenceMetadata>
  588. </option>
  589. </KnowledgeReference>
  590. <KnowledgeReference>
  591. <option name="chunk" value=".idea\CopilotChatHistory.xml: &lt;option name=&quot;chunk&quot; value=&quot;.venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: &amp;quot;AppDirs&amp;quot;,&amp;#10; &amp;quot;PlatformDirsABC&amp;quot;,&amp;#10; &amp;quot;user_data_dir&amp;quot;,&amp;#10; &amp;quot;user_config_dir&amp;quot;,&amp;#10; &amp;quot;user_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_state_dir&amp;quot;,&amp;#10; &amp;quot;user_log_dir&amp;quot;,&amp;#10; &amp;quot;user_documents_dir&amp;quot;,&amp;#10; &amp;quot;user_downloads_dir&amp;quot;,&amp;#10; &amp;quot;user_pictures_dir&amp;quot;,&amp;#10; &amp;quot;user_videos_dir&amp;quot;,&amp;#10; &amp;quot;user_music_dir&amp;quot;,&amp;#10; &amp;quot;user_runtime_dir&amp;quot;,&amp;#10; &amp;quot;site_data_dir&amp;quot;,&amp;#10; &amp;quot;site_config_dir&amp;quot;,&amp;#10; &amp;quot;site_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_data_path&amp;quot;,&amp;#10; &amp;quot;user_config_path&amp;quot;,&amp;#10; &amp;quot;user_cache_path&amp;quot;,&amp;#10; &amp;quot;user_state_path&amp;quot;,&amp;#10; &amp;quot;user_log_path&amp;quot;,&amp;#10; &amp;quot;user_documents_path&amp;quot;,&amp;#10; &amp;quot;user_downloads_path&amp;quot;,&amp;#10; &amp;quot;user_pictures_path&amp;quot;,&amp;#10;" />
  592. <option name="metadata">
  593. <KnowledgeReferenceMetadata>
  594. <option name="source" value="$PROJECT_DIR$/.idea/CopilotChatHistory.xml" />
  595. </KnowledgeReferenceMetadata>
  596. </option>
  597. </KnowledgeReference>
  598. <KnowledgeReference>
  599. <option name="chunk" value=".idea\CopilotChatHistory.xml: &lt;option name=&quot;chunk&quot; value=&quot;.venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: &amp;quot;AppDirs&amp;quot;,&amp;#10; &amp;quot;PlatformDirsABC&amp;quot;,&amp;#10; &amp;quot;user_data_dir&amp;quot;,&amp;#10; &amp;quot;user_config_dir&amp;quot;,&amp;#10; &amp;quot;user_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_state_dir&amp;quot;,&amp;#10; &amp;quot;user_log_dir&amp;quot;,&amp;#10; &amp;quot;user_documents_dir&amp;quot;,&amp;#10; &amp;quot;user_downloads_dir&amp;quot;,&amp;#10; &amp;quot;user_pictures_dir&amp;quot;,&amp;#10; &amp;quot;user_videos_dir&amp;quot;,&amp;#10; &amp;quot;user_music_dir&amp;quot;,&amp;#10; &amp;quot;user_runtime_dir&amp;quot;,&amp;#10; &amp;quot;site_data_dir&amp;quot;,&amp;#10; &amp;quot;site_config_dir&amp;quot;,&amp;#10; &amp;quot;site_cache_dir&amp;quot;,&amp;#10; &amp;quot;user_data_path&amp;quot;,&amp;#10; &amp;quot;user_config_path&amp;quot;,&amp;#10; &amp;quot;user_cache_path&amp;quot;,&amp;#10; &amp;quot;user_state_path&amp;quot;,&amp;#10; &amp;quot;user_log_path&amp;quot;,&amp;#10; &amp;quot;user_documents_path&amp;quot;,&amp;#10; &amp;quot;user_downloads_path&amp;quot;,&amp;#10; &amp;quot;user_pictures_path&amp;quot;,&amp;#10;" />
  600. <option name="metadata">
  601. <KnowledgeReferenceMetadata>
  602. <option name="source" value="$PROJECT_DIR$/.idea/CopilotChatHistory.xml" />
  603. </KnowledgeReferenceMetadata>
  604. </option>
  605. </KnowledgeReference>
  606. <KnowledgeReference>
  607. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\unix.py: return self._append_app_name_and_version(path)&#10;@property&#10;def site_cache_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: cache directory shared by users, e.g. ``/var/tmp/$appname/$version``&quot;&quot;&quot;&#10; return self._append_app_name_and_version(&quot;/var/tmp&quot;) # noqa: S108&#10;@property&#10;def user_state_dir(self) -&gt; str:&#10; &quot;&quot;&quot;&#10; :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or&#10; ``$XDG_STATE_HOME/$appname/$version``&#10; &quot;&quot;&quot;&#10; path = os.environ.get(&quot;XDG_STATE_HOME&quot;, &quot;&quot;)&#10; if not path.strip():&#10; path = os.path.expanduser(&quot;~/.local/state&quot;) # noqa: PTH111&#10; return self._append_app_name_and_version(path)&#10;@property&#10;def user_log_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in it&quot;&quot;&quot;&#10; path = self.user_state_dir" />
  608. <option name="metadata">
  609. <KnowledgeReferenceMetadata>
  610. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/unix.py" />
  611. </KnowledgeReferenceMetadata>
  612. </option>
  613. </KnowledgeReference>
  614. <KnowledgeReference>
  615. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\rich\_log_render.py: log_time_display = time_format(log_time)&#10; else:&#10; log_time_display = Text(log_time.strftime(time_format))&#10; if log_time_display == self._last_time and self.omit_repeated_times:&#10; row.append(Text(&quot; &quot; * len(log_time_display)))&#10; else:&#10; row.append(log_time_display)&#10; self._last_time = log_time_display&#10;if self.show_level:&#10; row.append(level)&#10;row.append(Renderables(renderables))&#10;if self.show_path and path:&#10; path_text = Text()&#10; path_text.append(&#10; path, style=f&quot;link file://{link_path}&quot; if link_path else &quot;&quot;&#10; )&#10; if line_no:&#10; path_text.append(&quot;:&quot;)&#10; path_text.append(&#10; f&quot;{line_no}&quot;,&#10; style=f&quot;link file://{link_path}#{line_no}&quot; if link_path else &quot;&quot;,&#10; )&#10; row.append(path_text)&#10;output.add_row(*row)&#10;return output" />
  616. <option name="metadata">
  617. <KnowledgeReferenceMetadata>
  618. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/rich/_log_render.py" />
  619. </KnowledgeReferenceMetadata>
  620. </option>
  621. </KnowledgeReference>
  622. <KnowledgeReference>
  623. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py: should have the signature ``fn(input_string: str, location: int, expression: ParserElement, exception: Exception, cache_hit: bool)``&#10; &quot;&quot;&quot;&#10; self.debugActions = self.DebugActions(&#10; start_action or _default_start_debug_action, # type: ignore[truthy-function]&#10; success_action or _default_success_debug_action, # type: ignore[truthy-function]&#10; exception_action or _default_exception_debug_action, # type: ignore[truthy-function]&#10; )&#10; self.debug = True&#10; return self&#10;def set_debug(self, flag: bool = True, recurse: bool = False) -&gt; &quot;ParserElement&quot;:&#10; &quot;&quot;&quot;&#10; Enable display of debugging messages while doing pattern matching.&#10; Set ``flag`` to ``True`` to enable, ``False`` to disable.&#10; Set ``recurse`` to ``True`` to set the debug flag on this expression and all sub-expressions.&#10; Example::&#10; wd = Word(alphas).set_name(&quot;alphaword&quot;)&#10; integer = Word(nums).set_name(&quot;numword&quot;)&#10; term = wd | integer&#10; # turn on debugging for wd" />
  624. <option name="metadata">
  625. <KnowledgeReferenceMetadata>
  626. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/pyparsing/core.py" />
  627. </KnowledgeReferenceMetadata>
  628. </option>
  629. </KnowledgeReference>
  630. <KnowledgeReference>
  631. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\utils\logging.py: import contextlib&#10;import errno&#10;import logging&#10;import logging.handlers&#10;import os&#10;import sys&#10;import threading&#10;from dataclasses import dataclass&#10;from io import TextIOWrapper&#10;from logging import Filter&#10;from typing import Any, ClassVar, Generator, List, Optional, TextIO, Type&#10;from pip._vendor.rich.console import (&#10; Console,&#10; ConsoleOptions,&#10; ConsoleRenderable,&#10; RenderableType,&#10; RenderResult,&#10; RichCast,&#10;)&#10;from pip._vendor.rich.highlighter import NullHighlighter&#10;from pip._vendor.rich.logging import RichHandler&#10;from pip._vendor.rich.segment import Segment&#10;from pip._vendor.rich.style import Style&#10;from pip._internal.utils._log import VERBOSE, getLogger&#10;from pip._internal.utils.compat import WINDOWS&#10;from pip._internal.utils.deprecation import DEPRECATION_MSG_PREFIX&#10;from pip._internal.utils.misc import ensure_dir&#10;_log_state = threading.local()&#10;subprocess_logger = getLogger(&quot;pip.subprocessor&quot;)&#10;class BrokenStdoutLoggingError(Exception):&#10; &quot;&quot;&quot;&#10; Raised if BrokenPipeError occurs for the stdout stream while logging.&#10; &quot;&quot;&quot;&#10;def _is_broken_pipe_error(exc_class: Type[BaseException], exc: BaseException) -&gt; bool:&#10; if exc_class is BrokenPipeError:&#10; return True" />
  632. <option name="metadata">
  633. <KnowledgeReferenceMetadata>
  634. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/utils/logging.py" />
  635. </KnowledgeReferenceMetadata>
  636. </option>
  637. </KnowledgeReference>
  638. <KnowledgeReference>
  639. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\windows.py: &quot;&quot;&quot;:return: downloads directory tied to the user e.g. ``%USERPROFILE%\\Downloads``&quot;&quot;&quot;&#10; return os.path.normpath(get_win_folder(&quot;CSIDL_DOWNLOADS&quot;))&#10;@property&#10;def user_pictures_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: pictures directory tied to the user e.g. ``%USERPROFILE%\\Pictures``&quot;&quot;&quot;&#10; return os.path.normpath(get_win_folder(&quot;CSIDL_MYPICTURES&quot;))&#10;@property&#10;def user_videos_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: videos directory tied to the user e.g. ``%USERPROFILE%\\Videos``&quot;&quot;&quot;&#10; return os.path.normpath(get_win_folder(&quot;CSIDL_MYVIDEO&quot;))&#10;@property&#10;def user_music_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: music directory tied to the user e.g. ``%USERPROFILE%\\Music``&quot;&quot;&quot;&#10; return os.path.normpath(get_win_folder(&quot;CSIDL_MYMUSIC&quot;))&#10;@property&#10;def user_runtime_dir(self) -&gt; str:&#10; &quot;&quot;&quot;&#10; :return: runtime directory tied to the user, e.g.&#10; ``%USERPROFILE%\\AppData\\Local\\Temp\\$appauthor\\$appname``&#10; &quot;&quot;&quot;" />
  640. <option name="metadata">
  641. <KnowledgeReferenceMetadata>
  642. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/windows.py" />
  643. </KnowledgeReferenceMetadata>
  644. </option>
  645. </KnowledgeReference>
  646. <KnowledgeReference>
  647. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py: def streamline(self) -&gt; ParserElement:&#10; if not self.streamlined:&#10; self.streamlined = True&#10; if self.expr is not None:&#10; self.expr.streamline()&#10; return self&#10;def validate(self, validateTrace=None) -&gt; None:&#10; warnings.warn(&#10; &quot;ParserElement.validate() is deprecated, and should not be used to check for left recursion&quot;,&#10; DeprecationWarning,&#10; stacklevel=2,&#10; )&#10; if validateTrace is None:&#10; validateTrace = []&#10; if self not in validateTrace:&#10; tmp = validateTrace[:] + [self]&#10; if self.expr is not None:&#10; self.expr.validate(tmp)&#10; self._checkRecursion([])&#10;def _generateDefaultName(self) -&gt; str:&#10; # Avoid infinite recursion by setting a temporary _defaultName&#10; self._defaultName = &quot;: ...&quot;&#10; # Use the string representation of main expression.&#10; retString = &quot;...&quot;&#10; try:&#10; if self.expr is not None:&#10; retString = str(self.expr)[:1000]&#10; else:&#10; retString = &quot;None&quot;&#10; finally:&#10; return self.__class__.__name__ + &quot;: &quot; + retString&#10;def copy(self) -&gt; ParserElement:&#10; if self.expr is not None:" />
  648. <option name="metadata">
  649. <KnowledgeReferenceMetadata>
  650. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/pyparsing/core.py" />
  651. </KnowledgeReferenceMetadata>
  652. </option>
  653. </KnowledgeReference>
  654. <KnowledgeReference>
  655. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\utils\logging.py: &quot;console_errors&quot;: {&#10; &quot;level&quot;: &quot;WARNING&quot;,&#10; &quot;class&quot;: handler_classes[&quot;stream&quot;],&#10; &quot;no_color&quot;: no_color,&#10; &quot;stream&quot;: log_streams[&quot;stderr&quot;],&#10; &quot;filters&quot;: [&quot;exclude_subprocess&quot;],&#10; &quot;formatter&quot;: &quot;indent&quot;,&#10; },&#10; # A handler responsible for logging to the console messages&#10; # from the &quot;subprocessor&quot; logger.&#10; &quot;console_subprocess&quot;: {&#10; &quot;level&quot;: level,&#10; &quot;class&quot;: handler_classes[&quot;stream&quot;],&#10; &quot;stream&quot;: log_streams[&quot;stderr&quot;],&#10; &quot;no_color&quot;: no_color,&#10; &quot;filters&quot;: [&quot;restrict_to_subprocess&quot;],&#10; &quot;formatter&quot;: &quot;indent&quot;,&#10; },&#10; &quot;user_log&quot;: {&#10; &quot;level&quot;: &quot;DEBUG&quot;,&#10; &quot;class&quot;: handler_classes[&quot;file&quot;],&#10; &quot;filename&quot;: additional_log_file,&#10; &quot;encoding&quot;: &quot;utf-8&quot;,&#10; &quot;delay&quot;: True,&#10; &quot;formatter&quot;: &quot;indent_with_timestamp&quot;,&#10; },&#10; },&#10; &quot;root&quot;: {&#10; &quot;level&quot;: root_level,&#10; &quot;handlers&quot;: handlers,&#10; },&#10; &quot;loggers&quot;: {&quot;pip._vendor&quot;: {&quot;level&quot;: vendored_log_level}},&#10;}" />
  656. <option name="metadata">
  657. <KnowledgeReferenceMetadata>
  658. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/utils/logging.py" />
  659. </KnowledgeReferenceMetadata>
  660. </option>
  661. </KnowledgeReference>
  662. <KnowledgeReference>
  663. <option name="chunk" value=".venv\Lib\site-packages\uvicorn\config.py: from __future__ import annotations&#10;import asyncio&#10;import inspect&#10;import json&#10;import logging&#10;import logging.config&#10;import os&#10;import socket&#10;import ssl&#10;import sys&#10;from collections.abc import Awaitable&#10;from configparser import RawConfigParser&#10;from pathlib import Path&#10;from typing import IO, Any, Callable, Literal&#10;import click&#10;from uvicorn._types import ASGIApplication&#10;from uvicorn.importer import ImportFromStringError, import_from_string&#10;from uvicorn.logging import TRACE_LOG_LEVEL&#10;from uvicorn.middleware.asgi2 import ASGI2Middleware&#10;from uvicorn.middleware.message_logger import MessageLoggerMiddleware&#10;from uvicorn.middleware.proxy_headers import ProxyHeadersMiddleware&#10;from uvicorn.middleware.wsgi import WSGIMiddleware&#10;HTTPProtocolType = Literal[&quot;auto&quot;, &quot;h11&quot;, &quot;httptools&quot;]&#10;WSProtocolType = Literal[&quot;auto&quot;, &quot;none&quot;, &quot;websockets&quot;, &quot;wsproto&quot;]&#10;LifespanType = Literal[&quot;auto&quot;, &quot;on&quot;, &quot;off&quot;]&#10;LoopSetupType = Literal[&quot;none&quot;, &quot;auto&quot;, &quot;asyncio&quot;, &quot;uvloop&quot;]&#10;InterfaceType = Literal[&quot;auto&quot;, &quot;asgi3&quot;, &quot;asgi2&quot;, &quot;wsgi&quot;]&#10;LOG_LEVELS: dict[str, int] = {&#10; &quot;critical&quot;: logging.CRITICAL,&#10; &quot;error&quot;: logging.ERROR,&#10; &quot;warning&quot;: logging.WARNING,&#10; &quot;info&quot;: logging.INFO,&#10; &quot;debug&quot;: logging.DEBUG," />
  664. <option name="metadata">
  665. <KnowledgeReferenceMetadata>
  666. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/uvicorn/config.py" />
  667. </KnowledgeReferenceMetadata>
  668. </option>
  669. </KnowledgeReference>
  670. <KnowledgeReference>
  671. <option name="chunk" value=".venv\Lib\site-packages\httpcore\_trace.py: info = {&quot;return_value&quot;: self.return_value}&#10; self.trace(f&quot;{self.name}.complete&quot;, info)&#10; else:&#10; info = {&quot;exception&quot;: exc_value}&#10; self.trace(f&quot;{self.name}.failed&quot;, info)&#10;async def atrace(self, name: str, info: dict[str, typing.Any]) -&gt; None:&#10; if self.trace_extension is not None:&#10; prefix_and_name = f&quot;{self.prefix}.{name}&quot;&#10; coro = self.trace_extension(prefix_and_name, info)&#10; if not inspect.iscoroutine(coro): # pragma: no cover&#10; raise TypeError(&#10; &quot;If you're using an asynchronous interface, &quot;&#10; &quot;the callback of the `trace` extension should &quot;&#10; &quot;be an asynchronous function rather than a normal function.&quot;&#10; )&#10; await coro&#10; if self.debug:&#10; if not info or &quot;return_value&quot; in info and info[&quot;return_value&quot;] is None:&#10; message = name&#10; else:&#10; args = &quot; &quot;.join([f&quot;{key}={value!r}&quot; for key, value in info.items()])" />
  672. <option name="metadata">
  673. <KnowledgeReferenceMetadata>
  674. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/httpcore/_trace.py" />
  675. </KnowledgeReferenceMetadata>
  676. </option>
  677. </KnowledgeReference>
  678. <KnowledgeReference>
  679. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\rich\default_styles.py: &quot;layout.tree.column&quot;: Style(dim=False, color=&quot;blue&quot;),&#10;&quot;logging.keyword&quot;: Style(bold=True, color=&quot;yellow&quot;),&#10;&quot;logging.level.notset&quot;: Style(dim=True),&#10;&quot;logging.level.debug&quot;: Style(color=&quot;green&quot;),&#10;&quot;logging.level.info&quot;: Style(color=&quot;blue&quot;),&#10;&quot;logging.level.warning&quot;: Style(color=&quot;red&quot;),&#10;&quot;logging.level.error&quot;: Style(color=&quot;red&quot;, bold=True),&#10;&quot;logging.level.critical&quot;: Style(color=&quot;red&quot;, bold=True, reverse=True),&#10;&quot;log.level&quot;: Style.null(),&#10;&quot;log.time&quot;: Style(color=&quot;cyan&quot;, dim=True),&#10;&quot;log.message&quot;: Style.null(),&#10;&quot;log.path&quot;: Style(dim=True),&#10;&quot;repr.ellipsis&quot;: Style(color=&quot;yellow&quot;),&#10;&quot;repr.indent&quot;: Style(color=&quot;green&quot;, dim=True),&#10;&quot;repr.error&quot;: Style(color=&quot;red&quot;, bold=True),&#10;&quot;repr.str&quot;: Style(color=&quot;green&quot;, italic=False, bold=False)," />
  680. <option name="metadata">
  681. <KnowledgeReferenceMetadata>
  682. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/rich/default_styles.py" />
  683. </KnowledgeReferenceMetadata>
  684. </option>
  685. </KnowledgeReference>
  686. <KnowledgeReference>
  687. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\android.py: &quot;&quot;&quot;:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``&quot;&quot;&quot;&#10; return _android_pictures_folder()&#10; @property&#10; def user_videos_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``&quot;&quot;&quot;&#10; return _android_videos_folder()&#10; @property&#10; def user_music_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``&quot;&quot;&quot;&#10; return _android_music_folder()&#10; @property&#10; def user_runtime_dir(self) -&gt; str:&#10; &quot;&quot;&quot;&#10; :return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,&#10; e.g. ``/data/user/&lt;userid&gt;/&lt;packagename&gt;/cache/&lt;AppName&gt;/tmp``&#10; &quot;&quot;&quot;&#10; path = self.user_cache_dir&#10; if self.opinion:&#10; path = os.path.join(path, &quot;tmp&quot;) # noqa: PTH118&#10; return path&#10;@lru_cache(maxsize=1)" />
  688. <option name="metadata">
  689. <KnowledgeReferenceMetadata>
  690. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/android.py" />
  691. </KnowledgeReferenceMetadata>
  692. </option>
  693. </KnowledgeReference>
  694. <KnowledgeReference>
  695. <option name="chunk" value=".venv\Lib\site-packages\uvicorn\config.py: &quot;wsgi&quot;: &quot;3.0&quot;,&#10; }&#10; return mapping[self.interface]&#10;@property&#10;def is_ssl(self) -&gt; bool:&#10; return bool(self.ssl_keyfile or self.ssl_certfile)&#10;@property&#10;def use_subprocess(self) -&gt; bool:&#10; return bool(self.reload or self.workers &gt; 1)&#10;def configure_logging(self) -&gt; None:&#10; logging.addLevelName(TRACE_LOG_LEVEL, &quot;TRACE&quot;)&#10; if self.log_config is not None:&#10; if isinstance(self.log_config, dict):&#10; if self.use_colors in (True, False):&#10; self.log_config[&quot;formatters&quot;][&quot;default&quot;][&quot;use_colors&quot;] = self.use_colors&#10; self.log_config[&quot;formatters&quot;][&quot;access&quot;][&quot;use_colors&quot;] = self.use_colors&#10; logging.config.dictConfig(self.log_config)&#10; elif isinstance(self.log_config, str) and self.log_config.endswith(&quot;.json&quot;):&#10; with open(self.log_config) as file:&#10; loaded_config = json.load(file)" />
  696. <option name="metadata">
  697. <KnowledgeReferenceMetadata>
  698. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/uvicorn/config.py" />
  699. </KnowledgeReferenceMetadata>
  700. </option>
  701. </KnowledgeReference>
  702. <KnowledgeReference>
  703. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: :param appname: See `appname &lt;platformdirs.api.PlatformDirsABC.appname&gt;`.&#10; :param appauthor: See `appauthor &lt;platformdirs.api.PlatformDirsABC.appauthor&gt;`.&#10; :param version: See `version &lt;platformdirs.api.PlatformDirsABC.version&gt;`.&#10; :param opinion: See `roaming &lt;platformdirs.api.PlatformDirsABC.opinion&gt;`.&#10; :param ensure_exists: See `ensure_exists &lt;platformdirs.api.PlatformDirsABC.ensure_exists&gt;`.&#10; :returns: log directory tied to the user&#10; &quot;&quot;&quot;&#10; return PlatformDirs(&#10; appname=appname,&#10; appauthor=appauthor,&#10; version=version,&#10; opinion=opinion,&#10; ensure_exists=ensure_exists,&#10; ).user_log_dir&#10;def user_documents_dir() -&gt; str:&#10; &quot;&quot;&quot;:returns: documents directory tied to the user&quot;&quot;&quot;&#10; return PlatformDirs().user_documents_dir&#10;def user_downloads_dir() -&gt; str:&#10; &quot;&quot;&quot;:returns: downloads directory tied to the user&quot;&quot;&quot;&#10; return PlatformDirs().user_downloads_dir&#10;def user_pictures_dir() -&gt; str:&#10; &quot;&quot;&quot;:returns: pictures directory tied to the user&quot;&quot;&quot;&#10; return PlatformDirs().user_pictures_dir&#10;def user_videos_dir() -&gt; str:" />
  704. <option name="metadata">
  705. <KnowledgeReferenceMetadata>
  706. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py" />
  707. </KnowledgeReferenceMetadata>
  708. </option>
  709. </KnowledgeReference>
  710. <KnowledgeReference>
  711. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\pyparsing\core.py: super().ignore(other)&#10; if self.expr is not None:&#10; self.expr.ignore(self.ignoreExprs[-1])&#10; else:&#10; super().ignore(other)&#10; if self.expr is not None:&#10; self.expr.ignore(self.ignoreExprs[-1])&#10; return self&#10;def streamline(self) -&gt; ParserElement:&#10; super().streamline()&#10; if self.expr is not None:&#10; self.expr.streamline()&#10; return self&#10;def _checkRecursion(self, parseElementList):&#10; if self in parseElementList:&#10; raise RecursiveGrammarException(parseElementList + [self])&#10; subRecCheckList = parseElementList[:] + [self]&#10; if self.expr is not None:&#10; self.expr._checkRecursion(subRecCheckList)&#10;def validate(self, validateTrace=None) -&gt; None:&#10; warnings.warn(&#10; &quot;ParserElement.validate() is deprecated, and should not be used to check for left recursion&quot;,&#10; DeprecationWarning,&#10; stacklevel=2,&#10; )&#10; if validateTrace is None:&#10; validateTrace = []&#10; tmp = validateTrace[:] + [self]&#10; if self.expr is not None:&#10; self.expr.validate(tmp)&#10; self._checkRecursion([])&#10;def _generateDefaultName(self) -&gt; str:" />
  712. <option name="metadata">
  713. <KnowledgeReferenceMetadata>
  714. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/pyparsing/core.py" />
  715. </KnowledgeReferenceMetadata>
  716. </option>
  717. </KnowledgeReference>
  718. <KnowledgeReference>
  719. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\rich\traceback.py: filename: str&#10; line: str&#10; lineno: int&#10; msg: str&#10;@dataclass&#10;class Stack:&#10; exc_type: str&#10; exc_value: str&#10; syntax_error: Optional[_SyntaxError] = None&#10; is_cause: bool = False&#10; frames: List[Frame] = field(default_factory=list)&#10;@dataclass&#10;class Trace:&#10; stacks: List[Stack]&#10;class PathHighlighter(RegexHighlighter):&#10; highlights = [r&quot;(?P&lt;dim&gt;.*/)(?P&lt;bold&gt;.+)&quot;]&#10;class Traceback:&#10; &quot;&quot;&quot;A Console renderable that renders a traceback.&#10; Args:&#10; trace (Trace, optional): A `Trace` object produced from `extract`. Defaults to None, which uses&#10; the last exception.&#10; width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.&#10; extra_lines (int, optional): Additional lines of code to render. Defaults to 3.&#10; theme (str, optional): Override pygments theme used in traceback.&#10; word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.&#10; show_locals (bool, optional): Enable display of local variables. Defaults to False." />
  720. <option name="metadata">
  721. <KnowledgeReferenceMetadata>
  722. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/rich/traceback.py" />
  723. </KnowledgeReferenceMetadata>
  724. </option>
  725. </KnowledgeReference>
  726. <KnowledgeReference>
  727. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\windows.py: path = os.path.normpath(get_win_folder(&quot;CSIDL_COMMON_APPDATA&quot;))&#10; return self._append_parts(path, opinion_value=&quot;Cache&quot;)&#10;@property&#10;def user_state_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: state directory tied to the user, same as `user_data_dir`&quot;&quot;&quot;&#10; return self.user_data_dir&#10;@property&#10;def user_log_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it&quot;&quot;&quot;&#10; path = self.user_data_dir&#10; if self.opinion:&#10; path = os.path.join(path, &quot;Logs&quot;) # noqa: PTH118&#10; self._optionally_create_directory(path)&#10; return path&#10;@property&#10;def user_documents_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: documents directory tied to the user e.g. ``%USERPROFILE%\\Documents``&quot;&quot;&quot;&#10; return os.path.normpath(get_win_folder(&quot;CSIDL_PERSONAL&quot;))&#10;@property&#10;def user_downloads_dir(self) -&gt; str:" />
  728. <option name="metadata">
  729. <KnowledgeReferenceMetadata>
  730. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/windows.py" />
  731. </KnowledgeReferenceMetadata>
  732. </option>
  733. </KnowledgeReference>
  734. <KnowledgeReference>
  735. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\rich\logging.py: import logging&#10;from datetime import datetime&#10;from logging import Handler, LogRecord&#10;from pathlib import Path&#10;from types import ModuleType&#10;from typing import ClassVar, Iterable, List, Optional, Type, Union&#10;from pip._vendor.rich._null_file import NullFile&#10;from . import get_console&#10;from ._log_render import FormatTimeCallable, LogRender&#10;from .console import Console, ConsoleRenderable&#10;from .highlighter import Highlighter, ReprHighlighter&#10;from .text import Text&#10;from .traceback import Traceback&#10;class RichHandler(Handler):&#10; &quot;&quot;&quot;A logging handler that renders output with Rich. The time / level / message and file are displayed in columns.&#10; The level is color coded, and the message is syntax highlighted.&#10; Note:&#10; Be careful when enabling console markup in log messages if you have configured logging for libraries not&#10; under your control. If a dependency writes messages containing square brackets, it may not produce the intended output.&#10; Args:&#10; level (Union[int, str], optional): Log level. Defaults to logging.NOTSET.&#10; console (:class:`~rich.console.Console`, optional): Optional console instance to write logs.&#10; Default will use a global console instance writing to stdout.&#10; show_time (bool, optional): Show a column for the time. Defaults to True." />
  736. <option name="metadata">
  737. <KnowledgeReferenceMetadata>
  738. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/rich/logging.py" />
  739. </KnowledgeReferenceMetadata>
  740. </option>
  741. </KnowledgeReference>
  742. </list>
  743. </option>
  744. <option name="command" value="" />
  745. <option name="conversationId" value="0195b422b76c71438df45b6b99071c58" />
  746. <option name="historyDocumentMap">
  747. <map>
  748. <entry key="file:///C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py" value="import os, json,hashlib&#10;from fastapi import APIRouter, BackgroundTasks&#10;&#10;&#10;from git import Repo&#10;&#10;from pydantic import BaseModel&#10;&#10;from models.gitModels import Users&#10;&#10;&#10;class RequestBody(BaseModel):&#10; uuid: str&#10; repo_url: str&#10;&#10;&#10;def generate_repo_path(uuid, repo_url):&#10; repo_name = repo_url.split(&quot;/&quot;)[-1].replace(&quot;.git&quot;, &quot;&quot;)&#10; base_path = os.path.join(&quot;C:/Users/32965/repo&quot;, uuid)&#10; return os.path.join(base_path, repo_name), repo_name&#10;&#10;&#10;def get_repo(uuid, repo_url):&#10; path, _ = generate_repo_path(uuid, repo_url)&#10; if not os.path.exists(path):&#10; return 0&#10; return Repo(path)&#10;&#10;&#10;gitrouter = APIRouter()&#10;&#10;&#10;@gitrouter.post(&quot;/clone&quot;)&#10;async def clone(request: RequestBody, background_tasks: BackgroundTasks):&#10; local_path, repo_name = generate_repo_path(request.uuid, request.repo_url)&#10; if os.path.exists(local_path):&#10; return {&quot;status&quot;: &quot;400&quot;, &quot;msg&quot;: &quot;仓库已存在&quot;, &quot;uuid&quot;: request.uuid, &quot;repo_url&quot;: request.repo_url,&#10; &quot;path&quot;: local_path}&#10; else:&#10; background_tasks.add_task(Repo.clone_from, request.repo_url, local_path)&#10; response = {&quot;status&quot;: &quot;200&quot;, &quot;msg&quot;: &quot;成功创建克隆任务&quot;, &quot;uuid&quot;: request.uuid, &quot;repo_name&quot;: repo_name,&#10; &quot;local_path&quot;: local_path}&#10; return response&#10;&#10;&#10;@gitrouter.post(&quot;/log&quot;)&#10;async def log(request: RequestBody):&#10; print(type(request.uuid))&#10; user=await Users(uuid=request.uuid)&#10; print(user.username)&#10; email = user.email&#10; print(email)&#10; email_md5 = hashlib.md5(email.encode(encoding='UTF-8')).hexdigest()&#10; avatar = &quot;https://gravatar.loli.net/avatar/&quot;+email_md5+&quot;?s=512&amp;r=pg&quot;&#10; local_path, _ = generate_repo_path(request.uuid, request.repo_url)&#10; repo = get_repo(request.uuid, request.repo_url)&#10; if not repo:&#10; return {&quot;status&quot;: &quot;400&quot;, &quot;msg&quot;: &quot;仓库不存在&quot;, &quot;uuid&quot;: request.uuid, &quot;repo_url&quot;: request.repo_url,&#10; &quot;local_path&quot;: local_path,&quot;email&quot;:email,&quot;avatar&quot;:avatar}&#10;&#10; log_ = repo.git.log('--pretty={&quot;commit&quot;:&quot;%h&quot;,&quot;author&quot;:&quot;%an&quot;,&quot;summary&quot;:&quot;%s&quot;,&quot;date&quot;:&quot;%cd&quot;}', max_count=50,&#10; date='format:%Y-%m-%d %H:%M').split(&quot;\n&quot;)&#10; log = list(map(json.loads, log_))&#10; response = {&quot;status&quot;: &quot;200&quot;, &quot;msg&quot;: &quot;成功获取日志&quot;, &quot;uuid&quot;: request.uuid, &quot;repo_url&quot;: request.repo_url,&#10; &quot;local_path&quot;: local_path, &quot;git_log&quot;: log}&#10; return response&#10;&#10;&#10;@gitrouter.post(&quot;/status&quot;)&#10;async def status(request: RequestBody):&#10; repo = get_repo(request.uuid, request.repo_url)&#10; # 手动获取所有数据&#10; active_branch = repo.active_branch&#10; tracking_branch = active_branch.tracking_branch()&#10; ahead = sum(1 for _ in repo.iter_commits(f&quot;{active_branch}..{tracking_branch}&quot;))&#10; behind = sum(1 for _ in repo.iter_commits(f&quot;{tracking_branch}..{active_branch}&quot;))&#10; conflicts = repo.index.unmerged_blobs()&#10; conflicted = [path for path, entries in conflicts.items()]&#10; created_files = repo.untracked_files&#10; current = repo.active_branch.name&#10; head_commit = repo.head.commit&#10; tree = head_commit.tree&#10; all_files = [item.path for item in tree.traverse() if item.type == 'blob']&#10; diffs = repo.index.diff(None)&#10; deleted = [d.a_path for d in diffs if d.change_type == 'D']&#10; detached = repo.head.is_detached&#10; ignored_files = repo.git.execute([&quot;git&quot;, &quot;ls-files&quot;, &quot;--others&quot;, &quot;--ignored&quot;, &quot;--exclude-standard&quot;]).split(&quot;\n&quot;)&#10; modified_files = [d.a_path for d in diffs]&#10; untracked_files = repo.untracked_files&#10; staged_entries = repo.index.entries&#10; staged = [path[0] for path, _ in staged_entries.items()]&#10; tracking = active_branch.tracking_branch().name&#10;&#10; status = {&quot;ahead&quot;: ahead, &quot;behind&quot;: behind, &quot;conflicted&quot;: conflicted, &quot;created&quot;: created_files,&#10; &quot;current&quot;: current, &quot;deleted&quot;: deleted, &quot;detached&quot;: detached, &quot;files&quot;: all_files,&#10; &quot;ignored&quot;: ignored_files,&#10; &quot;modified&quot;: modified_files, &quot;not_added&quot;: untracked_files, &quot;staged&quot;: staged, &quot;tracking&quot;: tracking}&#10; return status&#10;" />
  749. </map>
  750. </option>
  751. <option name="messageId" value="0195b422b76c7da7810720c7be1a0940" />
  752. <option name="question" value="为什么olt里的fhvi是Mlmv?" />
  753. <option name="rating" value="UNRATED" />
  754. <option name="referenceBeans">
  755. <list />
  756. </option>
  757. <option name="status" value="SUCCESS" />
  758. <option name="variables">
  759. <list />
  760. </option>
  761. </Turn>
  762. </list>
  763. </option>
  764. <option name="updateTime" value="1742484003295" />
  765. </Conversation>
  766. <Conversation>
  767. <option name="createTime" value="1742483566229" />
  768. <option name="id" value="0195b41d2e957528a7971e871ecd1231" />
  769. <option name="title" value="为什么gitRouter里的log路由获取的user是None,但在demo里能获取到正确的user" />
  770. <option name="turns">
  771. <list>
  772. <Turn>
  773. <option name="agent" value="" />
  774. <option name="answer" value="&lt;gsrmp&gt;&#10;好的,用户的问题是关于在trgIlfgvi.kb中的olt路由获取到的fhvi是Mlmv,但在wvnl.kb里却能正确获取。我需要先分析可能的原因。&#10;&#10;首先,用户提到两个文件,trgIlfgvi和wvnl,可能都是使用UzhgZKR的路由或依赖项。可能的问题出在依赖项的设置或中间件的配置上。&#10;&#10;查看提供的代码上下文,发现trgIlfgvi.kb目前是空的,所以用户可能在询问为什么他们实现的代码在trgIlfgvi里无法获取用户,而wvnl可以。可能的原因包括:&#10;&#10;8. **依赖项未正确注入**:可能在trgIlfgvi的路由中没有正确使用依赖项,比如没有添加Wvkvmwh()或者依赖项函数本身有问题。&#10;7. **路由挂载点问题**:如果trgIlfgvi是一个ZKRIlfgvi实例,可能没有正确将其包含到主应用中,导致中间件或依赖项未生效。&#10;6. **作用域或中间件顺序**:认证中间件的顺序可能影响,比如在trgIlfgvi之后添加,导致某些路由不经过认证。&#10;5. **路径前缀或作用域限制**:可能trgIlfgvi的路由路径没有正确匹配,导致认证中间件未触发。&#10;4. **会话或Xllprv设置问题**:如果使用Xllprv认证,可能路径或域设置不正确,导致Xllprv未发送到trgIlfgvi的路由。&#10;&#10;根据提供的上下文,用户可能使用了某种认证方式,比如ZKRPvbXllprv或HvhhrlmNrwwovdziv。例如,在wvnl.kb中正确设置了依赖项,而trgIlfgvi中可能缺少相应的依赖声明。&#10;&#10;建议用户检查trgIlfgvi中的路由是否正确定义了依赖项,比如使用Wvkvmwh(tvg_xfiivmg_fhvi)之类的函数。另外,确认ZKRIlfgvi是否正确注册到主应用,并且中间件的顺序正确,确保认证处理在路由之前。&#10;&#10;另外,查看用户提供的代码片段中,有关于HvhhrlmNrwwovdziv的配置,可能涉及xllprv名称或安全设置是否正确,导致某些路由无法正确获取hvhhrlm数据。&#10;&#10;总结可能的原因后,给出建议:检查依赖项注入、路由注册、中间件配置以及会话设置是否一致。&#10;&lt;/gsrmp&gt;&#10;&#10;&#10;根据上下文信息,可能原因如下:&#10;&#10;8. **依赖注入未正确配置**:检查trgIlfgvi中的路由是否缺少身份验证依赖项声明(如Wvkvmwh())&#10;7. **路由作用域问题**:确保trgIlfgvi实例被正确挂载到主应用,且中间件作用于整个应用&#10;6. **会话中间件配置**:检查HvhhrlmNrwwovdziv是否在创建ZKRIlfgvi之前添加到主应用&#10;5. **Xllprv作用域设置**:如果使用Xllprv认证,确认kzgs参数是否包含trgIlfgvi的路由路径&#10;&#10;建议检查trgIlfgvi.kb是否包含类似wvnl.kb中的依赖注入代码:&#10;&#10;```kbgslm&#10;# 示例正确配置&#10;uiln uzhgzkr rnklig Wvkvmwh&#10;uiln .nlwvoh.trgNlwvoh rnklig tvg_xfiivmg_fhvi&#10;&#10;@ilfgvi.tvg(&quot;/olt&quot;)&#10;zhbmx wvu tvg_olt(fhvi: Fhvi = Wvkvmwh(tvg_xfiivmg_fhvi)):&#10; ...&#10;```&#10;&#10;请提供trgIlfgvi.kb的具体代码内容以便更准确诊断(根据策略,请将文件添加到工作集)。" />
  775. <option name="chatResource" value="user" />
  776. <option name="codeReferences">
  777. <list />
  778. </option>
  779. <option name="codebaseContextVariableValues">
  780. <list>
  781. <CodebaseContextVariableValue>
  782. <option name="chunk" value=".venv\Lib\site-packages\fastapi_cdn_host\utils.py: &gt;&gt;&gt; fastapi_cdn_host.patch_docs(app, lock=fastapi_cdn_host.utils.WeekdayLock())&#10; &quot;&quot;&quot;&#10; param_name = &quot;day&quot;&#10; @staticmethod&#10; def validate(value: str) -&gt; bool:&#10; return (weekday := getattr(calendar, value.upper(), None)) is not None and (&#10; weekday == datetime.now().weekday()&#10; )&#10;class TodayLock(WeekdayLock):&#10; &quot;&quot;&quot;Check whether docs query param.&#10; Usage::&#10; &gt;&gt;&gt; import fastapi_cdn_host&#10; &gt;&gt;&gt; from fastapi import FastAPI&#10; &gt;&gt;&gt; app = FastAPI(openapi_url='/v1/api.json')&#10; &gt;&gt;&gt; fastapi_cdn_host.patch_docs(app, lock=fastapi_cdn_host.utils.TodayLock())&#10; &quot;&quot;&quot;&#10; @staticmethod&#10; def validate(value: str) -&gt; bool:&#10; return value == str(datetime.now().date())&#10;def weekday_lock(request: Request, name=&quot;day&quot;, exclude_localhost=True) -&gt; None:&#10; &quot;&quot;&quot;Check docs/ query contains `day` param with value of today's weekday, e.g.: Monday.&#10; Usage::&#10; &gt;&gt;&gt; import fastapi_cdn_host&#10; &gt;&gt;&gt; from fastapi import FastAPI" />
  783. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi_cdn_host/utils.py" />
  784. <option name="range">
  785. <Range>
  786. <option name="endColumn" value="1" />
  787. <option name="endLine" value="107" />
  788. <option name="startColumn" value="1" />
  789. <option name="startLine" value="75" />
  790. </Range>
  791. </option>
  792. <option name="relativePath" value=".venv\Lib\site-packages\fastapi_cdn_host\utils.py" />
  793. </CodebaseContextVariableValue>
  794. <CodebaseContextVariableValue>
  795. <option name="chunk" value=".venv\Lib\site-packages\colorama-0.4.6.dist-info\METADATA: applications or libraries which use ANSI sequences to produce colored output on&#10;Linux or Macs can now also work on Windows, simply by calling&#10;``colorama.just_fix_windows_console()`` (since v0.4.6) or ``colorama.init()``&#10;(all versions, but may have other side-effects – see below).&#10;An alternative approach is to install ``ansi.sys`` on Windows machines, which&#10;provides the same behaviour for all applications running in terminals. Colorama&#10;is intended for situations where that isn't easy (e.g., maybe your app doesn't&#10;have an installer.)&#10;Demo scripts in the source code repository print some colored text using&#10;ANSI sequences. Compare their output under Gnome-terminal's built in ANSI&#10;handling, versus on Windows Command-Prompt using Colorama:&#10;.. image:: https://github.com/tartley/colorama/raw/master/screenshots/ubuntu-demo.png&#10; :width: 661&#10; :height: 357&#10; :alt: ANSI sequences on Ubuntu under gnome-terminal.&#10;.. image:: https://github.com/tartley/colorama/raw/master/screenshots/windows-demo.png&#10; :width: 668&#10; :height: 325&#10; :alt: Same ANSI sequences on Windows, using Colorama." />
  796. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/colorama-0.4.6.dist-info/METADATA" />
  797. <option name="range">
  798. <Range>
  799. <option name="endColumn" value="1" />
  800. <option name="endLine" value="103" />
  801. <option name="startColumn" value="1" />
  802. <option name="startLine" value="81" />
  803. </Range>
  804. </option>
  805. <option name="relativePath" value=".venv\Lib\site-packages\colorama-0.4.6.dist-info\METADATA" />
  806. </CodebaseContextVariableValue>
  807. <CodebaseContextVariableValue>
  808. <option name="chunk" value=".venv\Lib\site-packages\starlette\middleware\sessions.py: self.security_flags += &quot;; secure&quot;&#10; if domain is not None:&#10; self.security_flags += f&quot;; domain={domain}&quot;&#10;async def __call__(self, scope: Scope, receive: Receive, send: Send) -&gt; None:&#10; if scope[&quot;type&quot;] not in (&quot;http&quot;, &quot;websocket&quot;): # pragma: no cover&#10; await self.app(scope, receive, send)&#10; return&#10; connection = HTTPConnection(scope)&#10; initial_session_was_empty = True&#10; if self.session_cookie in connection.cookies:&#10; data = connection.cookies[self.session_cookie].encode(&quot;utf-8&quot;)&#10; try:&#10; data = self.signer.unsign(data, max_age=self.max_age)&#10; scope[&quot;session&quot;] = json.loads(b64decode(data))&#10; initial_session_was_empty = False&#10; except BadSignature:&#10; scope[&quot;session&quot;] = {}&#10; else:&#10; scope[&quot;session&quot;] = {}&#10; async def send_wrapper(message: Message) -&gt; None:&#10; if message[&quot;type&quot;] == &quot;http.response.start&quot;:&#10; if scope[&quot;session&quot;]:&#10; # We have session data to persist." />
  809. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/middleware/sessions.py" />
  810. <option name="range">
  811. <Range>
  812. <option name="endColumn" value="1" />
  813. <option name="endLine" value="60" />
  814. <option name="startColumn" value="1" />
  815. <option name="startLine" value="34" />
  816. </Range>
  817. </option>
  818. <option name="relativePath" value=".venv\Lib\site-packages\starlette\middleware\sessions.py" />
  819. </CodebaseContextVariableValue>
  820. <CodebaseContextVariableValue>
  821. <option name="chunk" value=".venv\Lib\site-packages\fastapi\openapi\utils.py: operation.setdefault(&quot;responses&quot;, {}).setdefault(status_code, {})[&#10; &quot;description&quot;&#10;] = route.response_description&#10;if route_response_media_type and is_body_allowed_for_status_code(&#10; route.status_code&#10;):&#10; response_schema = {&quot;type&quot;: &quot;string&quot;}&#10; if lenient_issubclass(current_response_class, JSONResponse):&#10; if route.response_field:&#10; response_schema = get_schema_from_model_field(&#10; field=route.response_field,&#10; schema_generator=schema_generator,&#10; model_name_map=model_name_map,&#10; field_mapping=field_mapping,&#10; separate_input_output_schemas=separate_input_output_schemas,&#10; )&#10; else:&#10; response_schema = {}&#10; operation.setdefault(&quot;responses&quot;, {}).setdefault(&#10; status_code, {}&#10; ).setdefault(&quot;content&quot;, {}).setdefault(route_response_media_type, {})[&#10; &quot;schema&quot;&#10; ] = response_schema&#10;if route.responses:&#10; operation_responses = operation.setdefault(&quot;responses&quot;, {})&#10; for (&#10; additional_status_code,&#10; additional_response," />
  822. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/openapi/utils.py" />
  823. <option name="range">
  824. <Range>
  825. <option name="endColumn" value="1" />
  826. <option name="endLine" value="357" />
  827. <option name="startColumn" value="1" />
  828. <option name="startLine" value="330" />
  829. </Range>
  830. </option>
  831. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\openapi\utils.py" />
  832. </CodebaseContextVariableValue>
  833. <CodebaseContextVariableValue>
  834. <option name="chunk" value=".venv\Lib\site-packages\fastapi\routing.py: Doc(&#10; &quot;&quot;&quot;&#10; Extra metadata to be included in the OpenAPI schema for this *path&#10; operation*.&#10; Read more about it in the&#10; [FastAPI docs for Path Operation Advanced Configuration](https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#custom-openapi-path-operation-schema).&#10; &quot;&quot;&quot;&#10; ),&#10; ] = None,&#10; generate_unique_id_function: Annotated[&#10; Callable[[APIRoute], str],&#10; Doc(&#10; &quot;&quot;&quot;&#10; Customize the function used to generate unique IDs for the *path&#10; operations* shown in the generated OpenAPI.&#10; This is particularly useful when automatically generating clients or&#10; SDKs for your API.&#10; Read more about it in the&#10; [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).&#10; &quot;&quot;&quot;&#10; ),&#10; ] = Default(generate_unique_id),&#10;) -&gt; Callable[[DecoratedCallable], DecoratedCallable]:&#10; &quot;&quot;&quot;&#10; Add a *path operation* using an HTTP TRACE operation.&#10; ## Example&#10; ```python&#10; from fastapi import APIRouter, FastAPI&#10; from pydantic import BaseModel&#10; class Item(BaseModel):&#10; name: str" />
  835. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/routing.py" />
  836. <option name="range">
  837. <Range>
  838. <option name="endColumn" value="1" />
  839. <option name="endLine" value="4367" />
  840. <option name="startColumn" value="1" />
  841. <option name="startLine" value="4331" />
  842. </Range>
  843. </option>
  844. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\routing.py" />
  845. </CodebaseContextVariableValue>
  846. <CodebaseContextVariableValue>
  847. <option name="chunk" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\METADATA: &lt;a href=&quot;https://platform.sh/try-it-now/?utm_source=fastapi-signup&amp;utm_medium=banner&amp;utm_campaign=FastAPI-signup-June-2023&quot; target=&quot;_blank&quot; title=&quot;Build, run and scale your apps on a modern, reliable, and secure PaaS.&quot;&gt;&lt;img src=&quot;https://fastapi.tiangolo.com/img/sponsors/platform-sh.png&quot;&gt;&lt;/a&gt;&#10;&lt;a href=&quot;https://www.porter.run&quot; target=&quot;_blank&quot; title=&quot;Deploy FastAPI on AWS with a few clicks&quot;&gt;&lt;img src=&quot;https://fastapi.tiangolo.com/img/sponsors/porter.png&quot;&gt;&lt;/a&gt;&#10;&lt;a href=&quot;https://bump.sh/fastapi?utm_source=fastapi&amp;utm_medium=referral&amp;utm_campaign=sponsor&quot; target=&quot;_blank&quot; title=&quot;Automate FastAPI documentation generation with Bump.sh&quot;&gt;&lt;img src=&quot;https://fastapi.tiangolo.com/img/sponsors/bump-sh.svg&quot;&gt;&lt;/a&gt;" />
  848. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi-0.115.11.dist-info/METADATA" />
  849. <option name="range">
  850. <Range>
  851. <option name="endColumn" value="1" />
  852. <option name="endLine" value="117" />
  853. <option name="startColumn" value="1" />
  854. <option name="startLine" value="115" />
  855. </Range>
  856. </option>
  857. <option name="relativePath" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\METADATA" />
  858. </CodebaseContextVariableValue>
  859. <CodebaseContextVariableValue>
  860. <option name="chunk" value=".venv\Lib\site-packages\fastapi\security\api_key.py: api_key = request.headers.get(self.model.name)&#10; return self.check_api_key(api_key, self.auto_error)&#10;class APIKeyCookie(APIKeyBase):&#10; &quot;&quot;&quot;&#10; API key authentication using a cookie.&#10; This defines the name of the cookie that should be provided in the request with&#10; the API key and integrates that into the OpenAPI documentation. It extracts&#10; the key value sent in the cookie automatically and provides it as the dependency&#10; result. But it doesn't define how to set that cookie.&#10; ## Usage&#10; Create an instance object and use that object as the dependency in `Depends()`.&#10; The dependency result will be a string containing the key value.&#10; ## Example&#10; ```python&#10; from fastapi import Depends, FastAPI&#10; from fastapi.security import APIKeyCookie&#10; app = FastAPI()&#10; cookie_scheme = APIKeyCookie(name=&quot;session&quot;)&#10; @app.get(&quot;/items/&quot;)&#10; async def read_items(session: str = Depends(cookie_scheme)):&#10; return {&quot;session&quot;: session}&#10; ```&#10; &quot;&quot;&quot;&#10; def __init__(&#10; self,&#10; *,&#10; name: Annotated[str, Doc(&quot;Cookie name.&quot;)],&#10; scheme_name: Annotated[&#10; Optional[str]," />
  861. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/security/api_key.py" />
  862. <option name="range">
  863. <Range>
  864. <option name="endColumn" value="1" />
  865. <option name="endLine" value="240" />
  866. <option name="startColumn" value="1" />
  867. <option name="startLine" value="199" />
  868. </Range>
  869. </option>
  870. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\security\api_key.py" />
  871. </CodebaseContextVariableValue>
  872. <CodebaseContextVariableValue>
  873. <option name="chunk" value=".idea\workspace.xml: &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;project version=&quot;4&quot;&gt;&#10; &lt;component name=&quot;AutoImportSettings&quot;&gt;&#10; &lt;option name=&quot;autoReloadType&quot; value=&quot;SELECTIVE&quot; /&gt;&#10; &lt;/component&gt;&#10; &lt;component name=&quot;ChangeListManager&quot;&gt;&#10; &lt;list default=&quot;true&quot; id=&quot;801df9eb-d20f-4251-b634-47239bf95d8b&quot; name=&quot;更改&quot; comment=&quot;增强安全性与可读性&quot;&gt;&#10; &lt;change beforePath=&quot;C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py&quot; beforeDir=&quot;false&quot; afterPath=&quot;C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py&quot; afterDir=&quot;false&quot; /&gt;&#10; &lt;change beforePath=&quot;C:/Users/32965/PycharmProjects/GitNexus/demo.py&quot; beforeDir=&quot;false&quot; afterPath=&quot;C:/Users/32965/PycharmProjects/GitNexus/demo.py&quot; afterDir=&quot;false&quot; /&gt;&#10; &lt;change beforePath=&quot;C:/Users/32965/PycharmProjects/GitNexus/models/gitModels.py&quot; beforeDir=&quot;false&quot; afterPath=&quot;C:/Users/32965/PycharmProjects/GitNexus/models/gitModels.py&quot; afterDir=&quot;false&quot; /&gt;&#10; &lt;/list&gt;&#10; &lt;option name=&quot;SHOW_DIALOG&quot; value=&quot;false&quot; /&gt;&#10; &lt;option name=&quot;HIGHLIGHT_CONFLICTS&quot; value=&quot;true&quot; /&gt;&#10; &lt;option name=&quot;HIGHLIGHT_NON_ACTIVE_CHANGELIST&quot; value=&quot;false&quot; /&gt;" />
  874. <option name="filePath" value="$PROJECT_DIR$/.idea/workspace.xml" />
  875. <option name="range">
  876. <Range>
  877. <option name="endColumn" value="1" />
  878. <option name="endLine" value="14" />
  879. <option name="startColumn" value="1" />
  880. <option name="startLine" value="1" />
  881. </Range>
  882. </option>
  883. <option name="relativePath" value=".idea\workspace.xml" />
  884. </CodebaseContextVariableValue>
  885. <CodebaseContextVariableValue>
  886. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\urllib3\poolmanager.py: provided, it is merged with the instance's ``connection_pool_kw``&#10; variable and used to create the new connection pool, if one is&#10; needed.&#10; &quot;&quot;&quot;&#10; if not host:&#10; raise LocationValueError(&quot;No host specified.&quot;)&#10; request_context = self._merge_pool_kwargs(pool_kwargs)&#10; request_context[&quot;scheme&quot;] = scheme or &quot;http&quot;&#10; if not port:&#10; port = port_by_scheme.get(request_context[&quot;scheme&quot;].lower(), 80)&#10; request_context[&quot;port&quot;] = port&#10; request_context[&quot;host&quot;] = host&#10; return self.connection_from_context(request_context)&#10;def connection_from_context(self, request_context):&#10; &quot;&quot;&quot;&#10; Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context.&#10; ``request_context`` must at least contain the ``scheme`` key and its&#10; value must be a key in ``key_fn_by_scheme`` instance variable.&#10; &quot;&quot;&quot;&#10; scheme = request_context[&quot;scheme&quot;].lower()&#10; pool_key_constructor = self.key_fn_by_scheme.get(scheme)" />
  887. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py" />
  888. <option name="range">
  889. <Range>
  890. <option name="endColumn" value="1" />
  891. <option name="endLine" value="256" />
  892. <option name="startColumn" value="1" />
  893. <option name="startLine" value="231" />
  894. </Range>
  895. </option>
  896. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\urllib3\poolmanager.py" />
  897. </CodebaseContextVariableValue>
  898. <CodebaseContextVariableValue>
  899. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: &quot;AppDirs&quot;,&#10; &quot;PlatformDirsABC&quot;,&#10; &quot;user_data_dir&quot;,&#10; &quot;user_config_dir&quot;,&#10; &quot;user_cache_dir&quot;,&#10; &quot;user_state_dir&quot;,&#10; &quot;user_log_dir&quot;,&#10; &quot;user_documents_dir&quot;,&#10; &quot;user_downloads_dir&quot;,&#10; &quot;user_pictures_dir&quot;,&#10; &quot;user_videos_dir&quot;,&#10; &quot;user_music_dir&quot;,&#10; &quot;user_runtime_dir&quot;,&#10; &quot;site_data_dir&quot;,&#10; &quot;site_config_dir&quot;,&#10; &quot;site_cache_dir&quot;,&#10; &quot;user_data_path&quot;,&#10; &quot;user_config_path&quot;,&#10; &quot;user_cache_path&quot;,&#10; &quot;user_state_path&quot;,&#10; &quot;user_log_path&quot;,&#10; &quot;user_documents_path&quot;,&#10; &quot;user_downloads_path&quot;,&#10; &quot;user_pictures_path&quot;,&#10; &quot;user_videos_path&quot;,&#10; &quot;user_music_path&quot;,&#10; &quot;user_runtime_path&quot;,&#10; &quot;site_data_path&quot;,&#10; &quot;site_config_path&quot;,&#10; &quot;site_cache_path&quot;,&#10;]" />
  900. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py" />
  901. <option name="range">
  902. <Range>
  903. <option name="endColumn" value="1" />
  904. <option name="endLine" value="566" />
  905. <option name="startColumn" value="1" />
  906. <option name="startLine" value="536" />
  907. </Range>
  908. </option>
  909. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py" />
  910. </CodebaseContextVariableValue>
  911. <CodebaseContextVariableValue>
  912. <option name="chunk" value=".venv\Lib\site-packages\fastapi\datastructures.py: Read more about it in the&#10;[FastAPI docs for Request Files](https://fastapi.tiangolo.com/tutorial/request-files/).&#10;## Example&#10;```python&#10;from typing import Annotated&#10;from fastapi import FastAPI, File, UploadFile&#10;app = FastAPI()&#10;@app.post(&quot;/files/&quot;)&#10;async def create_file(file: Annotated[bytes, File()]):&#10; return {&quot;file_size&quot;: len(file)}&#10;@app.post(&quot;/uploadfile/&quot;)&#10;async def create_upload_file(file: UploadFile):&#10; return {&quot;filename&quot;: file.filename}&#10;```&#10;&quot;&quot;&quot;&#10;file: Annotated[&#10; BinaryIO,&#10; Doc(&quot;The standard Python file object (non-async).&quot;),&#10;]&#10;filename: Annotated[Optional[str], Doc(&quot;The original file name.&quot;)]&#10;size: Annotated[Optional[int], Doc(&quot;The size of the file in bytes.&quot;)]&#10;headers: Annotated[Headers, Doc(&quot;The headers of the request.&quot;)]&#10;content_type: Annotated[&#10; Optional[str], Doc(&quot;The content type of the request, from the headers.&quot;)&#10;]&#10;async def write(&#10; self,&#10; data: Annotated[&#10; bytes,&#10; Doc(&#10; &quot;&quot;&quot;" />
  913. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/datastructures.py" />
  914. <option name="range">
  915. <Range>
  916. <option name="endColumn" value="1" />
  917. <option name="endLine" value="80" />
  918. <option name="startColumn" value="1" />
  919. <option name="startLine" value="40" />
  920. </Range>
  921. </option>
  922. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\datastructures.py" />
  923. </CodebaseContextVariableValue>
  924. <CodebaseContextVariableValue>
  925. <option name="chunk" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\METADATA: &lt;a href=&quot;https://github.com/fastapi/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster&quot; target=&quot;_blank&quot;&gt;&#10; &lt;img src=&quot;https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&amp;branch=master&quot; alt=&quot;Test&quot;&gt;&#10;&lt;/a&gt;&#10;&lt;a href=&quot;https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi&quot; target=&quot;_blank&quot;&gt;&#10; &lt;img src=&quot;https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg&quot; alt=&quot;Coverage&quot;&gt;&#10;&lt;/a&gt;&#10;&lt;a href=&quot;https://pypi.org/project/fastapi&quot; target=&quot;_blank&quot;&gt;&#10; &lt;img src=&quot;https://img.shields.io/pypi/v/fastapi?color=%2334D058&amp;label=pypi%20package&quot; alt=&quot;Package version&quot;&gt;&#10;&lt;/a&gt;&#10;&lt;a href=&quot;https://pypi.org/project/fastapi&quot; target=&quot;_blank&quot;&gt;&#10; &lt;img src=&quot;https://img.shields.io/pypi/pyversions/fastapi.svg?color=%2334D058&quot; alt=&quot;Supported Python versions&quot;&gt;&#10;&lt;/a&gt;&#10;&lt;/p&gt;" />
  926. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi-0.115.11.dist-info/METADATA" />
  927. <option name="range">
  928. <Range>
  929. <option name="endColumn" value="1" />
  930. <option name="endLine" value="85" />
  931. <option name="startColumn" value="1" />
  932. <option name="startLine" value="73" />
  933. </Range>
  934. </option>
  935. <option name="relativePath" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\METADATA" />
  936. </CodebaseContextVariableValue>
  937. <CodebaseContextVariableValue>
  938. <option name="chunk" value=".venv\Lib\site-packages\starlette\templating.py: 'Replace `TemplateResponse(name, {&quot;context&quot;: context})` by `TemplateResponse(request, name)`.',&#10; DeprecationWarning,&#10; )&#10; if &quot;request&quot; not in kwargs.get(&quot;context&quot;, {}):&#10; raise ValueError('context must include a &quot;request&quot; key')&#10; context = kwargs.get(&quot;context&quot;, {})&#10; request = kwargs.get(&quot;request&quot;, context.get(&quot;request&quot;))&#10; name = typing.cast(str, kwargs[&quot;name&quot;])&#10; status_code = kwargs.get(&quot;status_code&quot;, 200)&#10; headers = kwargs.get(&quot;headers&quot;)&#10; media_type = kwargs.get(&quot;media_type&quot;)&#10; background = kwargs.get(&quot;background&quot;)&#10;context.setdefault(&quot;request&quot;, request)&#10;for context_processor in self.context_processors:&#10; context.update(context_processor(request))&#10;template = self.get_template(name)&#10;return _TemplateResponse(&#10; template,&#10; context,&#10; status_code=status_code,&#10; headers=headers,&#10; media_type=media_type,&#10; background=background,&#10;)" />
  939. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/templating.py" />
  940. <option name="range">
  941. <Range>
  942. <option name="endColumn" value="1" />
  943. <option name="endLine" value="216" />
  944. <option name="startColumn" value="1" />
  945. <option name="startLine" value="190" />
  946. </Range>
  947. </option>
  948. <option name="relativePath" value=".venv\Lib\site-packages\starlette\templating.py" />
  949. </CodebaseContextVariableValue>
  950. <CodebaseContextVariableValue>
  951. <option name="chunk" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\METADATA: * &lt;a href=&quot;https://docs.pydantic.dev/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot;&gt;Pydantic&lt;/a&gt; for the data parts.&#10;## Installation&#10;Create and activate a &lt;a href=&quot;https://fastapi.tiangolo.com/virtual-environments/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot;&gt;virtual environment&lt;/a&gt; and then install FastAPI:&#10;&lt;div class=&quot;termy&quot;&gt;&#10;```console&#10;$ pip install &quot;fastapi[standard]&quot;&#10;---&gt; 100%&#10;```&#10;&lt;/div&gt;&#10;**Note**: Make sure you put `&quot;fastapi[standard]&quot;` in quotes to ensure it works in all terminals.&#10;## Example&#10;### Create it&#10;* Create a file `main.py` with:&#10;```Python&#10;from typing import Union&#10;from fastapi import FastAPI&#10;app = FastAPI()&#10;@app.get(&quot;/&quot;)&#10;def read_root():&#10; return {&quot;Hello&quot;: &quot;World&quot;}&#10;@app.get(&quot;/items/{item_id}&quot;)&#10;def read_item(item_id: int, q: Union[str, None] = None):&#10; return {&quot;item_id&quot;: item_id, &quot;q&quot;: q}&#10;```&#10;&lt;details markdown=&quot;1&quot;&gt;&#10;&lt;summary&gt;Or use &lt;code&gt;async def&lt;/code&gt;...&lt;/summary&gt;" />
  952. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi-0.115.11.dist-info/METADATA" />
  953. <option name="range">
  954. <Range>
  955. <option name="endColumn" value="1" />
  956. <option name="endLine" value="239" />
  957. <option name="startColumn" value="1" />
  958. <option name="startLine" value="196" />
  959. </Range>
  960. </option>
  961. <option name="relativePath" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\METADATA" />
  962. </CodebaseContextVariableValue>
  963. <CodebaseContextVariableValue>
  964. <option name="chunk" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\METADATA: &lt;a href=&quot;https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi/?utm_campaign=fastapi_framework&amp;utm_source=fastapi_sponsorship&amp;utm_medium=web_referral&quot; target=&quot;_blank&quot; title=&quot;Simplify Full Stack Development with FastAPI &amp; MongoDB&quot;&gt;&lt;img src=&quot;https://fastapi.tiangolo.com/img/sponsors/mongodb.png&quot;&gt;&lt;/a&gt;&#10;&lt;a href=&quot;https://zuplo.link/fastapi-gh&quot; target=&quot;_blank&quot; title=&quot;Zuplo: Scale, Protect, Document, and Monetize your FastAPI&quot;&gt;&lt;img src=&quot;https://fastapi.tiangolo.com/img/sponsors/zuplo.png&quot;&gt;&lt;/a&gt;&#10;&lt;a href=&quot;https://liblab.com?utm_source=fastapi&quot; target=&quot;_blank&quot; title=&quot;liblab - Generate SDKs from FastAPI&quot;&gt;&lt;img src=&quot;https://fastapi.tiangolo.com/img/sponsors/liblab.png&quot;&gt;&lt;/a&gt;" />
  965. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi-0.115.11.dist-info/METADATA" />
  966. <option name="range">
  967. <Range>
  968. <option name="endColumn" value="1" />
  969. <option name="endLine" value="123" />
  970. <option name="startColumn" value="1" />
  971. <option name="startLine" value="121" />
  972. </Range>
  973. </option>
  974. <option name="relativePath" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\METADATA" />
  975. </CodebaseContextVariableValue>
  976. <CodebaseContextVariableValue>
  977. <option name="chunk" value=".venv\Lib\site-packages\fastapi\param_functions.py: ] = True,&#10;) -&gt; Any:&#10; &quot;&quot;&quot;&#10; Declare a FastAPI Security dependency.&#10; The only difference with a regular dependency is that it can declare OAuth2&#10; scopes that will be integrated with OpenAPI and the automatic UI docs (by default&#10; at `/docs`).&#10; It takes a single &quot;dependable&quot; callable (like a function).&#10; Don't call it directly, FastAPI will call it for you.&#10; Read more about it in the&#10; [FastAPI docs for Security](https://fastapi.tiangolo.com/tutorial/security/) and&#10; in the&#10; [FastAPI docs for OAuth2 scopes](https://fastapi.tiangolo.com/advanced/security/oauth2-scopes/).&#10; **Example**&#10; ```python&#10; from typing import Annotated&#10; from fastapi import Security, FastAPI&#10; from .db import User&#10; from .security import get_current_active_user&#10; app = FastAPI()&#10; @app.get(&quot;/users/me/items/&quot;)&#10; async def read_own_items(&#10; current_user: Annotated[User, Security(get_current_active_user, scopes=[&quot;items&quot;])]&#10; ):&#10; return [{&quot;item_id&quot;: &quot;Foo&quot;, &quot;owner&quot;: current_user.username}]&#10; ```&#10; &quot;&quot;&quot;" />
  978. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/param_functions.py" />
  979. <option name="range">
  980. <Range>
  981. <option name="endColumn" value="1" />
  982. <option name="endLine" value="2359" />
  983. <option name="startColumn" value="1" />
  984. <option name="startLine" value="2323" />
  985. </Range>
  986. </option>
  987. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\param_functions.py" />
  988. </CodebaseContextVariableValue>
  989. <CodebaseContextVariableValue>
  990. <option name="chunk" value=".venv\Lib\site-packages\fastapi\params.py: json_schema_extra=json_schema_extra,&#10; **extra,&#10; )&#10;class Depends:&#10; def __init__(&#10; self, dependency: Optional[Callable[..., Any]] = None, *, use_cache: bool = True&#10; ):&#10; self.dependency = dependency&#10; self.use_cache = use_cache&#10; def __repr__(self) -&gt; str:&#10; attr = getattr(self.dependency, &quot;__name__&quot;, type(self.dependency).__name__)&#10; cache = &quot;&quot; if self.use_cache else &quot;, use_cache=False&quot;&#10; return f&quot;{self.__class__.__name__}({attr}{cache})&quot;&#10;class Security(Depends):&#10; def __init__(&#10; self,&#10; dependency: Optional[Callable[..., Any]] = None,&#10; *,&#10; scopes: Optional[Sequence[str]] = None,&#10; use_cache: bool = True,&#10; ):&#10; super().__init__(dependency=dependency, use_cache=use_cache)&#10; self.scopes = scopes or []" />
  991. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/params.py" />
  992. <option name="range">
  993. <Range>
  994. <option name="endColumn" value="1" />
  995. <option name="endLine" value="786" />
  996. <option name="startColumn" value="1" />
  997. <option name="startLine" value="759" />
  998. </Range>
  999. </option>
  1000. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\params.py" />
  1001. </CodebaseContextVariableValue>
  1002. <CodebaseContextVariableValue>
  1003. <option name="chunk" value=".venv\Lib\site-packages\starlette\middleware\sessions.py: data = b64encode(json.dumps(scope[&quot;session&quot;]).encode(&quot;utf-8&quot;))&#10; data = self.signer.sign(data)&#10; headers = MutableHeaders(scope=message)&#10; header_value = &quot;{session_cookie}={data}; path={path}; {max_age}{security_flags}&quot;.format(&#10; session_cookie=self.session_cookie,&#10; data=data.decode(&quot;utf-8&quot;),&#10; path=self.path,&#10; max_age=f&quot;Max-Age={self.max_age}; &quot; if self.max_age else &quot;&quot;,&#10; security_flags=self.security_flags,&#10; )&#10; headers.append(&quot;Set-Cookie&quot;, header_value)&#10;elif not initial_session_was_empty:&#10; # The session has been cleared.&#10; headers = MutableHeaders(scope=message)&#10; header_value = &quot;{session_cookie}={data}; path={path}; {expires}{security_flags}&quot;.format(&#10; session_cookie=self.session_cookie,&#10; data=&quot;null&quot;,&#10; path=self.path,&#10; expires=&quot;expires=Thu, 01 Jan 1970 00:00:00 GMT; &quot;," />
  1004. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/middleware/sessions.py" />
  1005. <option name="range">
  1006. <Range>
  1007. <option name="endColumn" value="1" />
  1008. <option name="endLine" value="79" />
  1009. <option name="startColumn" value="1" />
  1010. <option name="startLine" value="61" />
  1011. </Range>
  1012. </option>
  1013. <option name="relativePath" value=".venv\Lib\site-packages\starlette\middleware\sessions.py" />
  1014. </CodebaseContextVariableValue>
  1015. <CodebaseContextVariableValue>
  1016. <option name="chunk" value=".venv\Lib\site-packages\fastapi_cdn_host\utils.py: &gt;&gt;&gt; app = FastAPI(openapi_url=&quot;/v1/api.json&quot;)&#10; &gt;&gt;&gt; fastapi_cdn_host.patch_docs(app, lock=fastapi_cdn_host.weekday_lock)&#10; &quot;&quot;&quot;&#10; WeekdayLock(name, exclude_localhost)(request)&#10;def today_lock(request: Request, name=&quot;day&quot;, exclude_localhost=True) -&gt; None:&#10; &quot;&quot;&quot;Check docs query param contains `day` and its value is today.&#10; Usage::&#10; &gt;&gt;&gt; import fastapi_cdn_host&#10; &gt;&gt;&gt; from fastapi import FastAPI&#10; &gt;&gt;&gt; app = FastAPI(openapi_url='/v1/api.json')&#10; &gt;&gt;&gt; fastapi_cdn_host.patch_docs(app, lock=fastapi_cdn_host.today_lock)&#10; &quot;&quot;&quot;&#10; TodayLock(name, exclude_localhost)(request)" />
  1017. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi_cdn_host/utils.py" />
  1018. <option name="range">
  1019. <Range>
  1020. <option name="endColumn" value="1" />
  1021. <option name="endLine" value="123" />
  1022. <option name="startColumn" value="1" />
  1023. <option name="startLine" value="108" />
  1024. </Range>
  1025. </option>
  1026. <option name="relativePath" value=".venv\Lib\site-packages\fastapi_cdn_host\utils.py" />
  1027. </CodebaseContextVariableValue>
  1028. <CodebaseContextVariableValue>
  1029. <option name="chunk" value=".venv\Lib\site-packages\starlette\schemas.py: elif inspect.isfunction(route.endpoint) or inspect.ismethod(route.endpoint):&#10; path = self._remove_converter(route.path)&#10; for method in route.methods or [&quot;GET&quot;]:&#10; if method == &quot;HEAD&quot;:&#10; continue&#10; endpoints_info.append(EndpointInfo(path, method.lower(), route.endpoint))&#10; else:&#10; path = self._remove_converter(route.path)&#10; for method in [&quot;get&quot;, &quot;post&quot;, &quot;put&quot;, &quot;patch&quot;, &quot;delete&quot;, &quot;options&quot;]:&#10; if not hasattr(route.endpoint, method):&#10; continue&#10; func = getattr(route.endpoint, method)&#10; endpoints_info.append(EndpointInfo(path, method.lower(), func))&#10; return endpoints_info&#10;def _remove_converter(self, path: str) -&gt; str:&#10; &quot;&quot;&quot;&#10; Remove the converter from the path.&#10; For example, a route like this:&#10; Route(&quot;/users/{id:int}&quot;, endpoint=get_user, methods=[&quot;GET&quot;])&#10; Should be represented as `/users/{id}` in the OpenAPI schema.&#10; &quot;&quot;&quot;&#10; return _remove_converter_pattern.sub(&quot;}&quot;, path)" />
  1030. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/schemas.py" />
  1031. <option name="range">
  1032. <Range>
  1033. <option name="endColumn" value="1" />
  1034. <option name="endLine" value="95" />
  1035. <option name="startColumn" value="1" />
  1036. <option name="startLine" value="72" />
  1037. </Range>
  1038. </option>
  1039. <option name="relativePath" value=".venv\Lib\site-packages\starlette\schemas.py" />
  1040. </CodebaseContextVariableValue>
  1041. <CodebaseContextVariableValue>
  1042. <option name="chunk" value=".venv\Lib\site-packages\fastapi\applications.py: In FastAPI, you normally would use the *path operation methods*,&#10; like `app.get()`, `app.post()`, etc.&#10; &quot;&quot;&quot;&#10; ),&#10;] = None,&#10;title: Annotated[&#10; str,&#10; Doc(&#10; &quot;&quot;&quot;&#10; The title of the API.&#10; It will be added to the generated OpenAPI (e.g. visible at `/docs`).&#10; Read more in the&#10; [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-api).&#10; **Example**&#10; ```python&#10; from fastapi import FastAPI&#10; app = FastAPI(title=&quot;ChimichangApp&quot;)&#10; ```&#10; &quot;&quot;&quot;&#10; ),&#10;] = &quot;FastAPI&quot;,&#10;summary: Annotated[&#10; Optional[str],&#10; Doc(&#10; &quot;&quot;&quot;&#10; A short summary of the API.&#10; It will be added to the generated OpenAPI (e.g. visible at `/docs`).&#10; Read more in the&#10; [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-api).&#10; **Example**&#10; ```python&#10; from fastapi import FastAPI&#10; app = FastAPI(summary=&quot;Deadpond's favorite app. Nuff said.&quot;)&#10; ```&#10; &quot;&quot;&quot;&#10; )," />
  1043. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/applications.py" />
  1044. <option name="range">
  1045. <Range>
  1046. <option name="endColumn" value="1" />
  1047. <option name="endLine" value="141" />
  1048. <option name="startColumn" value="1" />
  1049. <option name="startLine" value="96" />
  1050. </Range>
  1051. </option>
  1052. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\applications.py" />
  1053. </CodebaseContextVariableValue>
  1054. <CodebaseContextVariableValue>
  1055. <option name="chunk" value=".venv\Lib\site-packages\fastapi\param_functions.py: dependency is called again (if declared more than once) in the same request.&#10; &quot;&quot;&quot;&#10; ),&#10; ] = True,&#10;) -&gt; Any:&#10; &quot;&quot;&quot;&#10; Declare a FastAPI dependency.&#10; It takes a single &quot;dependable&quot; callable (like a function).&#10; Don't call it directly, FastAPI will call it for you.&#10; Read more about it in the&#10; [FastAPI docs for Dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/).&#10; **Example**&#10; ```python&#10; from typing import Annotated&#10; from fastapi import Depends, FastAPI&#10; app = FastAPI()&#10; async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100):&#10; return {&quot;q&quot;: q, &quot;skip&quot;: skip, &quot;limit&quot;: limit}&#10; @app.get(&quot;/items/&quot;)&#10; async def read_items(commons: Annotated[dict, Depends(common_parameters)]):&#10; return commons&#10; ```&#10; &quot;&quot;&quot;&#10; return params.Depends(dependency=dependency, use_cache=use_cache)&#10;def Security( # noqa: N802&#10; dependency: Annotated[&#10; Optional[Callable[..., Any]],&#10; Doc(&#10; &quot;&quot;&quot;&#10; A &quot;dependable&quot; callable (like a function)." />
  1056. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/param_functions.py" />
  1057. <option name="range">
  1058. <Range>
  1059. <option name="endColumn" value="1" />
  1060. <option name="endLine" value="2285" />
  1061. <option name="startColumn" value="1" />
  1062. <option name="startLine" value="2243" />
  1063. </Range>
  1064. </option>
  1065. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\param_functions.py" />
  1066. </CodebaseContextVariableValue>
  1067. <CodebaseContextVariableValue>
  1068. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\requests\sessions.py: keys_to_move = [k for k in self.adapters if len(k) &lt; len(prefix)]&#10; for key in keys_to_move:&#10; self.adapters[key] = self.adapters.pop(key)&#10; def __getstate__(self):&#10; state = {attr: getattr(self, attr, None) for attr in self.__attrs__}&#10; return state&#10; def __setstate__(self, state):&#10; for attr, value in state.items():&#10; setattr(self, attr, value)&#10;def session():&#10; &quot;&quot;&quot;&#10; Returns a :class:`Session` for context-management.&#10; .. deprecated:: 1.0.0&#10; This method has been deprecated since version 1.0.0 and is only kept for&#10; backwards compatibility. New code should use :class:`~requests.sessions.Session`&#10; to create a session. This may be removed at a future date.&#10; :rtype: Session&#10; &quot;&quot;&quot;&#10; return Session()" />
  1069. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/requests/sessions.py" />
  1070. <option name="range">
  1071. <Range>
  1072. <option name="endColumn" value="1" />
  1073. <option name="endLine" value="833" />
  1074. <option name="startColumn" value="1" />
  1075. <option name="startLine" value="807" />
  1076. </Range>
  1077. </option>
  1078. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\requests\sessions.py" />
  1079. </CodebaseContextVariableValue>
  1080. <CodebaseContextVariableValue>
  1081. <option name="chunk" value=".venv\Lib\site-packages\fastapi\applications.py: In FastAPI you would normally do this with `app.add_middleware()`&#10; instead.&#10; Read more in the&#10; [FastAPI docs for Middleware](https://fastapi.tiangolo.com/tutorial/middleware/).&#10; &quot;&quot;&quot;&#10; ),&#10;] = None,&#10;exception_handlers: Annotated[&#10; Optional[&#10; Dict[&#10; Union[int, Type[Exception]],&#10; Callable[[Request, Any], Coroutine[Any, Any, Response]],&#10; ]&#10; ],&#10; Doc(&#10; &quot;&quot;&quot;&#10; A dictionary with handlers for exceptions.&#10; In FastAPI, you would normally use the decorator&#10; `@app.exception_handler()`.&#10; Read more in the&#10; [FastAPI docs for Handling Errors](https://fastapi.tiangolo.com/tutorial/handling-errors/).&#10; &quot;&quot;&quot;&#10; ),&#10;] = None,&#10;on_startup: Annotated[&#10; Optional[Sequence[Callable[[], Any]]],&#10; Doc(&#10; &quot;&quot;&quot;&#10; A list of startup event handler functions.&#10; You should instead use the `lifespan` handlers.&#10; Read more in the [FastAPI docs for `lifespan`](https://fastapi.tiangolo.com/advanced/events/).&#10; &quot;&quot;&quot;&#10; ),&#10;] = None,&#10;on_shutdown: Annotated[&#10; Optional[Sequence[Callable[[], Any]]]," />
  1082. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/applications.py" />
  1083. <option name="range">
  1084. <Range>
  1085. <option name="endColumn" value="1" />
  1086. <option name="endLine" value="517" />
  1087. <option name="startColumn" value="1" />
  1088. <option name="startLine" value="477" />
  1089. </Range>
  1090. </option>
  1091. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\applications.py" />
  1092. </CodebaseContextVariableValue>
  1093. <CodebaseContextVariableValue>
  1094. <option name="chunk" value=".venv\Lib\site-packages\fastapi\security\api_key.py: from fastapi import Depends, FastAPI&#10;from fastapi.security import APIKeyQuery&#10;app = FastAPI()&#10;query_scheme = APIKeyQuery(name=&quot;api_key&quot;)&#10;@app.get(&quot;/items/&quot;)&#10;async def read_items(api_key: str = Depends(query_scheme)):&#10; return {&quot;api_key&quot;: api_key}&#10;```&#10;&quot;&quot;&quot;&#10;def __init__(&#10; self,&#10; *,&#10; name: Annotated[&#10; str,&#10; Doc(&quot;Query parameter name.&quot;),&#10; ],&#10; scheme_name: Annotated[&#10; Optional[str],&#10; Doc(&#10; &quot;&quot;&quot;&#10; Security scheme name.&#10; It will be included in the generated OpenAPI (e.g. visible at `/docs`).&#10; &quot;&quot;&quot;&#10; ),&#10; ] = None,&#10; description: Annotated[&#10; Optional[str],&#10; Doc(&#10; &quot;&quot;&quot;&#10; Security scheme description.&#10; It will be included in the generated OpenAPI (e.g. visible at `/docs`).&#10; &quot;&quot;&quot;&#10; ),&#10; ] = None,&#10; auto_error: Annotated[&#10; bool,&#10; Doc(&#10; &quot;&quot;&quot;&#10; By default, if the query parameter is not provided, `APIKeyQuery` will&#10; automatically cancel the request and send the client an error." />
  1095. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/security/api_key.py" />
  1096. <option name="range">
  1097. <Range>
  1098. <option name="endColumn" value="1" />
  1099. <option name="endLine" value="87" />
  1100. <option name="startColumn" value="1" />
  1101. <option name="startLine" value="41" />
  1102. </Range>
  1103. </option>
  1104. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\security\api_key.py" />
  1105. </CodebaseContextVariableValue>
  1106. <CodebaseContextVariableValue>
  1107. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\cli\req_command.py: &quot;&quot;&quot;&#10;A class mixin for command classes needing _build_session().&#10;&quot;&quot;&quot;&#10;def __init__(self) -&gt; None:&#10; super().__init__()&#10; self._session: Optional[PipSession] = None&#10;@classmethod&#10;def _get_index_urls(cls, options: Values) -&gt; Optional[List[str]]:&#10; &quot;&quot;&quot;Return a list of index urls from user-provided options.&quot;&quot;&quot;&#10; index_urls = []&#10; if not getattr(options, &quot;no_index&quot;, False):&#10; url = getattr(options, &quot;index_url&quot;, None)&#10; if url:&#10; index_urls.append(url)&#10; urls = getattr(options, &quot;extra_index_urls&quot;, None)&#10; if urls:&#10; index_urls.extend(urls)&#10; # Return None rather than an empty list&#10; return index_urls or None&#10;def get_default_session(self, options: Values) -&gt; PipSession:&#10; &quot;&quot;&quot;Get a default-managed session.&quot;&quot;&quot;&#10; if self._session is None:&#10; self._session = self.enter_context(self._build_session(options))&#10; # there's no type annotation on requests.Session, so it's" />
  1108. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/cli/req_command.py" />
  1109. <option name="range">
  1110. <Range>
  1111. <option name="endColumn" value="1" />
  1112. <option name="endLine" value="99" />
  1113. <option name="startColumn" value="1" />
  1114. <option name="startLine" value="73" />
  1115. </Range>
  1116. </option>
  1117. <option name="relativePath" value=".venv\Lib\site-packages\pip\_internal\cli\req_command.py" />
  1118. </CodebaseContextVariableValue>
  1119. <CodebaseContextVariableValue>
  1120. <option name="chunk" value=".venv\Lib\site-packages\tortoise\__init__.py: for r in routers:&#10; if isinstance(r, str):&#10; try:&#10; module_name, class_name = r.rsplit(&quot;.&quot;, 1)&#10; router_cls.append(getattr(importlib.import_module(module_name), class_name))&#10; except Exception:&#10; raise ConfigurationError(f&quot;Can't import router from `{r}`&quot;)&#10; elif isinstance(r, type):&#10; router_cls.append(r)&#10; else:&#10; raise ConfigurationError(&quot;Router must be either str or type&quot;)&#10; router.init_routers(router_cls)&#10;@classmethod&#10;async def close_connections(cls) -&gt; None:&#10; &quot;&quot;&quot;&#10; Close all connections cleanly.&#10; It is required for this to be called on exit,&#10; else your event loop may never complete&#10; as it is waiting for the connections to die.&#10; .. warning::&#10; This is deprecated and will be removed in a future release. Please use&#10; :meth:`connections.close_all&lt;tortoise.connection.ConnectionHandler.close_all&gt;` instead.&#10; &quot;&quot;&quot;&#10; await connections.close_all()&#10; logger.info(&quot;Tortoise-ORM shutdown&quot;)&#10;@classmethod&#10;async def _reset_apps(cls) -&gt; None:" />
  1121. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/tortoise/__init__.py" />
  1122. <option name="range">
  1123. <Range>
  1124. <option name="endColumn" value="1" />
  1125. <option name="endLine" value="573" />
  1126. <option name="startColumn" value="1" />
  1127. <option name="startLine" value="543" />
  1128. </Range>
  1129. </option>
  1130. <option name="relativePath" value=".venv\Lib\site-packages\tortoise\__init__.py" />
  1131. </CodebaseContextVariableValue>
  1132. <CodebaseContextVariableValue>
  1133. <option name="chunk" value=".venv\Lib\site-packages\fastapi\routing.py: Optional[Any],&#10; Doc(&#10; &quot;&quot;&quot;&#10; Only used internally by FastAPI to handle dependency overrides.&#10; You shouldn't need to use it. It normally points to the `FastAPI` app&#10; object.&#10; &quot;&quot;&quot;&#10; ),&#10;] = None,&#10;route_class: Annotated[&#10; Type[APIRoute],&#10; Doc(&#10; &quot;&quot;&quot;&#10; Custom route (*path operation*) class to be used by this router.&#10; Read more about it in the&#10; [FastAPI docs for Custom Request and APIRoute class](https://fastapi.tiangolo.com/how-to/custom-request-and-route/#custom-apiroute-class-in-a-router).&#10; &quot;&quot;&quot;&#10; ),&#10;] = APIRoute,&#10;on_startup: Annotated[&#10; Optional[Sequence[Callable[[], Any]]],&#10; Doc(&#10; &quot;&quot;&quot;&#10; A list of startup event handler functions.&#10; You should instead use the `lifespan` handlers.&#10; Read more in the [FastAPI docs for `lifespan`](https://fastapi.tiangolo.com/advanced/events/).&#10; &quot;&quot;&quot;&#10; ),&#10;] = None,&#10;on_shutdown: Annotated[&#10; Optional[Sequence[Callable[[], Any]]],&#10; Doc(&#10; &quot;&quot;&quot;&#10; A list of shutdown event handler functions." />
  1134. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/routing.py" />
  1135. <option name="range">
  1136. <Range>
  1137. <option name="endColumn" value="1" />
  1138. <option name="endLine" value="771" />
  1139. <option name="startColumn" value="1" />
  1140. <option name="startLine" value="734" />
  1141. </Range>
  1142. </option>
  1143. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\routing.py" />
  1144. </CodebaseContextVariableValue>
  1145. <CodebaseContextVariableValue>
  1146. <option name="chunk" value=".venv\Lib\site-packages\fastapi\openapi\utils.py: &quot;application/json&quot;: {&#10; &quot;schema&quot;: {&quot;$ref&quot;: REF_PREFIX + &quot;HTTPValidationError&quot;}&#10; }&#10; },&#10; }&#10; if &quot;ValidationError&quot; not in definitions:&#10; definitions.update(&#10; {&#10; &quot;ValidationError&quot;: validation_error_definition,&#10; &quot;HTTPValidationError&quot;: validation_error_response_definition,&#10; }&#10; )&#10; if route.openapi_extra:&#10; deep_dict_update(operation, route.openapi_extra)&#10; path[method.lower()] = operation&#10; return path, security_schemes, definitions&#10;def get_fields_from_routes(&#10; routes: Sequence[BaseRoute],&#10;) -&gt; List[ModelField]:&#10; body_fields_from_routes: List[ModelField] = []&#10; responses_from_routes: List[ModelField] = []&#10; request_fields_from_routes: List[ModelField] = []&#10; callback_flat_models: List[ModelField] = []&#10; for route in routes:&#10; if getattr(route, &quot;include_in_schema&quot;, None) and isinstance(&#10; route, routing.APIRoute&#10; ):&#10; if route.body_field:&#10; assert isinstance(&#10; route.body_field, ModelField" />
  1147. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/openapi/utils.py" />
  1148. <option name="range">
  1149. <Range>
  1150. <option name="endColumn" value="1" />
  1151. <option name="endLine" value="438" />
  1152. <option name="startColumn" value="1" />
  1153. <option name="startLine" value="407" />
  1154. </Range>
  1155. </option>
  1156. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\openapi\utils.py" />
  1157. </CodebaseContextVariableValue>
  1158. <CodebaseContextVariableValue>
  1159. <option name="chunk" value=".venv\Lib\site-packages\fastapi\applications.py: from enum import Enum&#10;from typing import (&#10; Any,&#10; Awaitable,&#10; Callable,&#10; Coroutine,&#10; Dict,&#10; List,&#10; Optional,&#10; Sequence,&#10; Type,&#10; TypeVar,&#10; Union,&#10;)&#10;from fastapi import routing&#10;from fastapi.datastructures import Default, DefaultPlaceholder&#10;from fastapi.exception_handlers import (&#10; http_exception_handler,&#10; request_validation_exception_handler,&#10; websocket_request_validation_exception_handler,&#10;)&#10;from fastapi.exceptions import RequestValidationError, WebSocketRequestValidationError&#10;from fastapi.logger import logger&#10;from fastapi.openapi.docs import (&#10; get_redoc_html,&#10; get_swagger_ui_html,&#10; get_swagger_ui_oauth2_redirect_html,&#10;)&#10;from fastapi.openapi.utils import get_openapi&#10;from fastapi.params import Depends&#10;from fastapi.types import DecoratedCallable, IncEx&#10;from fastapi.utils import generate_unique_id&#10;from starlette.applications import Starlette&#10;from starlette.datastructures import State&#10;from starlette.exceptions import HTTPException&#10;from starlette.middleware import Middleware&#10;from starlette.middleware.base import BaseHTTPMiddleware&#10;from starlette.requests import Request&#10;from starlette.responses import HTMLResponse, JSONResponse, Response&#10;from starlette.routing import BaseRoute&#10;from starlette.types import ASGIApp, Lifespan, Receive, Scope, Send" />
  1160. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/applications.py" />
  1161. <option name="range">
  1162. <Range>
  1163. <option name="endColumn" value="1" />
  1164. <option name="endLine" value="42" />
  1165. <option name="startColumn" value="1" />
  1166. <option name="startLine" value="1" />
  1167. </Range>
  1168. </option>
  1169. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\applications.py" />
  1170. </CodebaseContextVariableValue>
  1171. <CodebaseContextVariableValue>
  1172. <option name="chunk" value=".venv\Lib\site-packages\starlette\middleware\authentication.py: from __future__ import annotations&#10;import typing&#10;from starlette.authentication import (&#10; AuthCredentials,&#10; AuthenticationBackend,&#10; AuthenticationError,&#10; UnauthenticatedUser,&#10;)&#10;from starlette.requests import HTTPConnection&#10;from starlette.responses import PlainTextResponse, Response&#10;from starlette.types import ASGIApp, Receive, Scope, Send&#10;class AuthenticationMiddleware:&#10; def __init__(&#10; self,&#10; app: ASGIApp,&#10; backend: AuthenticationBackend,&#10; on_error: typing.Callable[[HTTPConnection, AuthenticationError], Response] | None = None,&#10; ) -&gt; None:&#10; self.app = app&#10; self.backend = backend&#10; self.on_error: typing.Callable[[HTTPConnection, AuthenticationError], Response] = (&#10; on_error if on_error is not None else self.default_on_error&#10; )&#10; async def __call__(self, scope: Scope, receive: Receive, send: Send) -&gt; None:&#10; if scope[&quot;type&quot;] not in [&quot;http&quot;, &quot;websocket&quot;]:&#10; await self.app(scope, receive, send)&#10; return&#10; conn = HTTPConnection(scope)&#10; try:&#10; auth_result = await self.backend.authenticate(conn)&#10; except AuthenticationError as exc:&#10; response = self.on_error(conn, exc)" />
  1173. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/middleware/authentication.py" />
  1174. <option name="range">
  1175. <Range>
  1176. <option name="endColumn" value="1" />
  1177. <option name="endLine" value="38" />
  1178. <option name="startColumn" value="1" />
  1179. <option name="startLine" value="1" />
  1180. </Range>
  1181. </option>
  1182. <option name="relativePath" value=".venv\Lib\site-packages\starlette\middleware\authentication.py" />
  1183. </CodebaseContextVariableValue>
  1184. <CodebaseContextVariableValue>
  1185. <option name="chunk" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\RECORD: fastapi/logger.py,sha256=I9NNi3ov8AcqbsbC9wl1X-hdItKgYt2XTrx1f99Zpl4,54&#10;fastapi/middleware/__init__.py,sha256=oQDxiFVcc1fYJUOIFvphnK7pTT5kktmfL32QXpBFvvo,58&#10;fastapi/middleware/__pycache__/__init__.cpython-312.pyc,,&#10;fastapi/middleware/__pycache__/cors.cpython-312.pyc,,&#10;fastapi/middleware/__pycache__/gzip.cpython-312.pyc,,&#10;fastapi/middleware/__pycache__/httpsredirect.cpython-312.pyc,,&#10;fastapi/middleware/__pycache__/trustedhost.cpython-312.pyc,,&#10;fastapi/middleware/__pycache__/wsgi.cpython-312.pyc,,&#10;fastapi/middleware/cors.py,sha256=ynwjWQZoc_vbhzZ3_ZXceoaSrslHFHPdoM52rXr0WUU,79&#10;fastapi/middleware/gzip.py,sha256=xM5PcsH8QlAimZw4VDvcmTnqQamslThsfe3CVN2voa0,79&#10;fastapi/middleware/httpsredirect.py,sha256=rL8eXMnmLijwVkH7_400zHri1AekfeBd6D6qs8ix950,115&#10;fastapi/middleware/trustedhost.py,sha256=eE5XGRxGa7c5zPnMJDGp3BxaL25k5iVQlhnv-Pk0Pss,109" />
  1186. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi-0.115.11.dist-info/RECORD" />
  1187. <option name="range">
  1188. <Range>
  1189. <option name="endColumn" value="1" />
  1190. <option name="endLine" value="60" />
  1191. <option name="startColumn" value="1" />
  1192. <option name="startLine" value="49" />
  1193. </Range>
  1194. </option>
  1195. <option name="relativePath" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\RECORD" />
  1196. </CodebaseContextVariableValue>
  1197. </list>
  1198. </option>
  1199. <option name="codebaseReferences">
  1200. <list>
  1201. <KnowledgeReference>
  1202. <option name="chunk" value=".venv\Lib\site-packages\fastapi_cdn_host\utils.py: &gt;&gt;&gt; fastapi_cdn_host.patch_docs(app, lock=fastapi_cdn_host.utils.WeekdayLock())&#10; &quot;&quot;&quot;&#10; param_name = &quot;day&quot;&#10; @staticmethod&#10; def validate(value: str) -&gt; bool:&#10; return (weekday := getattr(calendar, value.upper(), None)) is not None and (&#10; weekday == datetime.now().weekday()&#10; )&#10;class TodayLock(WeekdayLock):&#10; &quot;&quot;&quot;Check whether docs query param.&#10; Usage::&#10; &gt;&gt;&gt; import fastapi_cdn_host&#10; &gt;&gt;&gt; from fastapi import FastAPI&#10; &gt;&gt;&gt; app = FastAPI(openapi_url='/v1/api.json')&#10; &gt;&gt;&gt; fastapi_cdn_host.patch_docs(app, lock=fastapi_cdn_host.utils.TodayLock())&#10; &quot;&quot;&quot;&#10; @staticmethod&#10; def validate(value: str) -&gt; bool:&#10; return value == str(datetime.now().date())&#10;def weekday_lock(request: Request, name=&quot;day&quot;, exclude_localhost=True) -&gt; None:&#10; &quot;&quot;&quot;Check docs/ query contains `day` param with value of today's weekday, e.g.: Monday.&#10; Usage::&#10; &gt;&gt;&gt; import fastapi_cdn_host&#10; &gt;&gt;&gt; from fastapi import FastAPI" />
  1203. <option name="metadata">
  1204. <KnowledgeReferenceMetadata>
  1205. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi_cdn_host/utils.py" />
  1206. </KnowledgeReferenceMetadata>
  1207. </option>
  1208. </KnowledgeReference>
  1209. <KnowledgeReference>
  1210. <option name="chunk" value=".venv\Lib\site-packages\colorama-0.4.6.dist-info\METADATA: applications or libraries which use ANSI sequences to produce colored output on&#10;Linux or Macs can now also work on Windows, simply by calling&#10;``colorama.just_fix_windows_console()`` (since v0.4.6) or ``colorama.init()``&#10;(all versions, but may have other side-effects – see below).&#10;An alternative approach is to install ``ansi.sys`` on Windows machines, which&#10;provides the same behaviour for all applications running in terminals. Colorama&#10;is intended for situations where that isn't easy (e.g., maybe your app doesn't&#10;have an installer.)&#10;Demo scripts in the source code repository print some colored text using&#10;ANSI sequences. Compare their output under Gnome-terminal's built in ANSI&#10;handling, versus on Windows Command-Prompt using Colorama:&#10;.. image:: https://github.com/tartley/colorama/raw/master/screenshots/ubuntu-demo.png&#10; :width: 661&#10; :height: 357&#10; :alt: ANSI sequences on Ubuntu under gnome-terminal.&#10;.. image:: https://github.com/tartley/colorama/raw/master/screenshots/windows-demo.png&#10; :width: 668&#10; :height: 325&#10; :alt: Same ANSI sequences on Windows, using Colorama." />
  1211. <option name="metadata">
  1212. <KnowledgeReferenceMetadata>
  1213. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/colorama-0.4.6.dist-info/METADATA" />
  1214. </KnowledgeReferenceMetadata>
  1215. </option>
  1216. </KnowledgeReference>
  1217. <KnowledgeReference>
  1218. <option name="chunk" value=".venv\Lib\site-packages\starlette\middleware\sessions.py: self.security_flags += &quot;; secure&quot;&#10; if domain is not None:&#10; self.security_flags += f&quot;; domain={domain}&quot;&#10;async def __call__(self, scope: Scope, receive: Receive, send: Send) -&gt; None:&#10; if scope[&quot;type&quot;] not in (&quot;http&quot;, &quot;websocket&quot;): # pragma: no cover&#10; await self.app(scope, receive, send)&#10; return&#10; connection = HTTPConnection(scope)&#10; initial_session_was_empty = True&#10; if self.session_cookie in connection.cookies:&#10; data = connection.cookies[self.session_cookie].encode(&quot;utf-8&quot;)&#10; try:&#10; data = self.signer.unsign(data, max_age=self.max_age)&#10; scope[&quot;session&quot;] = json.loads(b64decode(data))&#10; initial_session_was_empty = False&#10; except BadSignature:&#10; scope[&quot;session&quot;] = {}&#10; else:&#10; scope[&quot;session&quot;] = {}&#10; async def send_wrapper(message: Message) -&gt; None:&#10; if message[&quot;type&quot;] == &quot;http.response.start&quot;:&#10; if scope[&quot;session&quot;]:&#10; # We have session data to persist." />
  1219. <option name="metadata">
  1220. <KnowledgeReferenceMetadata>
  1221. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/middleware/sessions.py" />
  1222. </KnowledgeReferenceMetadata>
  1223. </option>
  1224. </KnowledgeReference>
  1225. <KnowledgeReference>
  1226. <option name="chunk" value=".venv\Lib\site-packages\fastapi\openapi\utils.py: operation.setdefault(&quot;responses&quot;, {}).setdefault(status_code, {})[&#10; &quot;description&quot;&#10;] = route.response_description&#10;if route_response_media_type and is_body_allowed_for_status_code(&#10; route.status_code&#10;):&#10; response_schema = {&quot;type&quot;: &quot;string&quot;}&#10; if lenient_issubclass(current_response_class, JSONResponse):&#10; if route.response_field:&#10; response_schema = get_schema_from_model_field(&#10; field=route.response_field,&#10; schema_generator=schema_generator,&#10; model_name_map=model_name_map,&#10; field_mapping=field_mapping,&#10; separate_input_output_schemas=separate_input_output_schemas,&#10; )&#10; else:&#10; response_schema = {}&#10; operation.setdefault(&quot;responses&quot;, {}).setdefault(&#10; status_code, {}&#10; ).setdefault(&quot;content&quot;, {}).setdefault(route_response_media_type, {})[&#10; &quot;schema&quot;&#10; ] = response_schema&#10;if route.responses:&#10; operation_responses = operation.setdefault(&quot;responses&quot;, {})&#10; for (&#10; additional_status_code,&#10; additional_response," />
  1227. <option name="metadata">
  1228. <KnowledgeReferenceMetadata>
  1229. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/openapi/utils.py" />
  1230. </KnowledgeReferenceMetadata>
  1231. </option>
  1232. </KnowledgeReference>
  1233. <KnowledgeReference>
  1234. <option name="chunk" value=".venv\Lib\site-packages\fastapi\routing.py: Doc(&#10; &quot;&quot;&quot;&#10; Extra metadata to be included in the OpenAPI schema for this *path&#10; operation*.&#10; Read more about it in the&#10; [FastAPI docs for Path Operation Advanced Configuration](https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#custom-openapi-path-operation-schema).&#10; &quot;&quot;&quot;&#10; ),&#10; ] = None,&#10; generate_unique_id_function: Annotated[&#10; Callable[[APIRoute], str],&#10; Doc(&#10; &quot;&quot;&quot;&#10; Customize the function used to generate unique IDs for the *path&#10; operations* shown in the generated OpenAPI.&#10; This is particularly useful when automatically generating clients or&#10; SDKs for your API.&#10; Read more about it in the&#10; [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).&#10; &quot;&quot;&quot;&#10; ),&#10; ] = Default(generate_unique_id),&#10;) -&gt; Callable[[DecoratedCallable], DecoratedCallable]:&#10; &quot;&quot;&quot;&#10; Add a *path operation* using an HTTP TRACE operation.&#10; ## Example&#10; ```python&#10; from fastapi import APIRouter, FastAPI&#10; from pydantic import BaseModel&#10; class Item(BaseModel):&#10; name: str" />
  1235. <option name="metadata">
  1236. <KnowledgeReferenceMetadata>
  1237. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/routing.py" />
  1238. </KnowledgeReferenceMetadata>
  1239. </option>
  1240. </KnowledgeReference>
  1241. <KnowledgeReference>
  1242. <option name="chunk" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\METADATA: &lt;a href=&quot;https://platform.sh/try-it-now/?utm_source=fastapi-signup&amp;utm_medium=banner&amp;utm_campaign=FastAPI-signup-June-2023&quot; target=&quot;_blank&quot; title=&quot;Build, run and scale your apps on a modern, reliable, and secure PaaS.&quot;&gt;&lt;img src=&quot;https://fastapi.tiangolo.com/img/sponsors/platform-sh.png&quot;&gt;&lt;/a&gt;&#10;&lt;a href=&quot;https://www.porter.run&quot; target=&quot;_blank&quot; title=&quot;Deploy FastAPI on AWS with a few clicks&quot;&gt;&lt;img src=&quot;https://fastapi.tiangolo.com/img/sponsors/porter.png&quot;&gt;&lt;/a&gt;&#10;&lt;a href=&quot;https://bump.sh/fastapi?utm_source=fastapi&amp;utm_medium=referral&amp;utm_campaign=sponsor&quot; target=&quot;_blank&quot; title=&quot;Automate FastAPI documentation generation with Bump.sh&quot;&gt;&lt;img src=&quot;https://fastapi.tiangolo.com/img/sponsors/bump-sh.svg&quot;&gt;&lt;/a&gt;" />
  1243. <option name="metadata">
  1244. <KnowledgeReferenceMetadata>
  1245. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi-0.115.11.dist-info/METADATA" />
  1246. </KnowledgeReferenceMetadata>
  1247. </option>
  1248. </KnowledgeReference>
  1249. <KnowledgeReference>
  1250. <option name="chunk" value=".venv\Lib\site-packages\fastapi\security\api_key.py: api_key = request.headers.get(self.model.name)&#10; return self.check_api_key(api_key, self.auto_error)&#10;class APIKeyCookie(APIKeyBase):&#10; &quot;&quot;&quot;&#10; API key authentication using a cookie.&#10; This defines the name of the cookie that should be provided in the request with&#10; the API key and integrates that into the OpenAPI documentation. It extracts&#10; the key value sent in the cookie automatically and provides it as the dependency&#10; result. But it doesn't define how to set that cookie.&#10; ## Usage&#10; Create an instance object and use that object as the dependency in `Depends()`.&#10; The dependency result will be a string containing the key value.&#10; ## Example&#10; ```python&#10; from fastapi import Depends, FastAPI&#10; from fastapi.security import APIKeyCookie&#10; app = FastAPI()&#10; cookie_scheme = APIKeyCookie(name=&quot;session&quot;)&#10; @app.get(&quot;/items/&quot;)&#10; async def read_items(session: str = Depends(cookie_scheme)):&#10; return {&quot;session&quot;: session}&#10; ```&#10; &quot;&quot;&quot;&#10; def __init__(&#10; self,&#10; *,&#10; name: Annotated[str, Doc(&quot;Cookie name.&quot;)],&#10; scheme_name: Annotated[&#10; Optional[str]," />
  1251. <option name="metadata">
  1252. <KnowledgeReferenceMetadata>
  1253. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/security/api_key.py" />
  1254. </KnowledgeReferenceMetadata>
  1255. </option>
  1256. </KnowledgeReference>
  1257. <KnowledgeReference>
  1258. <option name="chunk" value=".idea\workspace.xml: &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;project version=&quot;4&quot;&gt;&#10; &lt;component name=&quot;AutoImportSettings&quot;&gt;&#10; &lt;option name=&quot;autoReloadType&quot; value=&quot;SELECTIVE&quot; /&gt;&#10; &lt;/component&gt;&#10; &lt;component name=&quot;ChangeListManager&quot;&gt;&#10; &lt;list default=&quot;true&quot; id=&quot;801df9eb-d20f-4251-b634-47239bf95d8b&quot; name=&quot;更改&quot; comment=&quot;增强安全性与可读性&quot;&gt;&#10; &lt;change beforePath=&quot;C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py&quot; beforeDir=&quot;false&quot; afterPath=&quot;C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py&quot; afterDir=&quot;false&quot; /&gt;&#10; &lt;change beforePath=&quot;C:/Users/32965/PycharmProjects/GitNexus/demo.py&quot; beforeDir=&quot;false&quot; afterPath=&quot;C:/Users/32965/PycharmProjects/GitNexus/demo.py&quot; afterDir=&quot;false&quot; /&gt;&#10; &lt;change beforePath=&quot;C:/Users/32965/PycharmProjects/GitNexus/models/gitModels.py&quot; beforeDir=&quot;false&quot; afterPath=&quot;C:/Users/32965/PycharmProjects/GitNexus/models/gitModels.py&quot; afterDir=&quot;false&quot; /&gt;&#10; &lt;/list&gt;&#10; &lt;option name=&quot;SHOW_DIALOG&quot; value=&quot;false&quot; /&gt;&#10; &lt;option name=&quot;HIGHLIGHT_CONFLICTS&quot; value=&quot;true&quot; /&gt;&#10; &lt;option name=&quot;HIGHLIGHT_NON_ACTIVE_CHANGELIST&quot; value=&quot;false&quot; /&gt;" />
  1259. <option name="metadata">
  1260. <KnowledgeReferenceMetadata>
  1261. <option name="source" value="$PROJECT_DIR$/.idea/workspace.xml" />
  1262. </KnowledgeReferenceMetadata>
  1263. </option>
  1264. </KnowledgeReference>
  1265. <KnowledgeReference>
  1266. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\urllib3\poolmanager.py: provided, it is merged with the instance's ``connection_pool_kw``&#10; variable and used to create the new connection pool, if one is&#10; needed.&#10; &quot;&quot;&quot;&#10; if not host:&#10; raise LocationValueError(&quot;No host specified.&quot;)&#10; request_context = self._merge_pool_kwargs(pool_kwargs)&#10; request_context[&quot;scheme&quot;] = scheme or &quot;http&quot;&#10; if not port:&#10; port = port_by_scheme.get(request_context[&quot;scheme&quot;].lower(), 80)&#10; request_context[&quot;port&quot;] = port&#10; request_context[&quot;host&quot;] = host&#10; return self.connection_from_context(request_context)&#10;def connection_from_context(self, request_context):&#10; &quot;&quot;&quot;&#10; Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context.&#10; ``request_context`` must at least contain the ``scheme`` key and its&#10; value must be a key in ``key_fn_by_scheme`` instance variable.&#10; &quot;&quot;&quot;&#10; scheme = request_context[&quot;scheme&quot;].lower()&#10; pool_key_constructor = self.key_fn_by_scheme.get(scheme)" />
  1267. <option name="metadata">
  1268. <KnowledgeReferenceMetadata>
  1269. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py" />
  1270. </KnowledgeReferenceMetadata>
  1271. </option>
  1272. </KnowledgeReference>
  1273. <KnowledgeReference>
  1274. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: &quot;AppDirs&quot;,&#10; &quot;PlatformDirsABC&quot;,&#10; &quot;user_data_dir&quot;,&#10; &quot;user_config_dir&quot;,&#10; &quot;user_cache_dir&quot;,&#10; &quot;user_state_dir&quot;,&#10; &quot;user_log_dir&quot;,&#10; &quot;user_documents_dir&quot;,&#10; &quot;user_downloads_dir&quot;,&#10; &quot;user_pictures_dir&quot;,&#10; &quot;user_videos_dir&quot;,&#10; &quot;user_music_dir&quot;,&#10; &quot;user_runtime_dir&quot;,&#10; &quot;site_data_dir&quot;,&#10; &quot;site_config_dir&quot;,&#10; &quot;site_cache_dir&quot;,&#10; &quot;user_data_path&quot;,&#10; &quot;user_config_path&quot;,&#10; &quot;user_cache_path&quot;,&#10; &quot;user_state_path&quot;,&#10; &quot;user_log_path&quot;,&#10; &quot;user_documents_path&quot;,&#10; &quot;user_downloads_path&quot;,&#10; &quot;user_pictures_path&quot;,&#10; &quot;user_videos_path&quot;,&#10; &quot;user_music_path&quot;,&#10; &quot;user_runtime_path&quot;,&#10; &quot;site_data_path&quot;,&#10; &quot;site_config_path&quot;,&#10; &quot;site_cache_path&quot;,&#10;]" />
  1275. <option name="metadata">
  1276. <KnowledgeReferenceMetadata>
  1277. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py" />
  1278. </KnowledgeReferenceMetadata>
  1279. </option>
  1280. </KnowledgeReference>
  1281. <KnowledgeReference>
  1282. <option name="chunk" value=".venv\Lib\site-packages\fastapi\datastructures.py: Read more about it in the&#10;[FastAPI docs for Request Files](https://fastapi.tiangolo.com/tutorial/request-files/).&#10;## Example&#10;```python&#10;from typing import Annotated&#10;from fastapi import FastAPI, File, UploadFile&#10;app = FastAPI()&#10;@app.post(&quot;/files/&quot;)&#10;async def create_file(file: Annotated[bytes, File()]):&#10; return {&quot;file_size&quot;: len(file)}&#10;@app.post(&quot;/uploadfile/&quot;)&#10;async def create_upload_file(file: UploadFile):&#10; return {&quot;filename&quot;: file.filename}&#10;```&#10;&quot;&quot;&quot;&#10;file: Annotated[&#10; BinaryIO,&#10; Doc(&quot;The standard Python file object (non-async).&quot;),&#10;]&#10;filename: Annotated[Optional[str], Doc(&quot;The original file name.&quot;)]&#10;size: Annotated[Optional[int], Doc(&quot;The size of the file in bytes.&quot;)]&#10;headers: Annotated[Headers, Doc(&quot;The headers of the request.&quot;)]&#10;content_type: Annotated[&#10; Optional[str], Doc(&quot;The content type of the request, from the headers.&quot;)&#10;]&#10;async def write(&#10; self,&#10; data: Annotated[&#10; bytes,&#10; Doc(&#10; &quot;&quot;&quot;" />
  1283. <option name="metadata">
  1284. <KnowledgeReferenceMetadata>
  1285. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/datastructures.py" />
  1286. </KnowledgeReferenceMetadata>
  1287. </option>
  1288. </KnowledgeReference>
  1289. <KnowledgeReference>
  1290. <option name="chunk" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\METADATA: &lt;a href=&quot;https://github.com/fastapi/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster&quot; target=&quot;_blank&quot;&gt;&#10; &lt;img src=&quot;https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&amp;branch=master&quot; alt=&quot;Test&quot;&gt;&#10;&lt;/a&gt;&#10;&lt;a href=&quot;https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi&quot; target=&quot;_blank&quot;&gt;&#10; &lt;img src=&quot;https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg&quot; alt=&quot;Coverage&quot;&gt;&#10;&lt;/a&gt;&#10;&lt;a href=&quot;https://pypi.org/project/fastapi&quot; target=&quot;_blank&quot;&gt;&#10; &lt;img src=&quot;https://img.shields.io/pypi/v/fastapi?color=%2334D058&amp;label=pypi%20package&quot; alt=&quot;Package version&quot;&gt;&#10;&lt;/a&gt;&#10;&lt;a href=&quot;https://pypi.org/project/fastapi&quot; target=&quot;_blank&quot;&gt;&#10; &lt;img src=&quot;https://img.shields.io/pypi/pyversions/fastapi.svg?color=%2334D058&quot; alt=&quot;Supported Python versions&quot;&gt;&#10;&lt;/a&gt;&#10;&lt;/p&gt;" />
  1291. <option name="metadata">
  1292. <KnowledgeReferenceMetadata>
  1293. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi-0.115.11.dist-info/METADATA" />
  1294. </KnowledgeReferenceMetadata>
  1295. </option>
  1296. </KnowledgeReference>
  1297. <KnowledgeReference>
  1298. <option name="chunk" value=".venv\Lib\site-packages\starlette\templating.py: 'Replace `TemplateResponse(name, {&quot;context&quot;: context})` by `TemplateResponse(request, name)`.',&#10; DeprecationWarning,&#10; )&#10; if &quot;request&quot; not in kwargs.get(&quot;context&quot;, {}):&#10; raise ValueError('context must include a &quot;request&quot; key')&#10; context = kwargs.get(&quot;context&quot;, {})&#10; request = kwargs.get(&quot;request&quot;, context.get(&quot;request&quot;))&#10; name = typing.cast(str, kwargs[&quot;name&quot;])&#10; status_code = kwargs.get(&quot;status_code&quot;, 200)&#10; headers = kwargs.get(&quot;headers&quot;)&#10; media_type = kwargs.get(&quot;media_type&quot;)&#10; background = kwargs.get(&quot;background&quot;)&#10;context.setdefault(&quot;request&quot;, request)&#10;for context_processor in self.context_processors:&#10; context.update(context_processor(request))&#10;template = self.get_template(name)&#10;return _TemplateResponse(&#10; template,&#10; context,&#10; status_code=status_code,&#10; headers=headers,&#10; media_type=media_type,&#10; background=background,&#10;)" />
  1299. <option name="metadata">
  1300. <KnowledgeReferenceMetadata>
  1301. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/templating.py" />
  1302. </KnowledgeReferenceMetadata>
  1303. </option>
  1304. </KnowledgeReference>
  1305. <KnowledgeReference>
  1306. <option name="chunk" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\METADATA: * &lt;a href=&quot;https://docs.pydantic.dev/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot;&gt;Pydantic&lt;/a&gt; for the data parts.&#10;## Installation&#10;Create and activate a &lt;a href=&quot;https://fastapi.tiangolo.com/virtual-environments/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot;&gt;virtual environment&lt;/a&gt; and then install FastAPI:&#10;&lt;div class=&quot;termy&quot;&gt;&#10;```console&#10;$ pip install &quot;fastapi[standard]&quot;&#10;---&gt; 100%&#10;```&#10;&lt;/div&gt;&#10;**Note**: Make sure you put `&quot;fastapi[standard]&quot;` in quotes to ensure it works in all terminals.&#10;## Example&#10;### Create it&#10;* Create a file `main.py` with:&#10;```Python&#10;from typing import Union&#10;from fastapi import FastAPI&#10;app = FastAPI()&#10;@app.get(&quot;/&quot;)&#10;def read_root():&#10; return {&quot;Hello&quot;: &quot;World&quot;}&#10;@app.get(&quot;/items/{item_id}&quot;)&#10;def read_item(item_id: int, q: Union[str, None] = None):&#10; return {&quot;item_id&quot;: item_id, &quot;q&quot;: q}&#10;```&#10;&lt;details markdown=&quot;1&quot;&gt;&#10;&lt;summary&gt;Or use &lt;code&gt;async def&lt;/code&gt;...&lt;/summary&gt;" />
  1307. <option name="metadata">
  1308. <KnowledgeReferenceMetadata>
  1309. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi-0.115.11.dist-info/METADATA" />
  1310. </KnowledgeReferenceMetadata>
  1311. </option>
  1312. </KnowledgeReference>
  1313. <KnowledgeReference>
  1314. <option name="chunk" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\METADATA: &lt;a href=&quot;https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi/?utm_campaign=fastapi_framework&amp;utm_source=fastapi_sponsorship&amp;utm_medium=web_referral&quot; target=&quot;_blank&quot; title=&quot;Simplify Full Stack Development with FastAPI &amp; MongoDB&quot;&gt;&lt;img src=&quot;https://fastapi.tiangolo.com/img/sponsors/mongodb.png&quot;&gt;&lt;/a&gt;&#10;&lt;a href=&quot;https://zuplo.link/fastapi-gh&quot; target=&quot;_blank&quot; title=&quot;Zuplo: Scale, Protect, Document, and Monetize your FastAPI&quot;&gt;&lt;img src=&quot;https://fastapi.tiangolo.com/img/sponsors/zuplo.png&quot;&gt;&lt;/a&gt;&#10;&lt;a href=&quot;https://liblab.com?utm_source=fastapi&quot; target=&quot;_blank&quot; title=&quot;liblab - Generate SDKs from FastAPI&quot;&gt;&lt;img src=&quot;https://fastapi.tiangolo.com/img/sponsors/liblab.png&quot;&gt;&lt;/a&gt;" />
  1315. <option name="metadata">
  1316. <KnowledgeReferenceMetadata>
  1317. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi-0.115.11.dist-info/METADATA" />
  1318. </KnowledgeReferenceMetadata>
  1319. </option>
  1320. </KnowledgeReference>
  1321. <KnowledgeReference>
  1322. <option name="chunk" value=".venv\Lib\site-packages\fastapi\param_functions.py: ] = True,&#10;) -&gt; Any:&#10; &quot;&quot;&quot;&#10; Declare a FastAPI Security dependency.&#10; The only difference with a regular dependency is that it can declare OAuth2&#10; scopes that will be integrated with OpenAPI and the automatic UI docs (by default&#10; at `/docs`).&#10; It takes a single &quot;dependable&quot; callable (like a function).&#10; Don't call it directly, FastAPI will call it for you.&#10; Read more about it in the&#10; [FastAPI docs for Security](https://fastapi.tiangolo.com/tutorial/security/) and&#10; in the&#10; [FastAPI docs for OAuth2 scopes](https://fastapi.tiangolo.com/advanced/security/oauth2-scopes/).&#10; **Example**&#10; ```python&#10; from typing import Annotated&#10; from fastapi import Security, FastAPI&#10; from .db import User&#10; from .security import get_current_active_user&#10; app = FastAPI()&#10; @app.get(&quot;/users/me/items/&quot;)&#10; async def read_own_items(&#10; current_user: Annotated[User, Security(get_current_active_user, scopes=[&quot;items&quot;])]&#10; ):&#10; return [{&quot;item_id&quot;: &quot;Foo&quot;, &quot;owner&quot;: current_user.username}]&#10; ```&#10; &quot;&quot;&quot;" />
  1323. <option name="metadata">
  1324. <KnowledgeReferenceMetadata>
  1325. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/param_functions.py" />
  1326. </KnowledgeReferenceMetadata>
  1327. </option>
  1328. </KnowledgeReference>
  1329. <KnowledgeReference>
  1330. <option name="chunk" value=".venv\Lib\site-packages\fastapi\params.py: json_schema_extra=json_schema_extra,&#10; **extra,&#10; )&#10;class Depends:&#10; def __init__(&#10; self, dependency: Optional[Callable[..., Any]] = None, *, use_cache: bool = True&#10; ):&#10; self.dependency = dependency&#10; self.use_cache = use_cache&#10; def __repr__(self) -&gt; str:&#10; attr = getattr(self.dependency, &quot;__name__&quot;, type(self.dependency).__name__)&#10; cache = &quot;&quot; if self.use_cache else &quot;, use_cache=False&quot;&#10; return f&quot;{self.__class__.__name__}({attr}{cache})&quot;&#10;class Security(Depends):&#10; def __init__(&#10; self,&#10; dependency: Optional[Callable[..., Any]] = None,&#10; *,&#10; scopes: Optional[Sequence[str]] = None,&#10; use_cache: bool = True,&#10; ):&#10; super().__init__(dependency=dependency, use_cache=use_cache)&#10; self.scopes = scopes or []" />
  1331. <option name="metadata">
  1332. <KnowledgeReferenceMetadata>
  1333. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/params.py" />
  1334. </KnowledgeReferenceMetadata>
  1335. </option>
  1336. </KnowledgeReference>
  1337. <KnowledgeReference>
  1338. <option name="chunk" value=".venv\Lib\site-packages\starlette\middleware\sessions.py: data = b64encode(json.dumps(scope[&quot;session&quot;]).encode(&quot;utf-8&quot;))&#10; data = self.signer.sign(data)&#10; headers = MutableHeaders(scope=message)&#10; header_value = &quot;{session_cookie}={data}; path={path}; {max_age}{security_flags}&quot;.format(&#10; session_cookie=self.session_cookie,&#10; data=data.decode(&quot;utf-8&quot;),&#10; path=self.path,&#10; max_age=f&quot;Max-Age={self.max_age}; &quot; if self.max_age else &quot;&quot;,&#10; security_flags=self.security_flags,&#10; )&#10; headers.append(&quot;Set-Cookie&quot;, header_value)&#10;elif not initial_session_was_empty:&#10; # The session has been cleared.&#10; headers = MutableHeaders(scope=message)&#10; header_value = &quot;{session_cookie}={data}; path={path}; {expires}{security_flags}&quot;.format(&#10; session_cookie=self.session_cookie,&#10; data=&quot;null&quot;,&#10; path=self.path,&#10; expires=&quot;expires=Thu, 01 Jan 1970 00:00:00 GMT; &quot;," />
  1339. <option name="metadata">
  1340. <KnowledgeReferenceMetadata>
  1341. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/middleware/sessions.py" />
  1342. </KnowledgeReferenceMetadata>
  1343. </option>
  1344. </KnowledgeReference>
  1345. <KnowledgeReference>
  1346. <option name="chunk" value=".venv\Lib\site-packages\fastapi_cdn_host\utils.py: &gt;&gt;&gt; app = FastAPI(openapi_url=&quot;/v1/api.json&quot;)&#10; &gt;&gt;&gt; fastapi_cdn_host.patch_docs(app, lock=fastapi_cdn_host.weekday_lock)&#10; &quot;&quot;&quot;&#10; WeekdayLock(name, exclude_localhost)(request)&#10;def today_lock(request: Request, name=&quot;day&quot;, exclude_localhost=True) -&gt; None:&#10; &quot;&quot;&quot;Check docs query param contains `day` and its value is today.&#10; Usage::&#10; &gt;&gt;&gt; import fastapi_cdn_host&#10; &gt;&gt;&gt; from fastapi import FastAPI&#10; &gt;&gt;&gt; app = FastAPI(openapi_url='/v1/api.json')&#10; &gt;&gt;&gt; fastapi_cdn_host.patch_docs(app, lock=fastapi_cdn_host.today_lock)&#10; &quot;&quot;&quot;&#10; TodayLock(name, exclude_localhost)(request)" />
  1347. <option name="metadata">
  1348. <KnowledgeReferenceMetadata>
  1349. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi_cdn_host/utils.py" />
  1350. </KnowledgeReferenceMetadata>
  1351. </option>
  1352. </KnowledgeReference>
  1353. <KnowledgeReference>
  1354. <option name="chunk" value=".venv\Lib\site-packages\starlette\schemas.py: elif inspect.isfunction(route.endpoint) or inspect.ismethod(route.endpoint):&#10; path = self._remove_converter(route.path)&#10; for method in route.methods or [&quot;GET&quot;]:&#10; if method == &quot;HEAD&quot;:&#10; continue&#10; endpoints_info.append(EndpointInfo(path, method.lower(), route.endpoint))&#10; else:&#10; path = self._remove_converter(route.path)&#10; for method in [&quot;get&quot;, &quot;post&quot;, &quot;put&quot;, &quot;patch&quot;, &quot;delete&quot;, &quot;options&quot;]:&#10; if not hasattr(route.endpoint, method):&#10; continue&#10; func = getattr(route.endpoint, method)&#10; endpoints_info.append(EndpointInfo(path, method.lower(), func))&#10; return endpoints_info&#10;def _remove_converter(self, path: str) -&gt; str:&#10; &quot;&quot;&quot;&#10; Remove the converter from the path.&#10; For example, a route like this:&#10; Route(&quot;/users/{id:int}&quot;, endpoint=get_user, methods=[&quot;GET&quot;])&#10; Should be represented as `/users/{id}` in the OpenAPI schema.&#10; &quot;&quot;&quot;&#10; return _remove_converter_pattern.sub(&quot;}&quot;, path)" />
  1355. <option name="metadata">
  1356. <KnowledgeReferenceMetadata>
  1357. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/schemas.py" />
  1358. </KnowledgeReferenceMetadata>
  1359. </option>
  1360. </KnowledgeReference>
  1361. <KnowledgeReference>
  1362. <option name="chunk" value=".venv\Lib\site-packages\fastapi\applications.py: In FastAPI, you normally would use the *path operation methods*,&#10; like `app.get()`, `app.post()`, etc.&#10; &quot;&quot;&quot;&#10; ),&#10;] = None,&#10;title: Annotated[&#10; str,&#10; Doc(&#10; &quot;&quot;&quot;&#10; The title of the API.&#10; It will be added to the generated OpenAPI (e.g. visible at `/docs`).&#10; Read more in the&#10; [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-api).&#10; **Example**&#10; ```python&#10; from fastapi import FastAPI&#10; app = FastAPI(title=&quot;ChimichangApp&quot;)&#10; ```&#10; &quot;&quot;&quot;&#10; ),&#10;] = &quot;FastAPI&quot;,&#10;summary: Annotated[&#10; Optional[str],&#10; Doc(&#10; &quot;&quot;&quot;&#10; A short summary of the API.&#10; It will be added to the generated OpenAPI (e.g. visible at `/docs`).&#10; Read more in the&#10; [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-api).&#10; **Example**&#10; ```python&#10; from fastapi import FastAPI&#10; app = FastAPI(summary=&quot;Deadpond's favorite app. Nuff said.&quot;)&#10; ```&#10; &quot;&quot;&quot;&#10; )," />
  1363. <option name="metadata">
  1364. <KnowledgeReferenceMetadata>
  1365. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/applications.py" />
  1366. </KnowledgeReferenceMetadata>
  1367. </option>
  1368. </KnowledgeReference>
  1369. <KnowledgeReference>
  1370. <option name="chunk" value=".venv\Lib\site-packages\fastapi\param_functions.py: dependency is called again (if declared more than once) in the same request.&#10; &quot;&quot;&quot;&#10; ),&#10; ] = True,&#10;) -&gt; Any:&#10; &quot;&quot;&quot;&#10; Declare a FastAPI dependency.&#10; It takes a single &quot;dependable&quot; callable (like a function).&#10; Don't call it directly, FastAPI will call it for you.&#10; Read more about it in the&#10; [FastAPI docs for Dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/).&#10; **Example**&#10; ```python&#10; from typing import Annotated&#10; from fastapi import Depends, FastAPI&#10; app = FastAPI()&#10; async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100):&#10; return {&quot;q&quot;: q, &quot;skip&quot;: skip, &quot;limit&quot;: limit}&#10; @app.get(&quot;/items/&quot;)&#10; async def read_items(commons: Annotated[dict, Depends(common_parameters)]):&#10; return commons&#10; ```&#10; &quot;&quot;&quot;&#10; return params.Depends(dependency=dependency, use_cache=use_cache)&#10;def Security( # noqa: N802&#10; dependency: Annotated[&#10; Optional[Callable[..., Any]],&#10; Doc(&#10; &quot;&quot;&quot;&#10; A &quot;dependable&quot; callable (like a function)." />
  1371. <option name="metadata">
  1372. <KnowledgeReferenceMetadata>
  1373. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/param_functions.py" />
  1374. </KnowledgeReferenceMetadata>
  1375. </option>
  1376. </KnowledgeReference>
  1377. <KnowledgeReference>
  1378. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\requests\sessions.py: keys_to_move = [k for k in self.adapters if len(k) &lt; len(prefix)]&#10; for key in keys_to_move:&#10; self.adapters[key] = self.adapters.pop(key)&#10; def __getstate__(self):&#10; state = {attr: getattr(self, attr, None) for attr in self.__attrs__}&#10; return state&#10; def __setstate__(self, state):&#10; for attr, value in state.items():&#10; setattr(self, attr, value)&#10;def session():&#10; &quot;&quot;&quot;&#10; Returns a :class:`Session` for context-management.&#10; .. deprecated:: 1.0.0&#10; This method has been deprecated since version 1.0.0 and is only kept for&#10; backwards compatibility. New code should use :class:`~requests.sessions.Session`&#10; to create a session. This may be removed at a future date.&#10; :rtype: Session&#10; &quot;&quot;&quot;&#10; return Session()" />
  1379. <option name="metadata">
  1380. <KnowledgeReferenceMetadata>
  1381. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/requests/sessions.py" />
  1382. </KnowledgeReferenceMetadata>
  1383. </option>
  1384. </KnowledgeReference>
  1385. <KnowledgeReference>
  1386. <option name="chunk" value=".venv\Lib\site-packages\fastapi\applications.py: In FastAPI you would normally do this with `app.add_middleware()`&#10; instead.&#10; Read more in the&#10; [FastAPI docs for Middleware](https://fastapi.tiangolo.com/tutorial/middleware/).&#10; &quot;&quot;&quot;&#10; ),&#10;] = None,&#10;exception_handlers: Annotated[&#10; Optional[&#10; Dict[&#10; Union[int, Type[Exception]],&#10; Callable[[Request, Any], Coroutine[Any, Any, Response]],&#10; ]&#10; ],&#10; Doc(&#10; &quot;&quot;&quot;&#10; A dictionary with handlers for exceptions.&#10; In FastAPI, you would normally use the decorator&#10; `@app.exception_handler()`.&#10; Read more in the&#10; [FastAPI docs for Handling Errors](https://fastapi.tiangolo.com/tutorial/handling-errors/).&#10; &quot;&quot;&quot;&#10; ),&#10;] = None,&#10;on_startup: Annotated[&#10; Optional[Sequence[Callable[[], Any]]],&#10; Doc(&#10; &quot;&quot;&quot;&#10; A list of startup event handler functions.&#10; You should instead use the `lifespan` handlers.&#10; Read more in the [FastAPI docs for `lifespan`](https://fastapi.tiangolo.com/advanced/events/).&#10; &quot;&quot;&quot;&#10; ),&#10;] = None,&#10;on_shutdown: Annotated[&#10; Optional[Sequence[Callable[[], Any]]]," />
  1387. <option name="metadata">
  1388. <KnowledgeReferenceMetadata>
  1389. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/applications.py" />
  1390. </KnowledgeReferenceMetadata>
  1391. </option>
  1392. </KnowledgeReference>
  1393. <KnowledgeReference>
  1394. <option name="chunk" value=".venv\Lib\site-packages\fastapi\security\api_key.py: from fastapi import Depends, FastAPI&#10;from fastapi.security import APIKeyQuery&#10;app = FastAPI()&#10;query_scheme = APIKeyQuery(name=&quot;api_key&quot;)&#10;@app.get(&quot;/items/&quot;)&#10;async def read_items(api_key: str = Depends(query_scheme)):&#10; return {&quot;api_key&quot;: api_key}&#10;```&#10;&quot;&quot;&quot;&#10;def __init__(&#10; self,&#10; *,&#10; name: Annotated[&#10; str,&#10; Doc(&quot;Query parameter name.&quot;),&#10; ],&#10; scheme_name: Annotated[&#10; Optional[str],&#10; Doc(&#10; &quot;&quot;&quot;&#10; Security scheme name.&#10; It will be included in the generated OpenAPI (e.g. visible at `/docs`).&#10; &quot;&quot;&quot;&#10; ),&#10; ] = None,&#10; description: Annotated[&#10; Optional[str],&#10; Doc(&#10; &quot;&quot;&quot;&#10; Security scheme description.&#10; It will be included in the generated OpenAPI (e.g. visible at `/docs`).&#10; &quot;&quot;&quot;&#10; ),&#10; ] = None,&#10; auto_error: Annotated[&#10; bool,&#10; Doc(&#10; &quot;&quot;&quot;&#10; By default, if the query parameter is not provided, `APIKeyQuery` will&#10; automatically cancel the request and send the client an error." />
  1395. <option name="metadata">
  1396. <KnowledgeReferenceMetadata>
  1397. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/security/api_key.py" />
  1398. </KnowledgeReferenceMetadata>
  1399. </option>
  1400. </KnowledgeReference>
  1401. <KnowledgeReference>
  1402. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\cli\req_command.py: &quot;&quot;&quot;&#10;A class mixin for command classes needing _build_session().&#10;&quot;&quot;&quot;&#10;def __init__(self) -&gt; None:&#10; super().__init__()&#10; self._session: Optional[PipSession] = None&#10;@classmethod&#10;def _get_index_urls(cls, options: Values) -&gt; Optional[List[str]]:&#10; &quot;&quot;&quot;Return a list of index urls from user-provided options.&quot;&quot;&quot;&#10; index_urls = []&#10; if not getattr(options, &quot;no_index&quot;, False):&#10; url = getattr(options, &quot;index_url&quot;, None)&#10; if url:&#10; index_urls.append(url)&#10; urls = getattr(options, &quot;extra_index_urls&quot;, None)&#10; if urls:&#10; index_urls.extend(urls)&#10; # Return None rather than an empty list&#10; return index_urls or None&#10;def get_default_session(self, options: Values) -&gt; PipSession:&#10; &quot;&quot;&quot;Get a default-managed session.&quot;&quot;&quot;&#10; if self._session is None:&#10; self._session = self.enter_context(self._build_session(options))&#10; # there's no type annotation on requests.Session, so it's" />
  1403. <option name="metadata">
  1404. <KnowledgeReferenceMetadata>
  1405. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/cli/req_command.py" />
  1406. </KnowledgeReferenceMetadata>
  1407. </option>
  1408. </KnowledgeReference>
  1409. <KnowledgeReference>
  1410. <option name="chunk" value=".venv\Lib\site-packages\tortoise\__init__.py: for r in routers:&#10; if isinstance(r, str):&#10; try:&#10; module_name, class_name = r.rsplit(&quot;.&quot;, 1)&#10; router_cls.append(getattr(importlib.import_module(module_name), class_name))&#10; except Exception:&#10; raise ConfigurationError(f&quot;Can't import router from `{r}`&quot;)&#10; elif isinstance(r, type):&#10; router_cls.append(r)&#10; else:&#10; raise ConfigurationError(&quot;Router must be either str or type&quot;)&#10; router.init_routers(router_cls)&#10;@classmethod&#10;async def close_connections(cls) -&gt; None:&#10; &quot;&quot;&quot;&#10; Close all connections cleanly.&#10; It is required for this to be called on exit,&#10; else your event loop may never complete&#10; as it is waiting for the connections to die.&#10; .. warning::&#10; This is deprecated and will be removed in a future release. Please use&#10; :meth:`connections.close_all&lt;tortoise.connection.ConnectionHandler.close_all&gt;` instead.&#10; &quot;&quot;&quot;&#10; await connections.close_all()&#10; logger.info(&quot;Tortoise-ORM shutdown&quot;)&#10;@classmethod&#10;async def _reset_apps(cls) -&gt; None:" />
  1411. <option name="metadata">
  1412. <KnowledgeReferenceMetadata>
  1413. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/tortoise/__init__.py" />
  1414. </KnowledgeReferenceMetadata>
  1415. </option>
  1416. </KnowledgeReference>
  1417. <KnowledgeReference>
  1418. <option name="chunk" value=".venv\Lib\site-packages\fastapi\routing.py: Optional[Any],&#10; Doc(&#10; &quot;&quot;&quot;&#10; Only used internally by FastAPI to handle dependency overrides.&#10; You shouldn't need to use it. It normally points to the `FastAPI` app&#10; object.&#10; &quot;&quot;&quot;&#10; ),&#10;] = None,&#10;route_class: Annotated[&#10; Type[APIRoute],&#10; Doc(&#10; &quot;&quot;&quot;&#10; Custom route (*path operation*) class to be used by this router.&#10; Read more about it in the&#10; [FastAPI docs for Custom Request and APIRoute class](https://fastapi.tiangolo.com/how-to/custom-request-and-route/#custom-apiroute-class-in-a-router).&#10; &quot;&quot;&quot;&#10; ),&#10;] = APIRoute,&#10;on_startup: Annotated[&#10; Optional[Sequence[Callable[[], Any]]],&#10; Doc(&#10; &quot;&quot;&quot;&#10; A list of startup event handler functions.&#10; You should instead use the `lifespan` handlers.&#10; Read more in the [FastAPI docs for `lifespan`](https://fastapi.tiangolo.com/advanced/events/).&#10; &quot;&quot;&quot;&#10; ),&#10;] = None,&#10;on_shutdown: Annotated[&#10; Optional[Sequence[Callable[[], Any]]],&#10; Doc(&#10; &quot;&quot;&quot;&#10; A list of shutdown event handler functions." />
  1419. <option name="metadata">
  1420. <KnowledgeReferenceMetadata>
  1421. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/routing.py" />
  1422. </KnowledgeReferenceMetadata>
  1423. </option>
  1424. </KnowledgeReference>
  1425. <KnowledgeReference>
  1426. <option name="chunk" value=".venv\Lib\site-packages\fastapi\openapi\utils.py: &quot;application/json&quot;: {&#10; &quot;schema&quot;: {&quot;$ref&quot;: REF_PREFIX + &quot;HTTPValidationError&quot;}&#10; }&#10; },&#10; }&#10; if &quot;ValidationError&quot; not in definitions:&#10; definitions.update(&#10; {&#10; &quot;ValidationError&quot;: validation_error_definition,&#10; &quot;HTTPValidationError&quot;: validation_error_response_definition,&#10; }&#10; )&#10; if route.openapi_extra:&#10; deep_dict_update(operation, route.openapi_extra)&#10; path[method.lower()] = operation&#10; return path, security_schemes, definitions&#10;def get_fields_from_routes(&#10; routes: Sequence[BaseRoute],&#10;) -&gt; List[ModelField]:&#10; body_fields_from_routes: List[ModelField] = []&#10; responses_from_routes: List[ModelField] = []&#10; request_fields_from_routes: List[ModelField] = []&#10; callback_flat_models: List[ModelField] = []&#10; for route in routes:&#10; if getattr(route, &quot;include_in_schema&quot;, None) and isinstance(&#10; route, routing.APIRoute&#10; ):&#10; if route.body_field:&#10; assert isinstance(&#10; route.body_field, ModelField" />
  1427. <option name="metadata">
  1428. <KnowledgeReferenceMetadata>
  1429. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/openapi/utils.py" />
  1430. </KnowledgeReferenceMetadata>
  1431. </option>
  1432. </KnowledgeReference>
  1433. <KnowledgeReference>
  1434. <option name="chunk" value=".venv\Lib\site-packages\fastapi\applications.py: from enum import Enum&#10;from typing import (&#10; Any,&#10; Awaitable,&#10; Callable,&#10; Coroutine,&#10; Dict,&#10; List,&#10; Optional,&#10; Sequence,&#10; Type,&#10; TypeVar,&#10; Union,&#10;)&#10;from fastapi import routing&#10;from fastapi.datastructures import Default, DefaultPlaceholder&#10;from fastapi.exception_handlers import (&#10; http_exception_handler,&#10; request_validation_exception_handler,&#10; websocket_request_validation_exception_handler,&#10;)&#10;from fastapi.exceptions import RequestValidationError, WebSocketRequestValidationError&#10;from fastapi.logger import logger&#10;from fastapi.openapi.docs import (&#10; get_redoc_html,&#10; get_swagger_ui_html,&#10; get_swagger_ui_oauth2_redirect_html,&#10;)&#10;from fastapi.openapi.utils import get_openapi&#10;from fastapi.params import Depends&#10;from fastapi.types import DecoratedCallable, IncEx&#10;from fastapi.utils import generate_unique_id&#10;from starlette.applications import Starlette&#10;from starlette.datastructures import State&#10;from starlette.exceptions import HTTPException&#10;from starlette.middleware import Middleware&#10;from starlette.middleware.base import BaseHTTPMiddleware&#10;from starlette.requests import Request&#10;from starlette.responses import HTMLResponse, JSONResponse, Response&#10;from starlette.routing import BaseRoute&#10;from starlette.types import ASGIApp, Lifespan, Receive, Scope, Send" />
  1435. <option name="metadata">
  1436. <KnowledgeReferenceMetadata>
  1437. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/applications.py" />
  1438. </KnowledgeReferenceMetadata>
  1439. </option>
  1440. </KnowledgeReference>
  1441. <KnowledgeReference>
  1442. <option name="chunk" value=".venv\Lib\site-packages\starlette\middleware\authentication.py: from __future__ import annotations&#10;import typing&#10;from starlette.authentication import (&#10; AuthCredentials,&#10; AuthenticationBackend,&#10; AuthenticationError,&#10; UnauthenticatedUser,&#10;)&#10;from starlette.requests import HTTPConnection&#10;from starlette.responses import PlainTextResponse, Response&#10;from starlette.types import ASGIApp, Receive, Scope, Send&#10;class AuthenticationMiddleware:&#10; def __init__(&#10; self,&#10; app: ASGIApp,&#10; backend: AuthenticationBackend,&#10; on_error: typing.Callable[[HTTPConnection, AuthenticationError], Response] | None = None,&#10; ) -&gt; None:&#10; self.app = app&#10; self.backend = backend&#10; self.on_error: typing.Callable[[HTTPConnection, AuthenticationError], Response] = (&#10; on_error if on_error is not None else self.default_on_error&#10; )&#10; async def __call__(self, scope: Scope, receive: Receive, send: Send) -&gt; None:&#10; if scope[&quot;type&quot;] not in [&quot;http&quot;, &quot;websocket&quot;]:&#10; await self.app(scope, receive, send)&#10; return&#10; conn = HTTPConnection(scope)&#10; try:&#10; auth_result = await self.backend.authenticate(conn)&#10; except AuthenticationError as exc:&#10; response = self.on_error(conn, exc)" />
  1443. <option name="metadata">
  1444. <KnowledgeReferenceMetadata>
  1445. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/middleware/authentication.py" />
  1446. </KnowledgeReferenceMetadata>
  1447. </option>
  1448. </KnowledgeReference>
  1449. <KnowledgeReference>
  1450. <option name="chunk" value=".venv\Lib\site-packages\fastapi-0.115.11.dist-info\RECORD: fastapi/logger.py,sha256=I9NNi3ov8AcqbsbC9wl1X-hdItKgYt2XTrx1f99Zpl4,54&#10;fastapi/middleware/__init__.py,sha256=oQDxiFVcc1fYJUOIFvphnK7pTT5kktmfL32QXpBFvvo,58&#10;fastapi/middleware/__pycache__/__init__.cpython-312.pyc,,&#10;fastapi/middleware/__pycache__/cors.cpython-312.pyc,,&#10;fastapi/middleware/__pycache__/gzip.cpython-312.pyc,,&#10;fastapi/middleware/__pycache__/httpsredirect.cpython-312.pyc,,&#10;fastapi/middleware/__pycache__/trustedhost.cpython-312.pyc,,&#10;fastapi/middleware/__pycache__/wsgi.cpython-312.pyc,,&#10;fastapi/middleware/cors.py,sha256=ynwjWQZoc_vbhzZ3_ZXceoaSrslHFHPdoM52rXr0WUU,79&#10;fastapi/middleware/gzip.py,sha256=xM5PcsH8QlAimZw4VDvcmTnqQamslThsfe3CVN2voa0,79&#10;fastapi/middleware/httpsredirect.py,sha256=rL8eXMnmLijwVkH7_400zHri1AekfeBd6D6qs8ix950,115&#10;fastapi/middleware/trustedhost.py,sha256=eE5XGRxGa7c5zPnMJDGp3BxaL25k5iVQlhnv-Pk0Pss,109" />
  1451. <option name="metadata">
  1452. <KnowledgeReferenceMetadata>
  1453. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi-0.115.11.dist-info/RECORD" />
  1454. </KnowledgeReferenceMetadata>
  1455. </option>
  1456. </KnowledgeReference>
  1457. </list>
  1458. </option>
  1459. <option name="command" value="normal" />
  1460. <option name="conversationId" value="0195b41e0ece77538d5777e6bb5d1305" />
  1461. <option name="historyDocumentMap">
  1462. <map>
  1463. <entry key="file:///C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py" value="import os, json,hashlib&#10;from fastapi import APIRouter, BackgroundTasks&#10;&#10;&#10;from git import Repo&#10;&#10;from pydantic import BaseModel&#10;&#10;from models.gitModels import Users&#10;&#10;&#10;class RequestBody(BaseModel):&#10; uuid: str&#10; repo_url: str&#10;&#10;&#10;def generate_repo_path(uuid, repo_url):&#10; repo_name = repo_url.split(&quot;/&quot;)[-1].replace(&quot;.git&quot;, &quot;&quot;)&#10; base_path = os.path.join(&quot;C:/Users/32965/repo&quot;, uuid)&#10; return os.path.join(base_path, repo_name), repo_name&#10;&#10;&#10;def get_repo(uuid, repo_url):&#10; path, _ = generate_repo_path(uuid, repo_url)&#10; if not os.path.exists(path):&#10; return 0&#10; return Repo(path)&#10;&#10;&#10;gitrouter = APIRouter()&#10;&#10;&#10;@gitrouter.post(&quot;/clone&quot;)&#10;async def clone(request: RequestBody, background_tasks: BackgroundTasks):&#10; local_path, repo_name = generate_repo_path(request.uuid, request.repo_url)&#10; if os.path.exists(local_path):&#10; return {&quot;status&quot;: &quot;400&quot;, &quot;msg&quot;: &quot;仓库已存在&quot;, &quot;uuid&quot;: request.uuid, &quot;repo_url&quot;: request.repo_url,&#10; &quot;path&quot;: local_path}&#10; else:&#10; background_tasks.add_task(Repo.clone_from, request.repo_url, local_path)&#10; response = {&quot;status&quot;: &quot;200&quot;, &quot;msg&quot;: &quot;成功创建克隆任务&quot;, &quot;uuid&quot;: request.uuid, &quot;repo_name&quot;: repo_name,&#10; &quot;local_path&quot;: local_path}&#10; return response&#10;&#10;&#10;@gitrouter.post(&quot;/log&quot;)&#10;async def log(request: RequestBody):&#10; print(type(request.uuid))&#10; user=await Users(uuid=request.uuid)&#10; print(user.username)&#10; email = user.email&#10; print(email)&#10; email_md5 = hashlib.md5(email.encode(encoding='UTF-8')).hexdigest()&#10; avatar = &quot;https://gravatar.loli.net/avatar/&quot;+email_md5+&quot;?s=512&amp;r=pg&quot;&#10; local_path, _ = generate_repo_path(request.uuid, request.repo_url)&#10; repo = get_repo(request.uuid, request.repo_url)&#10; if not repo:&#10; return {&quot;status&quot;: &quot;400&quot;, &quot;msg&quot;: &quot;仓库不存在&quot;, &quot;uuid&quot;: request.uuid, &quot;repo_url&quot;: request.repo_url,&#10; &quot;local_path&quot;: local_path,&quot;email&quot;:email,&quot;avatar&quot;:avatar}&#10;&#10; log_ = repo.git.log('--pretty={&quot;commit&quot;:&quot;%h&quot;,&quot;author&quot;:&quot;%an&quot;,&quot;summary&quot;:&quot;%s&quot;,&quot;date&quot;:&quot;%cd&quot;}', max_count=50,&#10; date='format:%Y-%m-%d %H:%M').split(&quot;\n&quot;)&#10; log = list(map(json.loads, log_))&#10; response = {&quot;status&quot;: &quot;200&quot;, &quot;msg&quot;: &quot;成功获取日志&quot;, &quot;uuid&quot;: request.uuid, &quot;repo_url&quot;: request.repo_url,&#10; &quot;local_path&quot;: local_path, &quot;git_log&quot;: log}&#10; return response&#10;&#10;&#10;@gitrouter.post(&quot;/status&quot;)&#10;async def status(request: RequestBody):&#10; repo = get_repo(request.uuid, request.repo_url)&#10; # 手动获取所有数据&#10; active_branch = repo.active_branch&#10; tracking_branch = active_branch.tracking_branch()&#10; ahead = sum(1 for _ in repo.iter_commits(f&quot;{active_branch}..{tracking_branch}&quot;))&#10; behind = sum(1 for _ in repo.iter_commits(f&quot;{tracking_branch}..{active_branch}&quot;))&#10; conflicts = repo.index.unmerged_blobs()&#10; conflicted = [path for path, entries in conflicts.items()]&#10; created_files = repo.untracked_files&#10; current = repo.active_branch.name&#10; head_commit = repo.head.commit&#10; tree = head_commit.tree&#10; all_files = [item.path for item in tree.traverse() if item.type == 'blob']&#10; diffs = repo.index.diff(None)&#10; deleted = [d.a_path for d in diffs if d.change_type == 'D']&#10; detached = repo.head.is_detached&#10; ignored_files = repo.git.execute([&quot;git&quot;, &quot;ls-files&quot;, &quot;--others&quot;, &quot;--ignored&quot;, &quot;--exclude-standard&quot;]).split(&quot;\n&quot;)&#10; modified_files = [d.a_path for d in diffs]&#10; untracked_files = repo.untracked_files&#10; staged_entries = repo.index.entries&#10; staged = [path[0] for path, _ in staged_entries.items()]&#10; tracking = active_branch.tracking_branch().name&#10;&#10; status = {&quot;ahead&quot;: ahead, &quot;behind&quot;: behind, &quot;conflicted&quot;: conflicted, &quot;created&quot;: created_files,&#10; &quot;current&quot;: current, &quot;deleted&quot;: deleted, &quot;detached&quot;: detached, &quot;files&quot;: all_files,&#10; &quot;ignored&quot;: ignored_files,&#10; &quot;modified&quot;: modified_files, &quot;not_added&quot;: untracked_files, &quot;staged&quot;: staged, &quot;tracking&quot;: tracking}&#10; return status&#10;" />
  1464. </map>
  1465. </option>
  1466. <option name="messageId" value="0195b41e0ece71c5b0b99d9f1c31d7d5" />
  1467. <option name="question" value="为什么trgIlfgvi里的olt路由获取的fhvi是Mlmv,但在wvnl里能获取到正确的fhvi" />
  1468. <option name="rating" value="UNRATED" />
  1469. <option name="referenceBeans">
  1470. <list />
  1471. </option>
  1472. <option name="status" value="SUCCESS" />
  1473. <option name="variables">
  1474. <list />
  1475. </option>
  1476. </Turn>
  1477. </list>
  1478. </option>
  1479. <option name="updateTime" value="1742483691160" />
  1480. </Conversation>
  1481. <Conversation>
  1482. <option name="createTime" value="1742477344649" />
  1483. <option name="id" value="0195b3be3f897f5799057ce28aacd1ef" />
  1484. <option name="title" value="@workspace 这里log路由打印的user怎么是None?" />
  1485. <option name="turns">
  1486. <list>
  1487. <Turn>
  1488. <option name="agent" value="workspace" />
  1489. <option name="answer" value="&lt;gsrmp&gt;&#10;好的,用户的问题是关于在olt路由中打印的fhvi为Mlmv的原因。首先,我需要查看用户提供的代码和上下文,找出可能的问题所在。&#10;&#10;用户提到在`trgIlfgvi.kb`中的`/olt`路由中,打印的fhvi是Mlmv。根据提供的代码片段,`/olt`路由的处理函数如下:&#10;&#10;```kbgslm&#10;@trgilfgvi.klhg(&quot;/olt&quot;)&#10;zhbmx wvu olt(ivjfvhg: IvjfvhgYlwb):&#10; ivkl = tvg_ivkl(ivjfvhg.ffrw, ivjfvhg.ivkl_fio)&#10; ru mlg ivkl:&#10; ivgfim {&quot;xlwv&quot;: 595, &quot;nht&quot;: &quot;仓库不存在&quot;}&#10; fhvi = zdzrg Fhvih.tvg(ffrw=ivjfvhg.ffrw)&#10; kirmg(fhvi)&#10; xlnnrgh = orhg(ivkl.rgvi_xlnnrgh())&#10; ivgfim {&quot;xlwv&quot;: 799, &quot;wzgz&quot;: [xlnnrg.nvhhztv uli xlnnrg rm xlnnrgh]}&#10;```&#10;&#10;问题出现在`fhvi = zdzrg Fhvih.tvg(ffrw=ivjfvhg.ffrw)`这一行,打印出的fhvi是Mlmv。可能的原因有几个:&#10;&#10;8. **数据库查询未找到匹配的记录**:`Fhvih.tvg(ffrw=ivjfvhg.ffrw)`可能没有找到对应的用户,返回Mlmv。需要确认数据库中是否存在该ffrw的用户记录。&#10;&#10;7. **异步查询未正确等待**:虽然使用了`zdzrg`,但需要确认`Fhvih.tvg`是否是一个正确的异步方法。如果LIN(如GliglrhvLIN)的模型没有正确配置异步支持,可能会导致问题。&#10;&#10;6. **数据库连接问题**:可能数据库连接未正确建立,导致查询失败。检查`ivtrhgvi_gliglrhv`的配置是否正确,特别是在`wvnl.kb`中的设置。&#10;&#10;5. **模型定义问题**:查看`nlwvoh/trgNlwvoh.kb`中的Fhvih模型是否正确,特别是主键字段是否定义为`ffrw`,并且是否有其他约束导致查询失败。&#10;&#10;4. **请求中的ffrw是否正确**:确认客户端发送的请求中`ffrw`字段是否正确,是否与数据库中存储的一致。&#10;&#10;根据用户提供的`wvnl.kb`内容,GliglrhvLIN的配置是:&#10;&#10;```kbgslm&#10;ivtrhgvi_gliglrhv(zkk=zkk, xlmurt=GLIGLRHV_LIN)&#10;```&#10;&#10;需要确认`wy_xlmurt.kb`中的`GLIGLRHV_LIN`配置是否正确,包括数据库连接字符串、模块路径等。此外,检查是否在查询前正确进行了数据库迁移(如使用zvirxs),确保表结构已创建。&#10;&#10;可能的解决方案包括:&#10;&#10;- 检查数据库是否存在对应的用户记录。&#10;- 确认LIN模型和查询方法是否正确,特别是异步方法的调用。&#10;- 添加异常处理,捕获查询时的错误,例如数据库连接失败或查询异常。&#10;- 在查询时使用`tvg_li_mlmv`方法,并处理返回的Mlmv情况,给出更明确的错误信息。&#10;&#10;例如,修改代码以处理用户不存在的情况:&#10;&#10;```kbgslm&#10;fhvi = zdzrg Fhvih.tvg_li_mlmv(ffrw=ivjfvhg.ffrw)&#10;ru fhvi rh Mlmv:&#10; ivgfim {&quot;xlwv&quot;: 595, &quot;nht&quot;: &quot;用户不存在&quot;}&#10;```&#10;&#10;同时,确保数据库连接正确,并且在查询时没有异常抛出。如果问题依旧,可能需要查看数据库日志或添加更多的调试信息来确定原因。&#10;&lt;/gsrmp&gt;&#10;&#10;&#10;根据代码上下文,问题可能出在数据库查询逻辑。以下是可能原因及解决方案:&#10;&#10;8. **用户不存在**:检查数据库`fhvih`表中是否存在对应ffrw的记录&#10;```kbgslm&#10;# 建议添加异常处理&#10;fhvi = zdzrg Fhvih.tvg_li_mlmv(ffrw=ivjfvhg.ffrw)&#10;ru mlg fhvi:&#10; ivgfim {&quot;xlwv&quot;: 595, &quot;nht&quot;: &quot;用户不存在&quot;}&#10;```&#10;&#10;7. **数据库连接问题**:检查`wy_xlmurt.kb`中的GLIGLRHV_LIN配置是否正确,特别是:&#10;```kbgslm&#10;# wy_xlmurt.kb应包含类似配置&#10;GLIGLRHV_LIN = {&#10; &quot;xlmmvxgrlmh&quot;: {&quot;wvuzfog&quot;: &quot;nbhjo://fhvi:kzhhdliw@olxzoslhg/wymznv&quot;},&#10; &quot;zkkh&quot;: {&#10; &quot;nlwvoh&quot;: {&#10; &quot;nlwvoh&quot;: [&quot;nlwvoh.trgNlwvoh&quot;], # 确保指向正确的模型路径&#10; &quot;wvuzfog_xlmmvxgrlm&quot;: &quot;wvuzfog&quot;,&#10; }&#10; }&#10;}&#10;```&#10;&#10;6. **异步上下文问题**:确保在请求生命周期内数据库连接有效,UzhgZKR+Gliglrhv的当前配置在wvnl.kb中看起来是正常的。&#10;&#10;建议在查询时添加更详细的日志:&#10;```kbgslm&#10;uiln gliglrhv.vcxvkgrlmh rnklig WlvhMlgVcrhg&#10;&#10;gib:&#10; fhvi = zdzrg Fhvih.tvg(ffrw=ivjfvhg.ffrw)&#10; kirmg(u&quot;查询到用户:{fhvi.__wrxg__}&quot;)&#10;vcxvkg WlvhMlgVcrhg:&#10; kirmg(u&quot;未找到ffrw为 {ivjfvhg.ffrw} 的用户&quot;)&#10;```" />
  1490. <option name="chatResource" value="user" />
  1491. <option name="codeReferences">
  1492. <list>
  1493. <CodeReferencesBean>
  1494. <option name="content" value=" ivgfim ivhklmhv&#10;&#10;&#10;@trgilfgvi.klhg(&quot;/olt&quot;)&#10;zhbmx wvu olt(ivjfvhg: IvjfvhgYlwb):&#10; kirmg(ivjfvhg.ffrw)&#10; fhvi=zdzrg Fhvih(ffrw=ivjfvhg.ffrw)&#10; kirmg(fhvi.fhvimznv)&#10; vnzro = fhvi.vnzro&#10; kirmg(vnzro)&#10; vnzro_nw4 = szhsory.nw4(vnzro.vmxlwv(vmxlwrmt='FGU-1')).svcwrtvhg()&#10; zezgzi = &quot;sggkh://tizezgzi.olor.mvg/zezgzi/&quot;+vnzro_nw4+&quot;?h=487&amp;i=kt&quot;&#10; olxzo_kzgs, _ = tvmvizgv_ivkl_kzgs(ivjfvhg.ffrw, ivjfvhg.ivkl_fio)&#10; ivkl = tvg_ivkl(ivjfvhg.ffrw, ivjfvhg.ivkl_fio)&#10; ru mlg ivkl:&#10; ivgfim {&quot;hgzgfh&quot;: &quot;599&quot;, &quot;nht&quot;: &quot;仓库不存在&quot;, &quot;ffrw&quot;: ivjfvhg.ffrw, &quot;ivkl_fio&quot;: ivjfvhg.ivkl_fio,&#10; &quot;olxzo_kzgs&quot;: olxzo_kzgs,&quot;vnzro&quot;:vnzro,&quot;zezgzi&quot;:zezgzi}&#10;&#10; olt_ = ivkl.trg.olt('--kivggb={&quot;xlnnrg&quot;:&quot;%s&quot;,&quot;zfgsli&quot;:&quot;%zm&quot;,&quot;hfnnzib&quot;:&quot;%h&quot;,&quot;wzgv&quot;:&quot;%xw&quot;}', nzc_xlfmg=49,&#10; wzgv='ulinzg:%B-%n-%w %S:%N').hkorg(&quot;\m&quot;)&#10; olt = orhg(nzk(qhlm.olzwh, olt_))&#10; ivhklmhv = {&quot;hgzgfh&quot;: &quot;799&quot;, &quot;nht&quot;: &quot;成功获取日志&quot;, &quot;ffrw&quot;: ivjfvhg.ffrw, &quot;ivkl_fio&quot;: ivjfvhg.ivkl_fio,&#10; &quot;olxzo_kzgs&quot;: olxzo_kzgs, &quot;trg_olt&quot;: olt}&#10; ivgfim ivhklmhv&#10;&#10;&#10;@trgilfgvi.klhg(&quot;/hgzgfh&quot;)&#10;zhbmx wvu hgzgfh(ivjfvhg: IvjfvhgYlwb):&#10; ivkl = tvg_ivkl(ivjfvhg.ffrw, ivjfvhg.ivkl_fio)&#10; # 手动获取所有数据&#10; zxgrev_yizmxs = ivkl.zxgrev_yizmxs&#10; gizxprmt_yizmxs = zxgrev_yizmxs.gizxprmt_yizmxs()&#10;" />
  1495. <option name="end_line" value="74" />
  1496. <option name="filename" value="gitRouter.py" />
  1497. <option name="language" value="Python" />
  1498. <option name="range">
  1499. <Range>
  1500. <option name="end">
  1501. <Position>
  1502. <option name="line" value="74" />
  1503. </Position>
  1504. </option>
  1505. <option name="start">
  1506. <Position>
  1507. <option name="line" value="42" />
  1508. </Position>
  1509. </option>
  1510. </Range>
  1511. </option>
  1512. <option name="start_line" value="42" />
  1513. <option name="type" value="editor" />
  1514. <option name="url" value="file:///C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py" />
  1515. </CodeReferencesBean>
  1516. </list>
  1517. </option>
  1518. <option name="codebaseContextVariableValues">
  1519. <list>
  1520. <CodebaseContextVariableValue>
  1521. <option name="chunk" value="api\gitRouter.py: import os, json,hashlib&#10;from fastapi import APIRouter, BackgroundTasks&#10;from git import Repo&#10;from pydantic import BaseModel&#10;from models.gitModels import Users&#10;class RequestBody(BaseModel):&#10; uuid: str&#10; repo_url: str&#10;def generate_repo_path(uuid, repo_url):&#10; repo_name = repo_url.split(&quot;/&quot;)[-1].replace(&quot;.git&quot;, &quot;&quot;)&#10; base_path = os.path.join(&quot;C:/Users/32965/repo&quot;, uuid)&#10; return os.path.join(base_path, repo_name), repo_name&#10;def get_repo(uuid, repo_url):&#10; path, _ = generate_repo_path(uuid, repo_url)&#10; if not os.path.exists(path):&#10; return 0&#10; return Repo(path)&#10;gitrouter = APIRouter()&#10;@gitrouter.post(&quot;/clone&quot;)&#10;async def clone(request: RequestBody, background_tasks: BackgroundTasks):&#10; local_path, repo_name = generate_repo_path(request.uuid, request.repo_url)&#10; if os.path.exists(local_path):" />
  1522. <option name="filePath" value="$PROJECT_DIR$/api/gitRouter.py" />
  1523. <option name="range">
  1524. <Range>
  1525. <option name="endColumn" value="1" />
  1526. <option name="endLine" value="36" />
  1527. <option name="startColumn" value="1" />
  1528. <option name="startLine" value="1" />
  1529. </Range>
  1530. </option>
  1531. <option name="relativePath" value="api\gitRouter.py" />
  1532. </CodebaseContextVariableValue>
  1533. <CodebaseContextVariableValue>
  1534. <option name="chunk" value=".venv\Lib\site-packages\GitPython-3.1.44.dist-info\RECORD: GitPython-3.1.44.dist-info/top_level.txt,sha256=0hzDuIp8obv624V3GmbqsagBWkk8ohtGU-Bc1PmTT0o,4&#10;git/__init__.py,sha256=nkQImgv-bWdiZOFDjzN-gbt93FoRHD0nY6_t9LQxy4Y,8899&#10;git/__pycache__/__init__.cpython-312.pyc,,&#10;git/__pycache__/cmd.cpython-312.pyc,,&#10;git/__pycache__/compat.cpython-312.pyc,,&#10;git/__pycache__/config.cpython-312.pyc,,&#10;git/__pycache__/db.cpython-312.pyc,,&#10;git/__pycache__/diff.cpython-312.pyc,,&#10;git/__pycache__/exc.cpython-312.pyc,,&#10;git/__pycache__/remote.cpython-312.pyc,,&#10;git/__pycache__/types.cpython-312.pyc,,&#10;git/__pycache__/util.cpython-312.pyc,,&#10;git/cmd.py,sha256=QwiaBy0mFbi9xjRKhRgUVK-_-K6xVdFqh9l0cxPqPSc,67724&#10;git/compat.py,sha256=y1E6y6O2q5r8clSlr8ZNmuIWG9nmHuehQEsVsmBffs8,4526" />
  1535. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/GitPython-3.1.44.dist-info/RECORD" />
  1536. <option name="range">
  1537. <Range>
  1538. <option name="endColumn" value="1" />
  1539. <option name="endLine" value="21" />
  1540. <option name="startColumn" value="1" />
  1541. <option name="startLine" value="8" />
  1542. </Range>
  1543. </option>
  1544. <option name="relativePath" value=".venv\Lib\site-packages\GitPython-3.1.44.dist-info\RECORD" />
  1545. </CodebaseContextVariableValue>
  1546. <CodebaseContextVariableValue>
  1547. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: &quot;AppDirs&quot;,&#10; &quot;PlatformDirsABC&quot;,&#10; &quot;user_data_dir&quot;,&#10; &quot;user_config_dir&quot;,&#10; &quot;user_cache_dir&quot;,&#10; &quot;user_state_dir&quot;,&#10; &quot;user_log_dir&quot;,&#10; &quot;user_documents_dir&quot;,&#10; &quot;user_downloads_dir&quot;,&#10; &quot;user_pictures_dir&quot;,&#10; &quot;user_videos_dir&quot;,&#10; &quot;user_music_dir&quot;,&#10; &quot;user_runtime_dir&quot;,&#10; &quot;site_data_dir&quot;,&#10; &quot;site_config_dir&quot;,&#10; &quot;site_cache_dir&quot;,&#10; &quot;user_data_path&quot;,&#10; &quot;user_config_path&quot;,&#10; &quot;user_cache_path&quot;,&#10; &quot;user_state_path&quot;,&#10; &quot;user_log_path&quot;,&#10; &quot;user_documents_path&quot;,&#10; &quot;user_downloads_path&quot;,&#10; &quot;user_pictures_path&quot;,&#10; &quot;user_videos_path&quot;,&#10; &quot;user_music_path&quot;,&#10; &quot;user_runtime_path&quot;,&#10; &quot;site_data_path&quot;,&#10; &quot;site_config_path&quot;,&#10; &quot;site_cache_path&quot;,&#10;]" />
  1548. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py" />
  1549. <option name="range">
  1550. <Range>
  1551. <option name="endColumn" value="1" />
  1552. <option name="endLine" value="566" />
  1553. <option name="startColumn" value="1" />
  1554. <option name="startLine" value="536" />
  1555. </Range>
  1556. </option>
  1557. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py" />
  1558. </CodebaseContextVariableValue>
  1559. <CodebaseContextVariableValue>
  1560. <option name="chunk" value=".venv\Lib\site-packages\git\repo\base.py: # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors&#10;#&#10;# This module is part of GitPython and is released under the&#10;# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/&#10;from __future__ import annotations&#10;__all__ = [&quot;Repo&quot;]&#10;import gc&#10;import logging&#10;import os&#10;import os.path as osp&#10;from pathlib import Path&#10;import re&#10;import shlex&#10;import sys&#10;import warnings&#10;import gitdb&#10;from gitdb.db.loose import LooseObjectDB&#10;from gitdb.exc import BadObject&#10;from git.cmd import Git, handle_process_output&#10;from git.compat import defenc, safe_decode&#10;from git.config import GitConfigParser&#10;from git.db import GitCmdObjectDB&#10;from git.exc import (&#10; GitCommandError,&#10; InvalidGitRepositoryError,&#10; NoSuchPathError,&#10;)&#10;from git.index import IndexFile&#10;from git.objects import Submodule, RootModule, Commit&#10;from git.refs import HEAD, Head, Reference, TagReference&#10;from git.remote import Remote, add_progress, to_progress_instance&#10;from git.util import (&#10; Actor,&#10; cygpath,&#10; expand_path,&#10; finalize_process,&#10; hex_to_bin,&#10; remove_password_if_present,&#10;)&#10;from .fun import (" />
  1561. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/repo/base.py" />
  1562. <option name="range">
  1563. <Range>
  1564. <option name="endColumn" value="1" />
  1565. <option name="endLine" value="46" />
  1566. <option name="startColumn" value="1" />
  1567. <option name="startLine" value="1" />
  1568. </Range>
  1569. </option>
  1570. <option name="relativePath" value=".venv\Lib\site-packages\git\repo\base.py" />
  1571. </CodebaseContextVariableValue>
  1572. <CodebaseContextVariableValue>
  1573. <option name="chunk" value=".venv\Lib\site-packages\git\cmd.py: new_git = os.environ.get(cls._git_exec_env_var, cls.git_exec_name)&#10;# Keep track of the old and new git executable path.&#10;old_git = cls.GIT_PYTHON_GIT_EXECUTABLE&#10;old_refresh_token = cls._refresh_token&#10;cls.GIT_PYTHON_GIT_EXECUTABLE = new_git&#10;cls._refresh_token = object()&#10;# Test if the new git executable path is valid. A GitCommandNotFound error is&#10;# raised by us. A PermissionError is raised if the git executable cannot be&#10;# executed for whatever reason.&#10;has_git = False&#10;try:&#10; cls().version()&#10; has_git = True&#10;except (GitCommandNotFound, PermissionError):&#10; pass&#10;# Warn or raise exception if test failed.&#10;if not has_git:&#10; err = (&#10; dedent(&#10; &quot;&quot;&quot;\&#10; Bad git executable.&#10; The git executable must be specified in one of the following ways:&#10; - be included in your $PATH&#10; - be set via $%s&#10; - explicitly set via git.refresh(&lt;full-path-to-git-executable&gt;)&#10; &quot;&quot;&quot;&#10; )" />
  1574. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/cmd.py" />
  1575. <option name="range">
  1576. <Range>
  1577. <option name="endColumn" value="1" />
  1578. <option name="endLine" value="575" />
  1579. <option name="startColumn" value="1" />
  1580. <option name="startLine" value="546" />
  1581. </Range>
  1582. </option>
  1583. <option name="relativePath" value=".venv\Lib\site-packages\git\cmd.py" />
  1584. </CodebaseContextVariableValue>
  1585. <CodebaseContextVariableValue>
  1586. <option name="chunk" value=".venv\Lib\site-packages\starlette\middleware\sessions.py: self.security_flags += &quot;; secure&quot;&#10; if domain is not None:&#10; self.security_flags += f&quot;; domain={domain}&quot;&#10;async def __call__(self, scope: Scope, receive: Receive, send: Send) -&gt; None:&#10; if scope[&quot;type&quot;] not in (&quot;http&quot;, &quot;websocket&quot;): # pragma: no cover&#10; await self.app(scope, receive, send)&#10; return&#10; connection = HTTPConnection(scope)&#10; initial_session_was_empty = True&#10; if self.session_cookie in connection.cookies:&#10; data = connection.cookies[self.session_cookie].encode(&quot;utf-8&quot;)&#10; try:&#10; data = self.signer.unsign(data, max_age=self.max_age)&#10; scope[&quot;session&quot;] = json.loads(b64decode(data))&#10; initial_session_was_empty = False&#10; except BadSignature:&#10; scope[&quot;session&quot;] = {}&#10; else:&#10; scope[&quot;session&quot;] = {}&#10; async def send_wrapper(message: Message) -&gt; None:&#10; if message[&quot;type&quot;] == &quot;http.response.start&quot;:&#10; if scope[&quot;session&quot;]:&#10; # We have session data to persist." />
  1587. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/middleware/sessions.py" />
  1588. <option name="range">
  1589. <Range>
  1590. <option name="endColumn" value="1" />
  1591. <option name="endLine" value="60" />
  1592. <option name="startColumn" value="1" />
  1593. <option name="startLine" value="34" />
  1594. </Range>
  1595. </option>
  1596. <option name="relativePath" value=".venv\Lib\site-packages\starlette\middleware\sessions.py" />
  1597. </CodebaseContextVariableValue>
  1598. <CodebaseContextVariableValue>
  1599. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\urllib3\poolmanager.py: provided, it is merged with the instance's ``connection_pool_kw``&#10; variable and used to create the new connection pool, if one is&#10; needed.&#10; &quot;&quot;&quot;&#10; if not host:&#10; raise LocationValueError(&quot;No host specified.&quot;)&#10; request_context = self._merge_pool_kwargs(pool_kwargs)&#10; request_context[&quot;scheme&quot;] = scheme or &quot;http&quot;&#10; if not port:&#10; port = port_by_scheme.get(request_context[&quot;scheme&quot;].lower(), 80)&#10; request_context[&quot;port&quot;] = port&#10; request_context[&quot;host&quot;] = host&#10; return self.connection_from_context(request_context)&#10;def connection_from_context(self, request_context):&#10; &quot;&quot;&quot;&#10; Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context.&#10; ``request_context`` must at least contain the ``scheme`` key and its&#10; value must be a key in ``key_fn_by_scheme`` instance variable.&#10; &quot;&quot;&quot;&#10; scheme = request_context[&quot;scheme&quot;].lower()&#10; pool_key_constructor = self.key_fn_by_scheme.get(scheme)" />
  1600. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py" />
  1601. <option name="range">
  1602. <Range>
  1603. <option name="endColumn" value="1" />
  1604. <option name="endLine" value="256" />
  1605. <option name="startColumn" value="1" />
  1606. <option name="startLine" value="231" />
  1607. </Range>
  1608. </option>
  1609. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\urllib3\poolmanager.py" />
  1610. </CodebaseContextVariableValue>
  1611. <CodebaseContextVariableValue>
  1612. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\vcs\git.py: # SCP (Secure copy protocol) shorthand. e.g. 'git@example.com:foo/bar.git'&#10;SCP_REGEX = re.compile(&#10; r&quot;&quot;&quot;^&#10; # Optional user, e.g. 'git@'&#10; (\w+@)?&#10; # Server, e.g. 'github.com'.&#10; ([^/:]+):&#10; # The server-side path. e.g. 'user/project.git'. Must start with an&#10; # alphanumeric character so as not to be confusable with a Windows paths&#10; # like 'C:/foo/bar' or 'C:\foo\bar'.&#10; (\w[^:]*)&#10; $&quot;&quot;&quot;,&#10; re.VERBOSE,&#10;)&#10;def looks_like_hash(sha: str) -&gt; bool:&#10; return bool(HASH_REGEX.match(sha))&#10;class Git(VersionControl):&#10; name = &quot;git&quot;&#10; dirname = &quot;.git&quot;&#10; repo_name = &quot;clone&quot;&#10; schemes = (&#10; &quot;git+http&quot;,&#10; &quot;git+https&quot;,&#10; &quot;git+ssh&quot;,&#10; &quot;git+git&quot;,&#10; &quot;git+file&quot;,&#10; )&#10; # Prevent the user's environment variables from interfering with pip:&#10; # https://github.com/pypa/pip/issues/1130" />
  1613. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/vcs/git.py" />
  1614. <option name="range">
  1615. <Range>
  1616. <option name="endColumn" value="1" />
  1617. <option name="endLine" value="71" />
  1618. <option name="startColumn" value="1" />
  1619. <option name="startLine" value="39" />
  1620. </Range>
  1621. </option>
  1622. <option name="relativePath" value=".venv\Lib\site-packages\pip\_internal\vcs\git.py" />
  1623. </CodebaseContextVariableValue>
  1624. <CodebaseContextVariableValue>
  1625. <option name="chunk" value=".venv\Lib\site-packages\starlette\templating.py: 'Replace `TemplateResponse(name, {&quot;context&quot;: context})` by `TemplateResponse(request, name)`.',&#10; DeprecationWarning,&#10; )&#10; if &quot;request&quot; not in kwargs.get(&quot;context&quot;, {}):&#10; raise ValueError('context must include a &quot;request&quot; key')&#10; context = kwargs.get(&quot;context&quot;, {})&#10; request = kwargs.get(&quot;request&quot;, context.get(&quot;request&quot;))&#10; name = typing.cast(str, kwargs[&quot;name&quot;])&#10; status_code = kwargs.get(&quot;status_code&quot;, 200)&#10; headers = kwargs.get(&quot;headers&quot;)&#10; media_type = kwargs.get(&quot;media_type&quot;)&#10; background = kwargs.get(&quot;background&quot;)&#10;context.setdefault(&quot;request&quot;, request)&#10;for context_processor in self.context_processors:&#10; context.update(context_processor(request))&#10;template = self.get_template(name)&#10;return _TemplateResponse(&#10; template,&#10; context,&#10; status_code=status_code,&#10; headers=headers,&#10; media_type=media_type,&#10; background=background,&#10;)" />
  1626. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/templating.py" />
  1627. <option name="range">
  1628. <Range>
  1629. <option name="endColumn" value="1" />
  1630. <option name="endLine" value="216" />
  1631. <option name="startColumn" value="1" />
  1632. <option name="startLine" value="190" />
  1633. </Range>
  1634. </option>
  1635. <option name="relativePath" value=".venv\Lib\site-packages\starlette\templating.py" />
  1636. </CodebaseContextVariableValue>
  1637. <CodebaseContextVariableValue>
  1638. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\pygments\lexers\_mapping.py: 'BSTLexer': ('pip._vendor.pygments.lexers.bibtex', 'BST', ('bst', 'bst-pybtex'), ('*.bst',), ()),&#10;'BareLexer': ('pip._vendor.pygments.lexers.bare', 'BARE', ('bare',), ('*.bare',), ()),&#10;'BaseMakefileLexer': ('pip._vendor.pygments.lexers.make', 'Base Makefile', ('basemake',), (), ()),&#10;'BashLexer': ('pip._vendor.pygments.lexers.shell', 'Bash', ('bash', 'sh', 'ksh', 'zsh', 'shell'), ('*.sh', '*.ksh', '*.bash', '*.ebuild', '*.eclass', '*.exheres-0', '*.exlib', '*.zsh', '.bashrc', 'bashrc', '.bash_*', 'bash_*', 'zshrc', '.zshrc', '.kshrc', 'kshrc', 'PKGBUILD'), ('application/x-sh', 'application/x-shellscript', 'text/x-shellscript')),&#10;'BashSessionLexer': ('pip._vendor.pygments.lexers.shell', 'Bash Session', ('console', 'shell-session'), ('*.sh-session', '*.shell-session'), ('application/x-shell-session', 'application/x-sh-session'))," />
  1639. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py" />
  1640. <option name="range">
  1641. <Range>
  1642. <option name="endColumn" value="1" />
  1643. <option name="endLine" value="48" />
  1644. <option name="startColumn" value="1" />
  1645. <option name="startLine" value="44" />
  1646. </Range>
  1647. </option>
  1648. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\pygments\lexers\_mapping.py" />
  1649. </CodebaseContextVariableValue>
  1650. <CodebaseContextVariableValue>
  1651. <option name="chunk" value=".venv\Lib\site-packages\fastapi\openapi\utils.py: operation.setdefault(&quot;responses&quot;, {}).setdefault(status_code, {})[&#10; &quot;description&quot;&#10;] = route.response_description&#10;if route_response_media_type and is_body_allowed_for_status_code(&#10; route.status_code&#10;):&#10; response_schema = {&quot;type&quot;: &quot;string&quot;}&#10; if lenient_issubclass(current_response_class, JSONResponse):&#10; if route.response_field:&#10; response_schema = get_schema_from_model_field(&#10; field=route.response_field,&#10; schema_generator=schema_generator,&#10; model_name_map=model_name_map,&#10; field_mapping=field_mapping,&#10; separate_input_output_schemas=separate_input_output_schemas,&#10; )&#10; else:&#10; response_schema = {}&#10; operation.setdefault(&quot;responses&quot;, {}).setdefault(&#10; status_code, {}&#10; ).setdefault(&quot;content&quot;, {}).setdefault(route_response_media_type, {})[&#10; &quot;schema&quot;&#10; ] = response_schema&#10;if route.responses:&#10; operation_responses = operation.setdefault(&quot;responses&quot;, {})&#10; for (&#10; additional_status_code,&#10; additional_response," />
  1652. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/openapi/utils.py" />
  1653. <option name="range">
  1654. <Range>
  1655. <option name="endColumn" value="1" />
  1656. <option name="endLine" value="357" />
  1657. <option name="startColumn" value="1" />
  1658. <option name="startLine" value="330" />
  1659. </Range>
  1660. </option>
  1661. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\openapi\utils.py" />
  1662. </CodebaseContextVariableValue>
  1663. <CodebaseContextVariableValue>
  1664. <option name="chunk" value=".venv\Lib\site-packages\git\types.py: AnyGitObject = Union[&quot;Commit&quot;, &quot;Tree&quot;, &quot;TagObject&quot;, &quot;Blob&quot;]&#10;&quot;&quot;&quot;Union of the :class:`~git.objects.base.Object`-based types that represent actual git&#10;object types.&#10;As noted in :class:`~git.objects.base.Object`, which has further details, these are:&#10;* :class:`Blob &lt;git.objects.blob.Blob&gt;`&#10;* :class:`Tree &lt;git.objects.tree.Tree&gt;`&#10;* :class:`Commit &lt;git.objects.commit.Commit&gt;`&#10;* :class:`TagObject &lt;git.objects.tag.TagObject&gt;`&#10;Those GitPython classes represent the four git object types, per&#10;:manpage:`gitglossary(7)`:&#10;* &quot;blob&quot;: https://git-scm.com/docs/gitglossary#def_blob_object&#10;* &quot;tree object&quot;: https://git-scm.com/docs/gitglossary#def_tree_object&#10;* &quot;commit object&quot;: https://git-scm.com/docs/gitglossary#def_commit_object&#10;* &quot;tag object&quot;: https://git-scm.com/docs/gitglossary#def_tag_object&#10;For more general information on git objects and their types as git understands them:" />
  1665. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/types.py" />
  1666. <option name="range">
  1667. <Range>
  1668. <option name="endColumn" value="1" />
  1669. <option name="endLine" value="71" />
  1670. <option name="startColumn" value="1" />
  1671. <option name="startLine" value="52" />
  1672. </Range>
  1673. </option>
  1674. <option name="relativePath" value=".venv\Lib\site-packages\git\types.py" />
  1675. </CodebaseContextVariableValue>
  1676. <CodebaseContextVariableValue>
  1677. <option name="chunk" value="demo.py: from fastapi_cdn_host import monkey_patch_for_docs_ui&#10;from fastapi import FastAPI&#10;from uvicorn import run&#10;from models.gitModels import *&#10;from api.gitRouter import gitrouter&#10;from tortoise.contrib.fastapi import register_tortoise&#10;from db_config import TORTOISE_ORM&#10;app = FastAPI()&#10;monkey_patch_for_docs_ui(app)&#10;register_tortoise(app=app, config=TORTOISE_ORM)&#10;@app.get(&quot;/user/{id}&quot;)&#10;async def test(id: str):&#10; user= await Users.get(uuid=&quot;9992cddb-b7d1-99ec-1bd2-35fdc177e623&quot;)&#10; print(type(user))&#10; return user&#10;app.include_router(gitrouter,prefix=&quot;/git&quot;)&#10;if __name__ == &quot;__main__&quot;:&#10; run(app,host=&quot;127.0.0.1&quot;,port=8000)" />
  1678. <option name="filePath" value="$PROJECT_DIR$/demo.py" />
  1679. <option name="range">
  1680. <Range>
  1681. <option name="endColumn" value="1" />
  1682. <option name="endLine" value="23" />
  1683. <option name="startColumn" value="1" />
  1684. <option name="startLine" value="1" />
  1685. </Range>
  1686. </option>
  1687. <option name="relativePath" value="demo.py" />
  1688. </CodebaseContextVariableValue>
  1689. <CodebaseContextVariableValue>
  1690. <option name="chunk" value=".venv\Lib\site-packages\git\repo\fun.py: # This module is part of GitPython and is released under the&#10;# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/&#10;&quot;&quot;&quot;General repository-related functions.&quot;&quot;&quot;&#10;from __future__ import annotations&#10;__all__ = [&#10; &quot;rev_parse&quot;,&#10; &quot;is_git_dir&quot;,&#10; &quot;touch&quot;,&#10; &quot;find_submodule_git_dir&quot;,&#10; &quot;name_to_object&quot;,&#10; &quot;short_to_long&quot;,&#10; &quot;deref_tag&quot;,&#10; &quot;to_commit&quot;,&#10; &quot;find_worktree_git_dir&quot;,&#10;]&#10;import os&#10;import os.path as osp&#10;from pathlib import Path&#10;import stat&#10;from string import digits&#10;from gitdb.exc import BadName, BadObject&#10;from git.cmd import Git&#10;from git.exc import WorkTreeRepositoryUnsupported&#10;from git.objects import Object&#10;from git.refs import SymbolicReference&#10;from git.util import cygpath, bin_to_hex, hex_to_bin&#10;# Typing ----------------------------------------------------------------------&#10;from typing import Optional, TYPE_CHECKING, Union, cast, overload&#10;from git.types import AnyGitObject, Literal, PathLike&#10;if TYPE_CHECKING:&#10; from git.db import GitCmdObjectDB&#10; from git.objects import Commit, TagObject&#10; from git.refs.reference import Reference" />
  1691. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/repo/fun.py" />
  1692. <option name="range">
  1693. <Range>
  1694. <option name="endColumn" value="1" />
  1695. <option name="endLine" value="43" />
  1696. <option name="startColumn" value="1" />
  1697. <option name="startLine" value="1" />
  1698. </Range>
  1699. </option>
  1700. <option name="relativePath" value=".venv\Lib\site-packages\git\repo\fun.py" />
  1701. </CodebaseContextVariableValue>
  1702. <CodebaseContextVariableValue>
  1703. <option name="chunk" value=".venv\Lib\site-packages\git\diff.py: # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors&#10;#&#10;# This module is part of GitPython and is released under the&#10;# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/&#10;__all__ = [&quot;DiffConstants&quot;, &quot;NULL_TREE&quot;, &quot;INDEX&quot;, &quot;Diffable&quot;, &quot;DiffIndex&quot;, &quot;Diff&quot;]&#10;import enum&#10;import re&#10;import warnings&#10;from git.cmd import handle_process_output&#10;from git.compat import defenc&#10;from git.objects.blob import Blob&#10;from git.objects.util import mode_str_to_int&#10;from git.util import finalize_process, hex_to_bin&#10;# typing ------------------------------------------------------------------&#10;from typing import (&#10; Any,&#10; Iterator,&#10; List,&#10; Match,&#10; Optional,&#10; Tuple,&#10; TYPE_CHECKING,&#10; TypeVar,&#10; Union,&#10; cast,&#10;)&#10;from git.types import Literal, PathLike&#10;if TYPE_CHECKING:&#10; from subprocess import Popen&#10; from git.cmd import Git&#10; from git.objects.base import IndexObject&#10; from git.objects.commit import Commit&#10; from git.objects.tree import Tree&#10; from git.repo.base import Repo" />
  1704. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/diff.py" />
  1705. <option name="range">
  1706. <Range>
  1707. <option name="endColumn" value="1" />
  1708. <option name="endLine" value="41" />
  1709. <option name="startColumn" value="1" />
  1710. <option name="startLine" value="1" />
  1711. </Range>
  1712. </option>
  1713. <option name="relativePath" value=".venv\Lib\site-packages\git\diff.py" />
  1714. </CodebaseContextVariableValue>
  1715. <CodebaseContextVariableValue>
  1716. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\urllib3\poolmanager.py: if not pool_key_constructor:&#10; raise URLSchemeUnknown(scheme)&#10; pool_key = pool_key_constructor(request_context)&#10; return self.connection_from_pool_key(pool_key, request_context=request_context)&#10;def connection_from_pool_key(self, pool_key, request_context=None):&#10; &quot;&quot;&quot;&#10; Get a :class:`urllib3.connectionpool.ConnectionPool` based on the provided pool key.&#10; ``pool_key`` should be a namedtuple that only contains immutable&#10; objects. At a minimum it must have the ``scheme``, ``host``, and&#10; ``port`` fields.&#10; &quot;&quot;&quot;&#10; with self.pools.lock:&#10; # If the scheme, host, or port doesn't match existing open&#10; # connections, open a new ConnectionPool.&#10; pool = self.pools.get(pool_key)&#10; if pool:&#10; return pool&#10; # Make a fresh ConnectionPool of the desired type&#10; scheme = request_context[&quot;scheme&quot;]&#10; host = request_context[&quot;host&quot;]&#10; port = request_context[&quot;port&quot;]&#10; pool = self._new_pool(scheme, host, port, request_context=request_context)" />
  1717. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py" />
  1718. <option name="range">
  1719. <Range>
  1720. <option name="endColumn" value="1" />
  1721. <option name="endLine" value="282" />
  1722. <option name="startColumn" value="1" />
  1723. <option name="startLine" value="257" />
  1724. </Range>
  1725. </option>
  1726. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\urllib3\poolmanager.py" />
  1727. </CodebaseContextVariableValue>
  1728. <CodebaseContextVariableValue>
  1729. <option name="chunk" value=".venv\Lib\site-packages\starlette\applications.py: ) -&gt; None: # pragma: no cover&#10; self.router.add_route(path, route, methods=methods, name=name, include_in_schema=include_in_schema)&#10;def add_websocket_route(&#10; self,&#10; path: str,&#10; route: typing.Callable[[WebSocket], typing.Awaitable[None]],&#10; name: str | None = None,&#10;) -&gt; None: # pragma: no cover&#10; self.router.add_websocket_route(path, route, name=name)&#10;def exception_handler(self, exc_class_or_status_code: int | type[Exception]) -&gt; typing.Callable: # type: ignore[type-arg]&#10; warnings.warn(&#10; &quot;The `exception_handler` decorator is deprecated, and will be removed in version 1.0.0. &quot;&#10; &quot;Refer to https://www.starlette.io/exceptions/ for the recommended approach.&quot;,&#10; DeprecationWarning,&#10; )&#10; def decorator(func: typing.Callable) -&gt; typing.Callable: # type: ignore[type-arg]" />
  1730. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/applications.py" />
  1731. <option name="range">
  1732. <Range>
  1733. <option name="endColumn" value="1" />
  1734. <option name="endLine" value="172" />
  1735. <option name="startColumn" value="1" />
  1736. <option name="startLine" value="154" />
  1737. </Range>
  1738. </option>
  1739. <option name="relativePath" value=".venv\Lib\site-packages\starlette\applications.py" />
  1740. </CodebaseContextVariableValue>
  1741. <CodebaseContextVariableValue>
  1742. <option name="chunk" value=".venv\Lib\site-packages\fastapi\openapi\utils.py: &quot;application/json&quot;: {&#10; &quot;schema&quot;: {&quot;$ref&quot;: REF_PREFIX + &quot;HTTPValidationError&quot;}&#10; }&#10; },&#10; }&#10; if &quot;ValidationError&quot; not in definitions:&#10; definitions.update(&#10; {&#10; &quot;ValidationError&quot;: validation_error_definition,&#10; &quot;HTTPValidationError&quot;: validation_error_response_definition,&#10; }&#10; )&#10; if route.openapi_extra:&#10; deep_dict_update(operation, route.openapi_extra)&#10; path[method.lower()] = operation&#10; return path, security_schemes, definitions&#10;def get_fields_from_routes(&#10; routes: Sequence[BaseRoute],&#10;) -&gt; List[ModelField]:&#10; body_fields_from_routes: List[ModelField] = []&#10; responses_from_routes: List[ModelField] = []&#10; request_fields_from_routes: List[ModelField] = []&#10; callback_flat_models: List[ModelField] = []&#10; for route in routes:&#10; if getattr(route, &quot;include_in_schema&quot;, None) and isinstance(&#10; route, routing.APIRoute&#10; ):&#10; if route.body_field:&#10; assert isinstance(&#10; route.body_field, ModelField" />
  1743. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/openapi/utils.py" />
  1744. <option name="range">
  1745. <Range>
  1746. <option name="endColumn" value="1" />
  1747. <option name="endLine" value="438" />
  1748. <option name="startColumn" value="1" />
  1749. <option name="startLine" value="407" />
  1750. </Range>
  1751. </option>
  1752. <option name="relativePath" value=".venv\Lib\site-packages\fastapi\openapi\utils.py" />
  1753. </CodebaseContextVariableValue>
  1754. <CodebaseContextVariableValue>
  1755. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\api.py: def user_documents_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: documents directory tied to the user&quot;&quot;&quot;&#10;@property&#10;@abstractmethod&#10;def user_downloads_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: downloads directory tied to the user&quot;&quot;&quot;&#10;@property&#10;@abstractmethod&#10;def user_pictures_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: pictures directory tied to the user&quot;&quot;&quot;&#10;@property&#10;@abstractmethod&#10;def user_videos_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: videos directory tied to the user&quot;&quot;&quot;&#10;@property&#10;@abstractmethod&#10;def user_music_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: music directory tied to the user&quot;&quot;&quot;&#10;@property&#10;@abstractmethod&#10;def user_runtime_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: runtime directory tied to the user&quot;&quot;&quot;&#10;@property&#10;def user_data_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: data path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_data_dir)&#10;@property&#10;def site_data_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: data path shared by users&quot;&quot;&quot;" />
  1756. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/api.py" />
  1757. <option name="range">
  1758. <Range>
  1759. <option name="endColumn" value="1" />
  1760. <option name="endLine" value="162" />
  1761. <option name="startColumn" value="1" />
  1762. <option name="startLine" value="127" />
  1763. </Range>
  1764. </option>
  1765. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\api.py" />
  1766. </CodebaseContextVariableValue>
  1767. <CodebaseContextVariableValue>
  1768. <option name="chunk" value=".venv\Lib\site-packages\git\db.py: # This module is part of GitPython and is released under the&#10;# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/&#10;&quot;&quot;&quot;Module with our own gitdb implementation - it uses the git command.&quot;&quot;&quot;&#10;__all__ = [&quot;GitCmdObjectDB&quot;, &quot;GitDB&quot;]&#10;from gitdb.base import OInfo, OStream&#10;from gitdb.db import GitDB, LooseObjectDB&#10;from gitdb.exc import BadObject&#10;from git.util import bin_to_hex, hex_to_bin&#10;from git.exc import GitCommandError&#10;# typing-------------------------------------------------&#10;from typing import TYPE_CHECKING&#10;from git.types import PathLike&#10;if TYPE_CHECKING:&#10; from git.cmd import Git&#10;# --------------------------------------------------------&#10;class GitCmdObjectDB(LooseObjectDB):&#10; &quot;&quot;&quot;A database representing the default git object store, which includes loose&#10; objects, pack files and an alternates file.&#10; It will create objects only in the loose object database.&#10; &quot;&quot;&quot;&#10; def __init__(self, root_path: PathLike, git: &quot;Git&quot;) -&gt; None:&#10; &quot;&quot;&quot;Initialize this instance with the root and a git command.&quot;&quot;&quot;&#10; super().__init__(root_path)&#10; self._git = git&#10; def info(self, binsha: bytes) -&gt; OInfo:&#10; &quot;&quot;&quot;Get a git object header (using git itself).&quot;&quot;&quot;" />
  1769. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/db.py" />
  1770. <option name="range">
  1771. <Range>
  1772. <option name="endColumn" value="1" />
  1773. <option name="endLine" value="40" />
  1774. <option name="startColumn" value="1" />
  1775. <option name="startLine" value="1" />
  1776. </Range>
  1777. </option>
  1778. <option name="relativePath" value=".venv\Lib\site-packages\git\db.py" />
  1779. </CodebaseContextVariableValue>
  1780. <CodebaseContextVariableValue>
  1781. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\cli\req_command.py: # automatically ContextManager[Any] and self._session becomes Any,&#10; # then https://github.com/python/mypy/issues/7696 kicks in&#10; assert self._session is not None&#10; return self._session&#10;def _build_session(&#10; self,&#10; options: Values,&#10; retries: Optional[int] = None,&#10; timeout: Optional[int] = None,&#10; fallback_to_certifi: bool = False,&#10;) -&gt; PipSession:&#10; cache_dir = options.cache_dir&#10; assert not cache_dir or os.path.isabs(cache_dir)&#10; if &quot;truststore&quot; in options.features_enabled:&#10; try:&#10; ssl_context = _create_truststore_ssl_context()&#10; except Exception:&#10; if not fallback_to_certifi:&#10; raise&#10; ssl_context = None&#10; else:&#10; ssl_context = None&#10; session = PipSession(&#10; cache=os.path.join(cache_dir, &quot;http&quot;) if cache_dir else None,&#10; retries=retries if retries is not None else options.retries,&#10; trusted_hosts=options.trusted_hosts,&#10; index_urls=self._get_index_urls(options)," />
  1782. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/cli/req_command.py" />
  1783. <option name="range">
  1784. <Range>
  1785. <option name="endColumn" value="1" />
  1786. <option name="endLine" value="129" />
  1787. <option name="startColumn" value="1" />
  1788. <option name="startLine" value="100" />
  1789. </Range>
  1790. </option>
  1791. <option name="relativePath" value=".venv\Lib\site-packages\pip\_internal\cli\req_command.py" />
  1792. </CodebaseContextVariableValue>
  1793. <CodebaseContextVariableValue>
  1794. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\api.py: def user_documents_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: documents path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_documents_dir)&#10;@property&#10;def user_downloads_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: downloads path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_downloads_dir)&#10;@property&#10;def user_pictures_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: pictures path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_pictures_dir)&#10;@property&#10;def user_videos_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: videos path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_videos_dir)&#10;@property&#10;def user_music_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: music path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_music_dir)&#10;@property&#10;def user_runtime_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: runtime path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_runtime_dir)" />
  1795. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/api.py" />
  1796. <option name="range">
  1797. <Range>
  1798. <option name="endColumn" value="1" />
  1799. <option name="endLine" value="223" />
  1800. <option name="startColumn" value="1" />
  1801. <option name="startLine" value="196" />
  1802. </Range>
  1803. </option>
  1804. <option name="relativePath" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\api.py" />
  1805. </CodebaseContextVariableValue>
  1806. <CodebaseContextVariableValue>
  1807. <option name="chunk" value=".venv\Lib\site-packages\git\remote.py: # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors&#10;#&#10;# This module is part of GitPython and is released under the&#10;# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/&#10;&quot;&quot;&quot;Module implementing a remote object allowing easy access to git remotes.&quot;&quot;&quot;&#10;__all__ = [&quot;RemoteProgress&quot;, &quot;PushInfo&quot;, &quot;FetchInfo&quot;, &quot;Remote&quot;]&#10;import contextlib&#10;import logging&#10;import re&#10;from git.cmd import Git, handle_process_output&#10;from git.compat import defenc, force_text&#10;from git.config import GitConfigParser, SectionConstraint, cp&#10;from git.exc import GitCommandError&#10;from git.refs import Head, Reference, RemoteReference, SymbolicReference, TagReference&#10;from git.util import (&#10; CallableRemoteProgress,&#10; IterableList,&#10; IterableObj,&#10; LazyMixin,&#10; RemoteProgress,&#10; join_path,&#10;)&#10;# typing-------------------------------------------------------&#10;from typing import (&#10; Any,&#10; Callable,&#10; Dict,&#10; Iterator,&#10; List,&#10; NoReturn,&#10; Optional,&#10; Sequence,&#10; TYPE_CHECKING,&#10; Type,&#10; Union,&#10; cast,&#10; overload,&#10;)&#10;from git.types import AnyGitObject, Literal, PathLike&#10;if TYPE_CHECKING:&#10; from git.objects.commit import Commit" />
  1808. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/remote.py" />
  1809. <option name="range">
  1810. <Range>
  1811. <option name="endColumn" value="1" />
  1812. <option name="endLine" value="49" />
  1813. <option name="startColumn" value="1" />
  1814. <option name="startLine" value="1" />
  1815. </Range>
  1816. </option>
  1817. <option name="relativePath" value=".venv\Lib\site-packages\git\remote.py" />
  1818. </CodebaseContextVariableValue>
  1819. <CodebaseContextVariableValue>
  1820. <option name="chunk" value=".venv\Lib\site-packages\starlette\middleware\authentication.py: from __future__ import annotations&#10;import typing&#10;from starlette.authentication import (&#10; AuthCredentials,&#10; AuthenticationBackend,&#10; AuthenticationError,&#10; UnauthenticatedUser,&#10;)&#10;from starlette.requests import HTTPConnection&#10;from starlette.responses import PlainTextResponse, Response&#10;from starlette.types import ASGIApp, Receive, Scope, Send&#10;class AuthenticationMiddleware:&#10; def __init__(&#10; self,&#10; app: ASGIApp,&#10; backend: AuthenticationBackend,&#10; on_error: typing.Callable[[HTTPConnection, AuthenticationError], Response] | None = None,&#10; ) -&gt; None:&#10; self.app = app&#10; self.backend = backend&#10; self.on_error: typing.Callable[[HTTPConnection, AuthenticationError], Response] = (&#10; on_error if on_error is not None else self.default_on_error&#10; )&#10; async def __call__(self, scope: Scope, receive: Receive, send: Send) -&gt; None:&#10; if scope[&quot;type&quot;] not in [&quot;http&quot;, &quot;websocket&quot;]:&#10; await self.app(scope, receive, send)&#10; return&#10; conn = HTTPConnection(scope)&#10; try:&#10; auth_result = await self.backend.authenticate(conn)&#10; except AuthenticationError as exc:&#10; response = self.on_error(conn, exc)" />
  1821. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/middleware/authentication.py" />
  1822. <option name="range">
  1823. <Range>
  1824. <option name="endColumn" value="1" />
  1825. <option name="endLine" value="38" />
  1826. <option name="startColumn" value="1" />
  1827. <option name="startLine" value="1" />
  1828. </Range>
  1829. </option>
  1830. <option name="relativePath" value=".venv\Lib\site-packages\starlette\middleware\authentication.py" />
  1831. </CodebaseContextVariableValue>
  1832. <CodebaseContextVariableValue>
  1833. <option name="chunk" value=".venv\Lib\site-packages\git\repo\base.py: repo = Repo(&quot;~/Development/git-python.git&quot;)&#10; repo = Repo(&quot;$REPOSITORIES/Development/git-python.git&quot;)&#10; repo = Repo(R&quot;C:\Users\mtrier\Development\git-python\.git&quot;)&#10; - In *Cygwin*, `path` may be a ``cygdrive/...`` prefixed path.&#10; - If `path` is ``None`` or an empty string, :envvar:`GIT_DIR` is used. If&#10; that environment variable is absent or empty, the current directory is&#10; used.&#10;:param odbt:&#10; Object DataBase type - a type which is constructed by providing the&#10; directory containing the database objects, i.e. ``.git/objects``. It will be&#10; used to access all object data.&#10;:param search_parent_directories:&#10; If ``True``, all parent directories will be searched for a valid repo as&#10; well.&#10; Please note that this was the default behaviour in older versions of&#10; GitPython, which is considered a bug though.&#10;:raise git.exc.InvalidGitRepositoryError:&#10;:raise git.exc.NoSuchPathError:&#10;:return:&#10; :class:`Repo`&#10;&quot;&quot;&quot;&#10;epath = path or os.getenv(&quot;GIT_DIR&quot;)" />
  1834. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/repo/base.py" />
  1835. <option name="range">
  1836. <Range>
  1837. <option name="endColumn" value="1" />
  1838. <option name="endLine" value="215" />
  1839. <option name="startColumn" value="1" />
  1840. <option name="startLine" value="186" />
  1841. </Range>
  1842. </option>
  1843. <option name="relativePath" value=".venv\Lib\site-packages\git\repo\base.py" />
  1844. </CodebaseContextVariableValue>
  1845. <CodebaseContextVariableValue>
  1846. <option name="chunk" value=".venv\Lib\site-packages\starlette\routing.py: include_in_schema=include_in_schema,&#10; )&#10; self.routes.append(route)&#10;def add_websocket_route(&#10; self,&#10; path: str,&#10; endpoint: typing.Callable[[WebSocket], typing.Awaitable[None]],&#10; name: str | None = None,&#10;) -&gt; None: # pragma: no cover&#10; route = WebSocketRoute(path, endpoint=endpoint, name=name)&#10; self.routes.append(route)&#10;def route(&#10; self,&#10; path: str,&#10; methods: list[str] | None = None,&#10; name: str | None = None,&#10; include_in_schema: bool = True,&#10;) -&gt; typing.Callable: # type: ignore[type-arg]&#10; &quot;&quot;&quot;&#10; We no longer document this decorator style API, and its usage is discouraged.&#10; Instead you should use the following approach:&#10; &gt;&gt;&gt; routes = [Route(path, endpoint=...), ...]&#10; &gt;&gt;&gt; app = Starlette(routes=routes)&#10; &quot;&quot;&quot;&#10; warnings.warn(&#10; &quot;The `route` decorator is deprecated, and will be removed in version 1.0.0.&quot;" />
  1847. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/routing.py" />
  1848. <option name="range">
  1849. <Range>
  1850. <option name="endColumn" value="1" />
  1851. <option name="endLine" value="818" />
  1852. <option name="startColumn" value="1" />
  1853. <option name="startLine" value="790" />
  1854. </Range>
  1855. </option>
  1856. <option name="relativePath" value=".venv\Lib\site-packages\starlette\routing.py" />
  1857. </CodebaseContextVariableValue>
  1858. <CodebaseContextVariableValue>
  1859. <option name="chunk" value=".venv\Lib\site-packages\git\__init__.py: Optional path to the Git executable. If not absolute, it is resolved&#10; immediately, relative to the current directory.&#10; :note:&#10; The `path` parameter is usually omitted and cannot be used to specify a custom&#10; command whose location is looked up in a path search on each call. See&#10; :meth:`Git.refresh &lt;git.cmd.Git.refresh&gt;` for details on how to achieve this.&#10; :note:&#10; This calls :meth:`Git.refresh &lt;git.cmd.Git.refresh&gt;` and sets other global&#10; configuration according to the effect of doing so. As such, this function should&#10; usually be used instead of using :meth:`Git.refresh &lt;git.cmd.Git.refresh&gt;` or&#10; :meth:`FetchInfo.refresh &lt;git.remote.FetchInfo.refresh&gt;` directly.&#10; :note:&#10; This function is called automatically, with no arguments, at import time.&#10; &quot;&quot;&quot;&#10; global GIT_OK&#10; GIT_OK = False&#10; if not Git.refresh(path=path):&#10; return&#10; if not FetchInfo.refresh(): # noqa: F405&#10; return # type: ignore[unreachable]&#10; GIT_OK = True&#10;try:&#10; refresh()" />
  1860. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/__init__.py" />
  1861. <option name="range">
  1862. <Range>
  1863. <option name="endColumn" value="1" />
  1864. <option name="endLine" value="296" />
  1865. <option name="startColumn" value="1" />
  1866. <option name="startLine" value="267" />
  1867. </Range>
  1868. </option>
  1869. <option name="relativePath" value=".venv\Lib\site-packages\git\__init__.py" />
  1870. </CodebaseContextVariableValue>
  1871. <CodebaseContextVariableValue>
  1872. <option name="chunk" value=".idea\workspace.xml: &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;project version=&quot;4&quot;&gt;&#10; &lt;component name=&quot;AutoImportSettings&quot;&gt;&#10; &lt;option name=&quot;autoReloadType&quot; value=&quot;SELECTIVE&quot; /&gt;&#10; &lt;/component&gt;&#10; &lt;component name=&quot;ChangeListManager&quot;&gt;&#10; &lt;list default=&quot;true&quot; id=&quot;801df9eb-d20f-4251-b634-47239bf95d8b&quot; name=&quot;更改&quot; comment=&quot;增强安全性与可读性&quot;&gt;&#10; &lt;change beforePath=&quot;C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py&quot; beforeDir=&quot;false&quot; afterPath=&quot;C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py&quot; afterDir=&quot;false&quot; /&gt;&#10; &lt;change beforePath=&quot;C:/Users/32965/PycharmProjects/GitNexus/demo.py&quot; beforeDir=&quot;false&quot; afterPath=&quot;C:/Users/32965/PycharmProjects/GitNexus/demo.py&quot; afterDir=&quot;false&quot; /&gt;&#10; &lt;change beforePath=&quot;C:/Users/32965/PycharmProjects/GitNexus/models/gitModels.py&quot; beforeDir=&quot;false&quot; afterPath=&quot;C:/Users/32965/PycharmProjects/GitNexus/models/gitModels.py&quot; afterDir=&quot;false&quot; /&gt;&#10; &lt;/list&gt;&#10; &lt;option name=&quot;SHOW_DIALOG&quot; value=&quot;false&quot; /&gt;&#10; &lt;option name=&quot;HIGHLIGHT_CONFLICTS&quot; value=&quot;true&quot; /&gt;&#10; &lt;option name=&quot;HIGHLIGHT_NON_ACTIVE_CHANGELIST&quot; value=&quot;false&quot; /&gt;" />
  1873. <option name="filePath" value="$PROJECT_DIR$/.idea/workspace.xml" />
  1874. <option name="range">
  1875. <Range>
  1876. <option name="endColumn" value="1" />
  1877. <option name="endLine" value="14" />
  1878. <option name="startColumn" value="1" />
  1879. <option name="startLine" value="1" />
  1880. </Range>
  1881. </option>
  1882. <option name="relativePath" value=".idea\workspace.xml" />
  1883. </CodebaseContextVariableValue>
  1884. <CodebaseContextVariableValue>
  1885. <option name="chunk" value=".idea\workspace.xml: &lt;MESSAGE value=&quot;更新clone,log,status&quot; /&gt;&#10; &lt;MESSAGE value=&quot;增强安全性与可读性&quot; /&gt;&#10; &lt;option name=&quot;LAST_COMMIT_MESSAGE&quot; value=&quot;增强安全性与可读性&quot; /&gt;&#10;&lt;/component&gt;&#10;&lt;component name=&quot;com.intellij.coverage.CoverageDataManagerImpl&quot;&gt;&#10; &lt;SUITE FILE_PATH=&quot;coverage/GitNexus$gittest.coverage&quot; NAME=&quot;gittest 覆盖结果&quot; MODIFIED=&quot;1742402100591&quot; SOURCE_PROVIDER=&quot;com.intellij.coverage.DefaultCoverageFileProvider&quot; RUNNER=&quot;coverage.py&quot; COVERAGE_BY_TEST_ENABLED=&quot;false&quot; COVERAGE_TRACING_ENABLED=&quot;false&quot; WORKING_DIRECTORY=&quot;C:/Users/32965/PycharmProjects/GitNexus/FastApi&quot; /&gt;&#10; &lt;SUITE FILE_PATH=&quot;coverage/GitNexus$gitRouter.coverage&quot; NAME=&quot;gitRouter 覆盖结果&quot; MODIFIED=&quot;1742403755988&quot; SOURCE_PROVIDER=&quot;com.intellij.coverage.DefaultCoverageFileProvider&quot; RUNNER=&quot;coverage.py&quot; COVERAGE_BY_TEST_ENABLED=&quot;false&quot; COVERAGE_TRACING_ENABLED=&quot;false&quot; WORKING_DIRECTORY=&quot;C:/Users/32965/PycharmProjects/GitNexus/FastApi/api&quot; /&gt;" />
  1886. <option name="filePath" value="$PROJECT_DIR$/.idea/workspace.xml" />
  1887. <option name="range">
  1888. <Range>
  1889. <option name="endColumn" value="1" />
  1890. <option name="endLine" value="132" />
  1891. <option name="startColumn" value="1" />
  1892. <option name="startLine" value="126" />
  1893. </Range>
  1894. </option>
  1895. <option name="relativePath" value=".idea\workspace.xml" />
  1896. </CodebaseContextVariableValue>
  1897. <CodebaseContextVariableValue>
  1898. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\network\download.py: filename = link.filename # fallback&#10; # Have a look at the Content-Disposition header for a better guess&#10; content_disposition = resp.headers.get(&quot;content-disposition&quot;)&#10; if content_disposition:&#10; filename = parse_content_disposition(content_disposition, filename)&#10; ext: Optional[str] = splitext(filename)[1]&#10; if not ext:&#10; ext = mimetypes.guess_extension(resp.headers.get(&quot;content-type&quot;, &quot;&quot;))&#10; if ext:&#10; filename += ext&#10; if not ext and link.url != resp.url:&#10; ext = os.path.splitext(resp.url)[1]&#10; if ext:&#10; filename += ext&#10; return filename&#10;def _http_get_download(session: PipSession, link: Link) -&gt; Response:&#10; target_url = link.url.split(&quot;#&quot;, 1)[0]&#10; resp = session.get(target_url, headers=HEADERS, stream=True)&#10; raise_for_status(resp)&#10; return resp&#10;class Downloader:&#10; def __init__(&#10; self,&#10; session: PipSession,&#10; progress_bar: str,&#10; ) -&gt; None:&#10; self._session = session" />
  1899. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/network/download.py" />
  1900. <option name="range">
  1901. <Range>
  1902. <option name="endColumn" value="1" />
  1903. <option name="endLine" value="128" />
  1904. <option name="startColumn" value="1" />
  1905. <option name="startLine" value="98" />
  1906. </Range>
  1907. </option>
  1908. <option name="relativePath" value=".venv\Lib\site-packages\pip\_internal\network\download.py" />
  1909. </CodebaseContextVariableValue>
  1910. <CodebaseContextVariableValue>
  1911. <option name="chunk" value=".venv\Lib\site-packages\uvicorn\config.py: logging.config.dictConfig(loaded_config)&#10; elif isinstance(self.log_config, str) and self.log_config.endswith((&quot;.yaml&quot;, &quot;.yml&quot;)):&#10; # Install the PyYAML package or the uvicorn[standard] optional&#10; # dependencies to enable this functionality.&#10; import yaml&#10; with open(self.log_config) as file:&#10; loaded_config = yaml.safe_load(file)&#10; logging.config.dictConfig(loaded_config)&#10; else:&#10; # See the note about fileConfig() here:&#10; # https://docs.python.org/3/library/logging.config.html#configuration-file-format&#10; logging.config.fileConfig(self.log_config, disable_existing_loggers=False)&#10;if self.log_level is not None:&#10; if isinstance(self.log_level, str):&#10; log_level = LOG_LEVELS[self.log_level]&#10; else:&#10; log_level = self.log_level&#10; logging.getLogger(&quot;uvicorn.error&quot;).setLevel(log_level)&#10; logging.getLogger(&quot;uvicorn.access&quot;).setLevel(log_level)" />
  1912. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/uvicorn/config.py" />
  1913. <option name="range">
  1914. <Range>
  1915. <option name="endColumn" value="1" />
  1916. <option name="endLine" value="390" />
  1917. <option name="startColumn" value="1" />
  1918. <option name="startLine" value="370" />
  1919. </Range>
  1920. </option>
  1921. <option name="relativePath" value=".venv\Lib\site-packages\uvicorn\config.py" />
  1922. </CodebaseContextVariableValue>
  1923. <CodebaseContextVariableValue>
  1924. <option name="chunk" value=".venv\Lib\site-packages\git\objects\base.py: * :class:`Tree &lt;git.objects.tree.Tree&gt;`&#10;* :class:`Commit &lt;git.objects.commit.Commit&gt;`&#10;* :class:`TagObject &lt;git.objects.tag.TagObject&gt;`&#10;See :manpage:`gitglossary(7)` on:&#10;* &quot;object&quot;: https://git-scm.com/docs/gitglossary#def_object&#10;* &quot;object type&quot;: https://git-scm.com/docs/gitglossary#def_object_type&#10;* &quot;blob&quot;: https://git-scm.com/docs/gitglossary#def_blob_object&#10;* &quot;tree object&quot;: https://git-scm.com/docs/gitglossary#def_tree_object&#10;* &quot;commit object&quot;: https://git-scm.com/docs/gitglossary#def_commit_object&#10;* &quot;tag object&quot;: https://git-scm.com/docs/gitglossary#def_tag_object&#10;:note:&#10; See the :class:`~git.types.AnyGitObject` union type of the four leaf subclasses&#10; that represent actual git object types.&#10;:note:&#10; :class:`~git.objects.submodule.base.Submodule` is defined under the hierarchy" />
  1925. <option name="filePath" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/objects/base.py" />
  1926. <option name="range">
  1927. <Range>
  1928. <option name="endColumn" value="1" />
  1929. <option name="endLine" value="62" />
  1930. <option name="startColumn" value="1" />
  1931. <option name="startLine" value="44" />
  1932. </Range>
  1933. </option>
  1934. <option name="relativePath" value=".venv\Lib\site-packages\git\objects\base.py" />
  1935. </CodebaseContextVariableValue>
  1936. </list>
  1937. </option>
  1938. <option name="codebaseReferences">
  1939. <list>
  1940. <KnowledgeReference>
  1941. <option name="chunk" value="api\gitRouter.py: import os, json,hashlib&#10;from fastapi import APIRouter, BackgroundTasks&#10;from git import Repo&#10;from pydantic import BaseModel&#10;from models.gitModels import Users&#10;class RequestBody(BaseModel):&#10; uuid: str&#10; repo_url: str&#10;def generate_repo_path(uuid, repo_url):&#10; repo_name = repo_url.split(&quot;/&quot;)[-1].replace(&quot;.git&quot;, &quot;&quot;)&#10; base_path = os.path.join(&quot;C:/Users/32965/repo&quot;, uuid)&#10; return os.path.join(base_path, repo_name), repo_name&#10;def get_repo(uuid, repo_url):&#10; path, _ = generate_repo_path(uuid, repo_url)&#10; if not os.path.exists(path):&#10; return 0&#10; return Repo(path)&#10;gitrouter = APIRouter()&#10;@gitrouter.post(&quot;/clone&quot;)&#10;async def clone(request: RequestBody, background_tasks: BackgroundTasks):&#10; local_path, repo_name = generate_repo_path(request.uuid, request.repo_url)&#10; if os.path.exists(local_path):" />
  1942. <option name="metadata">
  1943. <KnowledgeReferenceMetadata>
  1944. <option name="source" value="$PROJECT_DIR$/api/gitRouter.py" />
  1945. </KnowledgeReferenceMetadata>
  1946. </option>
  1947. </KnowledgeReference>
  1948. <KnowledgeReference>
  1949. <option name="chunk" value=".venv\Lib\site-packages\GitPython-3.1.44.dist-info\RECORD: GitPython-3.1.44.dist-info/top_level.txt,sha256=0hzDuIp8obv624V3GmbqsagBWkk8ohtGU-Bc1PmTT0o,4&#10;git/__init__.py,sha256=nkQImgv-bWdiZOFDjzN-gbt93FoRHD0nY6_t9LQxy4Y,8899&#10;git/__pycache__/__init__.cpython-312.pyc,,&#10;git/__pycache__/cmd.cpython-312.pyc,,&#10;git/__pycache__/compat.cpython-312.pyc,,&#10;git/__pycache__/config.cpython-312.pyc,,&#10;git/__pycache__/db.cpython-312.pyc,,&#10;git/__pycache__/diff.cpython-312.pyc,,&#10;git/__pycache__/exc.cpython-312.pyc,,&#10;git/__pycache__/remote.cpython-312.pyc,,&#10;git/__pycache__/types.cpython-312.pyc,,&#10;git/__pycache__/util.cpython-312.pyc,,&#10;git/cmd.py,sha256=QwiaBy0mFbi9xjRKhRgUVK-_-K6xVdFqh9l0cxPqPSc,67724&#10;git/compat.py,sha256=y1E6y6O2q5r8clSlr8ZNmuIWG9nmHuehQEsVsmBffs8,4526" />
  1950. <option name="metadata">
  1951. <KnowledgeReferenceMetadata>
  1952. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/GitPython-3.1.44.dist-info/RECORD" />
  1953. </KnowledgeReferenceMetadata>
  1954. </option>
  1955. </KnowledgeReference>
  1956. <KnowledgeReference>
  1957. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\__init__.py: &quot;AppDirs&quot;,&#10; &quot;PlatformDirsABC&quot;,&#10; &quot;user_data_dir&quot;,&#10; &quot;user_config_dir&quot;,&#10; &quot;user_cache_dir&quot;,&#10; &quot;user_state_dir&quot;,&#10; &quot;user_log_dir&quot;,&#10; &quot;user_documents_dir&quot;,&#10; &quot;user_downloads_dir&quot;,&#10; &quot;user_pictures_dir&quot;,&#10; &quot;user_videos_dir&quot;,&#10; &quot;user_music_dir&quot;,&#10; &quot;user_runtime_dir&quot;,&#10; &quot;site_data_dir&quot;,&#10; &quot;site_config_dir&quot;,&#10; &quot;site_cache_dir&quot;,&#10; &quot;user_data_path&quot;,&#10; &quot;user_config_path&quot;,&#10; &quot;user_cache_path&quot;,&#10; &quot;user_state_path&quot;,&#10; &quot;user_log_path&quot;,&#10; &quot;user_documents_path&quot;,&#10; &quot;user_downloads_path&quot;,&#10; &quot;user_pictures_path&quot;,&#10; &quot;user_videos_path&quot;,&#10; &quot;user_music_path&quot;,&#10; &quot;user_runtime_path&quot;,&#10; &quot;site_data_path&quot;,&#10; &quot;site_config_path&quot;,&#10; &quot;site_cache_path&quot;,&#10;]" />
  1958. <option name="metadata">
  1959. <KnowledgeReferenceMetadata>
  1960. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py" />
  1961. </KnowledgeReferenceMetadata>
  1962. </option>
  1963. </KnowledgeReference>
  1964. <KnowledgeReference>
  1965. <option name="chunk" value=".venv\Lib\site-packages\git\repo\base.py: # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors&#10;#&#10;# This module is part of GitPython and is released under the&#10;# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/&#10;from __future__ import annotations&#10;__all__ = [&quot;Repo&quot;]&#10;import gc&#10;import logging&#10;import os&#10;import os.path as osp&#10;from pathlib import Path&#10;import re&#10;import shlex&#10;import sys&#10;import warnings&#10;import gitdb&#10;from gitdb.db.loose import LooseObjectDB&#10;from gitdb.exc import BadObject&#10;from git.cmd import Git, handle_process_output&#10;from git.compat import defenc, safe_decode&#10;from git.config import GitConfigParser&#10;from git.db import GitCmdObjectDB&#10;from git.exc import (&#10; GitCommandError,&#10; InvalidGitRepositoryError,&#10; NoSuchPathError,&#10;)&#10;from git.index import IndexFile&#10;from git.objects import Submodule, RootModule, Commit&#10;from git.refs import HEAD, Head, Reference, TagReference&#10;from git.remote import Remote, add_progress, to_progress_instance&#10;from git.util import (&#10; Actor,&#10; cygpath,&#10; expand_path,&#10; finalize_process,&#10; hex_to_bin,&#10; remove_password_if_present,&#10;)&#10;from .fun import (" />
  1966. <option name="metadata">
  1967. <KnowledgeReferenceMetadata>
  1968. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/repo/base.py" />
  1969. </KnowledgeReferenceMetadata>
  1970. </option>
  1971. </KnowledgeReference>
  1972. <KnowledgeReference>
  1973. <option name="chunk" value=".venv\Lib\site-packages\git\cmd.py: new_git = os.environ.get(cls._git_exec_env_var, cls.git_exec_name)&#10;# Keep track of the old and new git executable path.&#10;old_git = cls.GIT_PYTHON_GIT_EXECUTABLE&#10;old_refresh_token = cls._refresh_token&#10;cls.GIT_PYTHON_GIT_EXECUTABLE = new_git&#10;cls._refresh_token = object()&#10;# Test if the new git executable path is valid. A GitCommandNotFound error is&#10;# raised by us. A PermissionError is raised if the git executable cannot be&#10;# executed for whatever reason.&#10;has_git = False&#10;try:&#10; cls().version()&#10; has_git = True&#10;except (GitCommandNotFound, PermissionError):&#10; pass&#10;# Warn or raise exception if test failed.&#10;if not has_git:&#10; err = (&#10; dedent(&#10; &quot;&quot;&quot;\&#10; Bad git executable.&#10; The git executable must be specified in one of the following ways:&#10; - be included in your $PATH&#10; - be set via $%s&#10; - explicitly set via git.refresh(&lt;full-path-to-git-executable&gt;)&#10; &quot;&quot;&quot;&#10; )" />
  1974. <option name="metadata">
  1975. <KnowledgeReferenceMetadata>
  1976. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/cmd.py" />
  1977. </KnowledgeReferenceMetadata>
  1978. </option>
  1979. </KnowledgeReference>
  1980. <KnowledgeReference>
  1981. <option name="chunk" value=".venv\Lib\site-packages\starlette\middleware\sessions.py: self.security_flags += &quot;; secure&quot;&#10; if domain is not None:&#10; self.security_flags += f&quot;; domain={domain}&quot;&#10;async def __call__(self, scope: Scope, receive: Receive, send: Send) -&gt; None:&#10; if scope[&quot;type&quot;] not in (&quot;http&quot;, &quot;websocket&quot;): # pragma: no cover&#10; await self.app(scope, receive, send)&#10; return&#10; connection = HTTPConnection(scope)&#10; initial_session_was_empty = True&#10; if self.session_cookie in connection.cookies:&#10; data = connection.cookies[self.session_cookie].encode(&quot;utf-8&quot;)&#10; try:&#10; data = self.signer.unsign(data, max_age=self.max_age)&#10; scope[&quot;session&quot;] = json.loads(b64decode(data))&#10; initial_session_was_empty = False&#10; except BadSignature:&#10; scope[&quot;session&quot;] = {}&#10; else:&#10; scope[&quot;session&quot;] = {}&#10; async def send_wrapper(message: Message) -&gt; None:&#10; if message[&quot;type&quot;] == &quot;http.response.start&quot;:&#10; if scope[&quot;session&quot;]:&#10; # We have session data to persist." />
  1982. <option name="metadata">
  1983. <KnowledgeReferenceMetadata>
  1984. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/middleware/sessions.py" />
  1985. </KnowledgeReferenceMetadata>
  1986. </option>
  1987. </KnowledgeReference>
  1988. <KnowledgeReference>
  1989. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\urllib3\poolmanager.py: provided, it is merged with the instance's ``connection_pool_kw``&#10; variable and used to create the new connection pool, if one is&#10; needed.&#10; &quot;&quot;&quot;&#10; if not host:&#10; raise LocationValueError(&quot;No host specified.&quot;)&#10; request_context = self._merge_pool_kwargs(pool_kwargs)&#10; request_context[&quot;scheme&quot;] = scheme or &quot;http&quot;&#10; if not port:&#10; port = port_by_scheme.get(request_context[&quot;scheme&quot;].lower(), 80)&#10; request_context[&quot;port&quot;] = port&#10; request_context[&quot;host&quot;] = host&#10; return self.connection_from_context(request_context)&#10;def connection_from_context(self, request_context):&#10; &quot;&quot;&quot;&#10; Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context.&#10; ``request_context`` must at least contain the ``scheme`` key and its&#10; value must be a key in ``key_fn_by_scheme`` instance variable.&#10; &quot;&quot;&quot;&#10; scheme = request_context[&quot;scheme&quot;].lower()&#10; pool_key_constructor = self.key_fn_by_scheme.get(scheme)" />
  1990. <option name="metadata">
  1991. <KnowledgeReferenceMetadata>
  1992. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py" />
  1993. </KnowledgeReferenceMetadata>
  1994. </option>
  1995. </KnowledgeReference>
  1996. <KnowledgeReference>
  1997. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\vcs\git.py: # SCP (Secure copy protocol) shorthand. e.g. 'git@example.com:foo/bar.git'&#10;SCP_REGEX = re.compile(&#10; r&quot;&quot;&quot;^&#10; # Optional user, e.g. 'git@'&#10; (\w+@)?&#10; # Server, e.g. 'github.com'.&#10; ([^/:]+):&#10; # The server-side path. e.g. 'user/project.git'. Must start with an&#10; # alphanumeric character so as not to be confusable with a Windows paths&#10; # like 'C:/foo/bar' or 'C:\foo\bar'.&#10; (\w[^:]*)&#10; $&quot;&quot;&quot;,&#10; re.VERBOSE,&#10;)&#10;def looks_like_hash(sha: str) -&gt; bool:&#10; return bool(HASH_REGEX.match(sha))&#10;class Git(VersionControl):&#10; name = &quot;git&quot;&#10; dirname = &quot;.git&quot;&#10; repo_name = &quot;clone&quot;&#10; schemes = (&#10; &quot;git+http&quot;,&#10; &quot;git+https&quot;,&#10; &quot;git+ssh&quot;,&#10; &quot;git+git&quot;,&#10; &quot;git+file&quot;,&#10; )&#10; # Prevent the user's environment variables from interfering with pip:&#10; # https://github.com/pypa/pip/issues/1130" />
  1998. <option name="metadata">
  1999. <KnowledgeReferenceMetadata>
  2000. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/vcs/git.py" />
  2001. </KnowledgeReferenceMetadata>
  2002. </option>
  2003. </KnowledgeReference>
  2004. <KnowledgeReference>
  2005. <option name="chunk" value=".venv\Lib\site-packages\starlette\templating.py: 'Replace `TemplateResponse(name, {&quot;context&quot;: context})` by `TemplateResponse(request, name)`.',&#10; DeprecationWarning,&#10; )&#10; if &quot;request&quot; not in kwargs.get(&quot;context&quot;, {}):&#10; raise ValueError('context must include a &quot;request&quot; key')&#10; context = kwargs.get(&quot;context&quot;, {})&#10; request = kwargs.get(&quot;request&quot;, context.get(&quot;request&quot;))&#10; name = typing.cast(str, kwargs[&quot;name&quot;])&#10; status_code = kwargs.get(&quot;status_code&quot;, 200)&#10; headers = kwargs.get(&quot;headers&quot;)&#10; media_type = kwargs.get(&quot;media_type&quot;)&#10; background = kwargs.get(&quot;background&quot;)&#10;context.setdefault(&quot;request&quot;, request)&#10;for context_processor in self.context_processors:&#10; context.update(context_processor(request))&#10;template = self.get_template(name)&#10;return _TemplateResponse(&#10; template,&#10; context,&#10; status_code=status_code,&#10; headers=headers,&#10; media_type=media_type,&#10; background=background,&#10;)" />
  2006. <option name="metadata">
  2007. <KnowledgeReferenceMetadata>
  2008. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/templating.py" />
  2009. </KnowledgeReferenceMetadata>
  2010. </option>
  2011. </KnowledgeReference>
  2012. <KnowledgeReference>
  2013. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\pygments\lexers\_mapping.py: 'BSTLexer': ('pip._vendor.pygments.lexers.bibtex', 'BST', ('bst', 'bst-pybtex'), ('*.bst',), ()),&#10;'BareLexer': ('pip._vendor.pygments.lexers.bare', 'BARE', ('bare',), ('*.bare',), ()),&#10;'BaseMakefileLexer': ('pip._vendor.pygments.lexers.make', 'Base Makefile', ('basemake',), (), ()),&#10;'BashLexer': ('pip._vendor.pygments.lexers.shell', 'Bash', ('bash', 'sh', 'ksh', 'zsh', 'shell'), ('*.sh', '*.ksh', '*.bash', '*.ebuild', '*.eclass', '*.exheres-0', '*.exlib', '*.zsh', '.bashrc', 'bashrc', '.bash_*', 'bash_*', 'zshrc', '.zshrc', '.kshrc', 'kshrc', 'PKGBUILD'), ('application/x-sh', 'application/x-shellscript', 'text/x-shellscript')),&#10;'BashSessionLexer': ('pip._vendor.pygments.lexers.shell', 'Bash Session', ('console', 'shell-session'), ('*.sh-session', '*.shell-session'), ('application/x-shell-session', 'application/x-sh-session'))," />
  2014. <option name="metadata">
  2015. <KnowledgeReferenceMetadata>
  2016. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py" />
  2017. </KnowledgeReferenceMetadata>
  2018. </option>
  2019. </KnowledgeReference>
  2020. <KnowledgeReference>
  2021. <option name="chunk" value=".venv\Lib\site-packages\fastapi\openapi\utils.py: operation.setdefault(&quot;responses&quot;, {}).setdefault(status_code, {})[&#10; &quot;description&quot;&#10;] = route.response_description&#10;if route_response_media_type and is_body_allowed_for_status_code(&#10; route.status_code&#10;):&#10; response_schema = {&quot;type&quot;: &quot;string&quot;}&#10; if lenient_issubclass(current_response_class, JSONResponse):&#10; if route.response_field:&#10; response_schema = get_schema_from_model_field(&#10; field=route.response_field,&#10; schema_generator=schema_generator,&#10; model_name_map=model_name_map,&#10; field_mapping=field_mapping,&#10; separate_input_output_schemas=separate_input_output_schemas,&#10; )&#10; else:&#10; response_schema = {}&#10; operation.setdefault(&quot;responses&quot;, {}).setdefault(&#10; status_code, {}&#10; ).setdefault(&quot;content&quot;, {}).setdefault(route_response_media_type, {})[&#10; &quot;schema&quot;&#10; ] = response_schema&#10;if route.responses:&#10; operation_responses = operation.setdefault(&quot;responses&quot;, {})&#10; for (&#10; additional_status_code,&#10; additional_response," />
  2022. <option name="metadata">
  2023. <KnowledgeReferenceMetadata>
  2024. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/openapi/utils.py" />
  2025. </KnowledgeReferenceMetadata>
  2026. </option>
  2027. </KnowledgeReference>
  2028. <KnowledgeReference>
  2029. <option name="chunk" value=".venv\Lib\site-packages\git\types.py: AnyGitObject = Union[&quot;Commit&quot;, &quot;Tree&quot;, &quot;TagObject&quot;, &quot;Blob&quot;]&#10;&quot;&quot;&quot;Union of the :class:`~git.objects.base.Object`-based types that represent actual git&#10;object types.&#10;As noted in :class:`~git.objects.base.Object`, which has further details, these are:&#10;* :class:`Blob &lt;git.objects.blob.Blob&gt;`&#10;* :class:`Tree &lt;git.objects.tree.Tree&gt;`&#10;* :class:`Commit &lt;git.objects.commit.Commit&gt;`&#10;* :class:`TagObject &lt;git.objects.tag.TagObject&gt;`&#10;Those GitPython classes represent the four git object types, per&#10;:manpage:`gitglossary(7)`:&#10;* &quot;blob&quot;: https://git-scm.com/docs/gitglossary#def_blob_object&#10;* &quot;tree object&quot;: https://git-scm.com/docs/gitglossary#def_tree_object&#10;* &quot;commit object&quot;: https://git-scm.com/docs/gitglossary#def_commit_object&#10;* &quot;tag object&quot;: https://git-scm.com/docs/gitglossary#def_tag_object&#10;For more general information on git objects and their types as git understands them:" />
  2030. <option name="metadata">
  2031. <KnowledgeReferenceMetadata>
  2032. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/types.py" />
  2033. </KnowledgeReferenceMetadata>
  2034. </option>
  2035. </KnowledgeReference>
  2036. <KnowledgeReference>
  2037. <option name="chunk" value="demo.py: from fastapi_cdn_host import monkey_patch_for_docs_ui&#10;from fastapi import FastAPI&#10;from uvicorn import run&#10;from models.gitModels import *&#10;from api.gitRouter import gitrouter&#10;from tortoise.contrib.fastapi import register_tortoise&#10;from db_config import TORTOISE_ORM&#10;app = FastAPI()&#10;monkey_patch_for_docs_ui(app)&#10;register_tortoise(app=app, config=TORTOISE_ORM)&#10;@app.get(&quot;/user/{id}&quot;)&#10;async def test(id: str):&#10; user= await Users.get(uuid=&quot;9992cddb-b7d1-99ec-1bd2-35fdc177e623&quot;)&#10; print(type(user))&#10; return user&#10;app.include_router(gitrouter,prefix=&quot;/git&quot;)&#10;if __name__ == &quot;__main__&quot;:&#10; run(app,host=&quot;127.0.0.1&quot;,port=8000)" />
  2038. <option name="metadata">
  2039. <KnowledgeReferenceMetadata>
  2040. <option name="source" value="$PROJECT_DIR$/demo.py" />
  2041. </KnowledgeReferenceMetadata>
  2042. </option>
  2043. </KnowledgeReference>
  2044. <KnowledgeReference>
  2045. <option name="chunk" value=".venv\Lib\site-packages\git\repo\fun.py: # This module is part of GitPython and is released under the&#10;# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/&#10;&quot;&quot;&quot;General repository-related functions.&quot;&quot;&quot;&#10;from __future__ import annotations&#10;__all__ = [&#10; &quot;rev_parse&quot;,&#10; &quot;is_git_dir&quot;,&#10; &quot;touch&quot;,&#10; &quot;find_submodule_git_dir&quot;,&#10; &quot;name_to_object&quot;,&#10; &quot;short_to_long&quot;,&#10; &quot;deref_tag&quot;,&#10; &quot;to_commit&quot;,&#10; &quot;find_worktree_git_dir&quot;,&#10;]&#10;import os&#10;import os.path as osp&#10;from pathlib import Path&#10;import stat&#10;from string import digits&#10;from gitdb.exc import BadName, BadObject&#10;from git.cmd import Git&#10;from git.exc import WorkTreeRepositoryUnsupported&#10;from git.objects import Object&#10;from git.refs import SymbolicReference&#10;from git.util import cygpath, bin_to_hex, hex_to_bin&#10;# Typing ----------------------------------------------------------------------&#10;from typing import Optional, TYPE_CHECKING, Union, cast, overload&#10;from git.types import AnyGitObject, Literal, PathLike&#10;if TYPE_CHECKING:&#10; from git.db import GitCmdObjectDB&#10; from git.objects import Commit, TagObject&#10; from git.refs.reference import Reference" />
  2046. <option name="metadata">
  2047. <KnowledgeReferenceMetadata>
  2048. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/repo/fun.py" />
  2049. </KnowledgeReferenceMetadata>
  2050. </option>
  2051. </KnowledgeReference>
  2052. <KnowledgeReference>
  2053. <option name="chunk" value=".venv\Lib\site-packages\git\diff.py: # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors&#10;#&#10;# This module is part of GitPython and is released under the&#10;# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/&#10;__all__ = [&quot;DiffConstants&quot;, &quot;NULL_TREE&quot;, &quot;INDEX&quot;, &quot;Diffable&quot;, &quot;DiffIndex&quot;, &quot;Diff&quot;]&#10;import enum&#10;import re&#10;import warnings&#10;from git.cmd import handle_process_output&#10;from git.compat import defenc&#10;from git.objects.blob import Blob&#10;from git.objects.util import mode_str_to_int&#10;from git.util import finalize_process, hex_to_bin&#10;# typing ------------------------------------------------------------------&#10;from typing import (&#10; Any,&#10; Iterator,&#10; List,&#10; Match,&#10; Optional,&#10; Tuple,&#10; TYPE_CHECKING,&#10; TypeVar,&#10; Union,&#10; cast,&#10;)&#10;from git.types import Literal, PathLike&#10;if TYPE_CHECKING:&#10; from subprocess import Popen&#10; from git.cmd import Git&#10; from git.objects.base import IndexObject&#10; from git.objects.commit import Commit&#10; from git.objects.tree import Tree&#10; from git.repo.base import Repo" />
  2054. <option name="metadata">
  2055. <KnowledgeReferenceMetadata>
  2056. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/diff.py" />
  2057. </KnowledgeReferenceMetadata>
  2058. </option>
  2059. </KnowledgeReference>
  2060. <KnowledgeReference>
  2061. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\urllib3\poolmanager.py: if not pool_key_constructor:&#10; raise URLSchemeUnknown(scheme)&#10; pool_key = pool_key_constructor(request_context)&#10; return self.connection_from_pool_key(pool_key, request_context=request_context)&#10;def connection_from_pool_key(self, pool_key, request_context=None):&#10; &quot;&quot;&quot;&#10; Get a :class:`urllib3.connectionpool.ConnectionPool` based on the provided pool key.&#10; ``pool_key`` should be a namedtuple that only contains immutable&#10; objects. At a minimum it must have the ``scheme``, ``host``, and&#10; ``port`` fields.&#10; &quot;&quot;&quot;&#10; with self.pools.lock:&#10; # If the scheme, host, or port doesn't match existing open&#10; # connections, open a new ConnectionPool.&#10; pool = self.pools.get(pool_key)&#10; if pool:&#10; return pool&#10; # Make a fresh ConnectionPool of the desired type&#10; scheme = request_context[&quot;scheme&quot;]&#10; host = request_context[&quot;host&quot;]&#10; port = request_context[&quot;port&quot;]&#10; pool = self._new_pool(scheme, host, port, request_context=request_context)" />
  2062. <option name="metadata">
  2063. <KnowledgeReferenceMetadata>
  2064. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py" />
  2065. </KnowledgeReferenceMetadata>
  2066. </option>
  2067. </KnowledgeReference>
  2068. <KnowledgeReference>
  2069. <option name="chunk" value=".venv\Lib\site-packages\starlette\applications.py: ) -&gt; None: # pragma: no cover&#10; self.router.add_route(path, route, methods=methods, name=name, include_in_schema=include_in_schema)&#10;def add_websocket_route(&#10; self,&#10; path: str,&#10; route: typing.Callable[[WebSocket], typing.Awaitable[None]],&#10; name: str | None = None,&#10;) -&gt; None: # pragma: no cover&#10; self.router.add_websocket_route(path, route, name=name)&#10;def exception_handler(self, exc_class_or_status_code: int | type[Exception]) -&gt; typing.Callable: # type: ignore[type-arg]&#10; warnings.warn(&#10; &quot;The `exception_handler` decorator is deprecated, and will be removed in version 1.0.0. &quot;&#10; &quot;Refer to https://www.starlette.io/exceptions/ for the recommended approach.&quot;,&#10; DeprecationWarning,&#10; )&#10; def decorator(func: typing.Callable) -&gt; typing.Callable: # type: ignore[type-arg]" />
  2070. <option name="metadata">
  2071. <KnowledgeReferenceMetadata>
  2072. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/applications.py" />
  2073. </KnowledgeReferenceMetadata>
  2074. </option>
  2075. </KnowledgeReference>
  2076. <KnowledgeReference>
  2077. <option name="chunk" value=".venv\Lib\site-packages\fastapi\openapi\utils.py: &quot;application/json&quot;: {&#10; &quot;schema&quot;: {&quot;$ref&quot;: REF_PREFIX + &quot;HTTPValidationError&quot;}&#10; }&#10; },&#10; }&#10; if &quot;ValidationError&quot; not in definitions:&#10; definitions.update(&#10; {&#10; &quot;ValidationError&quot;: validation_error_definition,&#10; &quot;HTTPValidationError&quot;: validation_error_response_definition,&#10; }&#10; )&#10; if route.openapi_extra:&#10; deep_dict_update(operation, route.openapi_extra)&#10; path[method.lower()] = operation&#10; return path, security_schemes, definitions&#10;def get_fields_from_routes(&#10; routes: Sequence[BaseRoute],&#10;) -&gt; List[ModelField]:&#10; body_fields_from_routes: List[ModelField] = []&#10; responses_from_routes: List[ModelField] = []&#10; request_fields_from_routes: List[ModelField] = []&#10; callback_flat_models: List[ModelField] = []&#10; for route in routes:&#10; if getattr(route, &quot;include_in_schema&quot;, None) and isinstance(&#10; route, routing.APIRoute&#10; ):&#10; if route.body_field:&#10; assert isinstance(&#10; route.body_field, ModelField" />
  2078. <option name="metadata">
  2079. <KnowledgeReferenceMetadata>
  2080. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/fastapi/openapi/utils.py" />
  2081. </KnowledgeReferenceMetadata>
  2082. </option>
  2083. </KnowledgeReference>
  2084. <KnowledgeReference>
  2085. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\api.py: def user_documents_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: documents directory tied to the user&quot;&quot;&quot;&#10;@property&#10;@abstractmethod&#10;def user_downloads_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: downloads directory tied to the user&quot;&quot;&quot;&#10;@property&#10;@abstractmethod&#10;def user_pictures_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: pictures directory tied to the user&quot;&quot;&quot;&#10;@property&#10;@abstractmethod&#10;def user_videos_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: videos directory tied to the user&quot;&quot;&quot;&#10;@property&#10;@abstractmethod&#10;def user_music_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: music directory tied to the user&quot;&quot;&quot;&#10;@property&#10;@abstractmethod&#10;def user_runtime_dir(self) -&gt; str:&#10; &quot;&quot;&quot;:return: runtime directory tied to the user&quot;&quot;&quot;&#10;@property&#10;def user_data_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: data path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_data_dir)&#10;@property&#10;def site_data_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: data path shared by users&quot;&quot;&quot;" />
  2086. <option name="metadata">
  2087. <KnowledgeReferenceMetadata>
  2088. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/api.py" />
  2089. </KnowledgeReferenceMetadata>
  2090. </option>
  2091. </KnowledgeReference>
  2092. <KnowledgeReference>
  2093. <option name="chunk" value=".venv\Lib\site-packages\git\db.py: # This module is part of GitPython and is released under the&#10;# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/&#10;&quot;&quot;&quot;Module with our own gitdb implementation - it uses the git command.&quot;&quot;&quot;&#10;__all__ = [&quot;GitCmdObjectDB&quot;, &quot;GitDB&quot;]&#10;from gitdb.base import OInfo, OStream&#10;from gitdb.db import GitDB, LooseObjectDB&#10;from gitdb.exc import BadObject&#10;from git.util import bin_to_hex, hex_to_bin&#10;from git.exc import GitCommandError&#10;# typing-------------------------------------------------&#10;from typing import TYPE_CHECKING&#10;from git.types import PathLike&#10;if TYPE_CHECKING:&#10; from git.cmd import Git&#10;# --------------------------------------------------------&#10;class GitCmdObjectDB(LooseObjectDB):&#10; &quot;&quot;&quot;A database representing the default git object store, which includes loose&#10; objects, pack files and an alternates file.&#10; It will create objects only in the loose object database.&#10; &quot;&quot;&quot;&#10; def __init__(self, root_path: PathLike, git: &quot;Git&quot;) -&gt; None:&#10; &quot;&quot;&quot;Initialize this instance with the root and a git command.&quot;&quot;&quot;&#10; super().__init__(root_path)&#10; self._git = git&#10; def info(self, binsha: bytes) -&gt; OInfo:&#10; &quot;&quot;&quot;Get a git object header (using git itself).&quot;&quot;&quot;" />
  2094. <option name="metadata">
  2095. <KnowledgeReferenceMetadata>
  2096. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/db.py" />
  2097. </KnowledgeReferenceMetadata>
  2098. </option>
  2099. </KnowledgeReference>
  2100. <KnowledgeReference>
  2101. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\cli\req_command.py: # automatically ContextManager[Any] and self._session becomes Any,&#10; # then https://github.com/python/mypy/issues/7696 kicks in&#10; assert self._session is not None&#10; return self._session&#10;def _build_session(&#10; self,&#10; options: Values,&#10; retries: Optional[int] = None,&#10; timeout: Optional[int] = None,&#10; fallback_to_certifi: bool = False,&#10;) -&gt; PipSession:&#10; cache_dir = options.cache_dir&#10; assert not cache_dir or os.path.isabs(cache_dir)&#10; if &quot;truststore&quot; in options.features_enabled:&#10; try:&#10; ssl_context = _create_truststore_ssl_context()&#10; except Exception:&#10; if not fallback_to_certifi:&#10; raise&#10; ssl_context = None&#10; else:&#10; ssl_context = None&#10; session = PipSession(&#10; cache=os.path.join(cache_dir, &quot;http&quot;) if cache_dir else None,&#10; retries=retries if retries is not None else options.retries,&#10; trusted_hosts=options.trusted_hosts,&#10; index_urls=self._get_index_urls(options)," />
  2102. <option name="metadata">
  2103. <KnowledgeReferenceMetadata>
  2104. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/cli/req_command.py" />
  2105. </KnowledgeReferenceMetadata>
  2106. </option>
  2107. </KnowledgeReference>
  2108. <KnowledgeReference>
  2109. <option name="chunk" value=".venv\Lib\site-packages\pip\_vendor\platformdirs\api.py: def user_documents_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: documents path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_documents_dir)&#10;@property&#10;def user_downloads_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: downloads path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_downloads_dir)&#10;@property&#10;def user_pictures_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: pictures path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_pictures_dir)&#10;@property&#10;def user_videos_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: videos path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_videos_dir)&#10;@property&#10;def user_music_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: music path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_music_dir)&#10;@property&#10;def user_runtime_path(self) -&gt; Path:&#10; &quot;&quot;&quot;:return: runtime path tied to the user&quot;&quot;&quot;&#10; return Path(self.user_runtime_dir)" />
  2110. <option name="metadata">
  2111. <KnowledgeReferenceMetadata>
  2112. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_vendor/platformdirs/api.py" />
  2113. </KnowledgeReferenceMetadata>
  2114. </option>
  2115. </KnowledgeReference>
  2116. <KnowledgeReference>
  2117. <option name="chunk" value=".venv\Lib\site-packages\git\remote.py: # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors&#10;#&#10;# This module is part of GitPython and is released under the&#10;# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/&#10;&quot;&quot;&quot;Module implementing a remote object allowing easy access to git remotes.&quot;&quot;&quot;&#10;__all__ = [&quot;RemoteProgress&quot;, &quot;PushInfo&quot;, &quot;FetchInfo&quot;, &quot;Remote&quot;]&#10;import contextlib&#10;import logging&#10;import re&#10;from git.cmd import Git, handle_process_output&#10;from git.compat import defenc, force_text&#10;from git.config import GitConfigParser, SectionConstraint, cp&#10;from git.exc import GitCommandError&#10;from git.refs import Head, Reference, RemoteReference, SymbolicReference, TagReference&#10;from git.util import (&#10; CallableRemoteProgress,&#10; IterableList,&#10; IterableObj,&#10; LazyMixin,&#10; RemoteProgress,&#10; join_path,&#10;)&#10;# typing-------------------------------------------------------&#10;from typing import (&#10; Any,&#10; Callable,&#10; Dict,&#10; Iterator,&#10; List,&#10; NoReturn,&#10; Optional,&#10; Sequence,&#10; TYPE_CHECKING,&#10; Type,&#10; Union,&#10; cast,&#10; overload,&#10;)&#10;from git.types import AnyGitObject, Literal, PathLike&#10;if TYPE_CHECKING:&#10; from git.objects.commit import Commit" />
  2118. <option name="metadata">
  2119. <KnowledgeReferenceMetadata>
  2120. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/remote.py" />
  2121. </KnowledgeReferenceMetadata>
  2122. </option>
  2123. </KnowledgeReference>
  2124. <KnowledgeReference>
  2125. <option name="chunk" value=".venv\Lib\site-packages\starlette\middleware\authentication.py: from __future__ import annotations&#10;import typing&#10;from starlette.authentication import (&#10; AuthCredentials,&#10; AuthenticationBackend,&#10; AuthenticationError,&#10; UnauthenticatedUser,&#10;)&#10;from starlette.requests import HTTPConnection&#10;from starlette.responses import PlainTextResponse, Response&#10;from starlette.types import ASGIApp, Receive, Scope, Send&#10;class AuthenticationMiddleware:&#10; def __init__(&#10; self,&#10; app: ASGIApp,&#10; backend: AuthenticationBackend,&#10; on_error: typing.Callable[[HTTPConnection, AuthenticationError], Response] | None = None,&#10; ) -&gt; None:&#10; self.app = app&#10; self.backend = backend&#10; self.on_error: typing.Callable[[HTTPConnection, AuthenticationError], Response] = (&#10; on_error if on_error is not None else self.default_on_error&#10; )&#10; async def __call__(self, scope: Scope, receive: Receive, send: Send) -&gt; None:&#10; if scope[&quot;type&quot;] not in [&quot;http&quot;, &quot;websocket&quot;]:&#10; await self.app(scope, receive, send)&#10; return&#10; conn = HTTPConnection(scope)&#10; try:&#10; auth_result = await self.backend.authenticate(conn)&#10; except AuthenticationError as exc:&#10; response = self.on_error(conn, exc)" />
  2126. <option name="metadata">
  2127. <KnowledgeReferenceMetadata>
  2128. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/middleware/authentication.py" />
  2129. </KnowledgeReferenceMetadata>
  2130. </option>
  2131. </KnowledgeReference>
  2132. <KnowledgeReference>
  2133. <option name="chunk" value=".venv\Lib\site-packages\git\repo\base.py: repo = Repo(&quot;~/Development/git-python.git&quot;)&#10; repo = Repo(&quot;$REPOSITORIES/Development/git-python.git&quot;)&#10; repo = Repo(R&quot;C:\Users\mtrier\Development\git-python\.git&quot;)&#10; - In *Cygwin*, `path` may be a ``cygdrive/...`` prefixed path.&#10; - If `path` is ``None`` or an empty string, :envvar:`GIT_DIR` is used. If&#10; that environment variable is absent or empty, the current directory is&#10; used.&#10;:param odbt:&#10; Object DataBase type - a type which is constructed by providing the&#10; directory containing the database objects, i.e. ``.git/objects``. It will be&#10; used to access all object data.&#10;:param search_parent_directories:&#10; If ``True``, all parent directories will be searched for a valid repo as&#10; well.&#10; Please note that this was the default behaviour in older versions of&#10; GitPython, which is considered a bug though.&#10;:raise git.exc.InvalidGitRepositoryError:&#10;:raise git.exc.NoSuchPathError:&#10;:return:&#10; :class:`Repo`&#10;&quot;&quot;&quot;&#10;epath = path or os.getenv(&quot;GIT_DIR&quot;)" />
  2134. <option name="metadata">
  2135. <KnowledgeReferenceMetadata>
  2136. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/repo/base.py" />
  2137. </KnowledgeReferenceMetadata>
  2138. </option>
  2139. </KnowledgeReference>
  2140. <KnowledgeReference>
  2141. <option name="chunk" value=".venv\Lib\site-packages\starlette\routing.py: include_in_schema=include_in_schema,&#10; )&#10; self.routes.append(route)&#10;def add_websocket_route(&#10; self,&#10; path: str,&#10; endpoint: typing.Callable[[WebSocket], typing.Awaitable[None]],&#10; name: str | None = None,&#10;) -&gt; None: # pragma: no cover&#10; route = WebSocketRoute(path, endpoint=endpoint, name=name)&#10; self.routes.append(route)&#10;def route(&#10; self,&#10; path: str,&#10; methods: list[str] | None = None,&#10; name: str | None = None,&#10; include_in_schema: bool = True,&#10;) -&gt; typing.Callable: # type: ignore[type-arg]&#10; &quot;&quot;&quot;&#10; We no longer document this decorator style API, and its usage is discouraged.&#10; Instead you should use the following approach:&#10; &gt;&gt;&gt; routes = [Route(path, endpoint=...), ...]&#10; &gt;&gt;&gt; app = Starlette(routes=routes)&#10; &quot;&quot;&quot;&#10; warnings.warn(&#10; &quot;The `route` decorator is deprecated, and will be removed in version 1.0.0.&quot;" />
  2142. <option name="metadata">
  2143. <KnowledgeReferenceMetadata>
  2144. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/starlette/routing.py" />
  2145. </KnowledgeReferenceMetadata>
  2146. </option>
  2147. </KnowledgeReference>
  2148. <KnowledgeReference>
  2149. <option name="chunk" value=".venv\Lib\site-packages\git\__init__.py: Optional path to the Git executable. If not absolute, it is resolved&#10; immediately, relative to the current directory.&#10; :note:&#10; The `path` parameter is usually omitted and cannot be used to specify a custom&#10; command whose location is looked up in a path search on each call. See&#10; :meth:`Git.refresh &lt;git.cmd.Git.refresh&gt;` for details on how to achieve this.&#10; :note:&#10; This calls :meth:`Git.refresh &lt;git.cmd.Git.refresh&gt;` and sets other global&#10; configuration according to the effect of doing so. As such, this function should&#10; usually be used instead of using :meth:`Git.refresh &lt;git.cmd.Git.refresh&gt;` or&#10; :meth:`FetchInfo.refresh &lt;git.remote.FetchInfo.refresh&gt;` directly.&#10; :note:&#10; This function is called automatically, with no arguments, at import time.&#10; &quot;&quot;&quot;&#10; global GIT_OK&#10; GIT_OK = False&#10; if not Git.refresh(path=path):&#10; return&#10; if not FetchInfo.refresh(): # noqa: F405&#10; return # type: ignore[unreachable]&#10; GIT_OK = True&#10;try:&#10; refresh()" />
  2150. <option name="metadata">
  2151. <KnowledgeReferenceMetadata>
  2152. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/__init__.py" />
  2153. </KnowledgeReferenceMetadata>
  2154. </option>
  2155. </KnowledgeReference>
  2156. <KnowledgeReference>
  2157. <option name="chunk" value=".idea\workspace.xml: &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;project version=&quot;4&quot;&gt;&#10; &lt;component name=&quot;AutoImportSettings&quot;&gt;&#10; &lt;option name=&quot;autoReloadType&quot; value=&quot;SELECTIVE&quot; /&gt;&#10; &lt;/component&gt;&#10; &lt;component name=&quot;ChangeListManager&quot;&gt;&#10; &lt;list default=&quot;true&quot; id=&quot;801df9eb-d20f-4251-b634-47239bf95d8b&quot; name=&quot;更改&quot; comment=&quot;增强安全性与可读性&quot;&gt;&#10; &lt;change beforePath=&quot;C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py&quot; beforeDir=&quot;false&quot; afterPath=&quot;C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py&quot; afterDir=&quot;false&quot; /&gt;&#10; &lt;change beforePath=&quot;C:/Users/32965/PycharmProjects/GitNexus/demo.py&quot; beforeDir=&quot;false&quot; afterPath=&quot;C:/Users/32965/PycharmProjects/GitNexus/demo.py&quot; afterDir=&quot;false&quot; /&gt;&#10; &lt;change beforePath=&quot;C:/Users/32965/PycharmProjects/GitNexus/models/gitModels.py&quot; beforeDir=&quot;false&quot; afterPath=&quot;C:/Users/32965/PycharmProjects/GitNexus/models/gitModels.py&quot; afterDir=&quot;false&quot; /&gt;&#10; &lt;/list&gt;&#10; &lt;option name=&quot;SHOW_DIALOG&quot; value=&quot;false&quot; /&gt;&#10; &lt;option name=&quot;HIGHLIGHT_CONFLICTS&quot; value=&quot;true&quot; /&gt;&#10; &lt;option name=&quot;HIGHLIGHT_NON_ACTIVE_CHANGELIST&quot; value=&quot;false&quot; /&gt;" />
  2158. <option name="metadata">
  2159. <KnowledgeReferenceMetadata>
  2160. <option name="source" value="$PROJECT_DIR$/.idea/workspace.xml" />
  2161. </KnowledgeReferenceMetadata>
  2162. </option>
  2163. </KnowledgeReference>
  2164. <KnowledgeReference>
  2165. <option name="chunk" value=".idea\workspace.xml: &lt;MESSAGE value=&quot;更新clone,log,status&quot; /&gt;&#10; &lt;MESSAGE value=&quot;增强安全性与可读性&quot; /&gt;&#10; &lt;option name=&quot;LAST_COMMIT_MESSAGE&quot; value=&quot;增强安全性与可读性&quot; /&gt;&#10;&lt;/component&gt;&#10;&lt;component name=&quot;com.intellij.coverage.CoverageDataManagerImpl&quot;&gt;&#10; &lt;SUITE FILE_PATH=&quot;coverage/GitNexus$gittest.coverage&quot; NAME=&quot;gittest 覆盖结果&quot; MODIFIED=&quot;1742402100591&quot; SOURCE_PROVIDER=&quot;com.intellij.coverage.DefaultCoverageFileProvider&quot; RUNNER=&quot;coverage.py&quot; COVERAGE_BY_TEST_ENABLED=&quot;false&quot; COVERAGE_TRACING_ENABLED=&quot;false&quot; WORKING_DIRECTORY=&quot;C:/Users/32965/PycharmProjects/GitNexus/FastApi&quot; /&gt;&#10; &lt;SUITE FILE_PATH=&quot;coverage/GitNexus$gitRouter.coverage&quot; NAME=&quot;gitRouter 覆盖结果&quot; MODIFIED=&quot;1742403755988&quot; SOURCE_PROVIDER=&quot;com.intellij.coverage.DefaultCoverageFileProvider&quot; RUNNER=&quot;coverage.py&quot; COVERAGE_BY_TEST_ENABLED=&quot;false&quot; COVERAGE_TRACING_ENABLED=&quot;false&quot; WORKING_DIRECTORY=&quot;C:/Users/32965/PycharmProjects/GitNexus/FastApi/api&quot; /&gt;" />
  2166. <option name="metadata">
  2167. <KnowledgeReferenceMetadata>
  2168. <option name="source" value="$PROJECT_DIR$/.idea/workspace.xml" />
  2169. </KnowledgeReferenceMetadata>
  2170. </option>
  2171. </KnowledgeReference>
  2172. <KnowledgeReference>
  2173. <option name="chunk" value=".venv\Lib\site-packages\pip\_internal\network\download.py: filename = link.filename # fallback&#10; # Have a look at the Content-Disposition header for a better guess&#10; content_disposition = resp.headers.get(&quot;content-disposition&quot;)&#10; if content_disposition:&#10; filename = parse_content_disposition(content_disposition, filename)&#10; ext: Optional[str] = splitext(filename)[1]&#10; if not ext:&#10; ext = mimetypes.guess_extension(resp.headers.get(&quot;content-type&quot;, &quot;&quot;))&#10; if ext:&#10; filename += ext&#10; if not ext and link.url != resp.url:&#10; ext = os.path.splitext(resp.url)[1]&#10; if ext:&#10; filename += ext&#10; return filename&#10;def _http_get_download(session: PipSession, link: Link) -&gt; Response:&#10; target_url = link.url.split(&quot;#&quot;, 1)[0]&#10; resp = session.get(target_url, headers=HEADERS, stream=True)&#10; raise_for_status(resp)&#10; return resp&#10;class Downloader:&#10; def __init__(&#10; self,&#10; session: PipSession,&#10; progress_bar: str,&#10; ) -&gt; None:&#10; self._session = session" />
  2174. <option name="metadata">
  2175. <KnowledgeReferenceMetadata>
  2176. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/pip/_internal/network/download.py" />
  2177. </KnowledgeReferenceMetadata>
  2178. </option>
  2179. </KnowledgeReference>
  2180. <KnowledgeReference>
  2181. <option name="chunk" value=".venv\Lib\site-packages\uvicorn\config.py: logging.config.dictConfig(loaded_config)&#10; elif isinstance(self.log_config, str) and self.log_config.endswith((&quot;.yaml&quot;, &quot;.yml&quot;)):&#10; # Install the PyYAML package or the uvicorn[standard] optional&#10; # dependencies to enable this functionality.&#10; import yaml&#10; with open(self.log_config) as file:&#10; loaded_config = yaml.safe_load(file)&#10; logging.config.dictConfig(loaded_config)&#10; else:&#10; # See the note about fileConfig() here:&#10; # https://docs.python.org/3/library/logging.config.html#configuration-file-format&#10; logging.config.fileConfig(self.log_config, disable_existing_loggers=False)&#10;if self.log_level is not None:&#10; if isinstance(self.log_level, str):&#10; log_level = LOG_LEVELS[self.log_level]&#10; else:&#10; log_level = self.log_level&#10; logging.getLogger(&quot;uvicorn.error&quot;).setLevel(log_level)&#10; logging.getLogger(&quot;uvicorn.access&quot;).setLevel(log_level)" />
  2182. <option name="metadata">
  2183. <KnowledgeReferenceMetadata>
  2184. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/uvicorn/config.py" />
  2185. </KnowledgeReferenceMetadata>
  2186. </option>
  2187. </KnowledgeReference>
  2188. <KnowledgeReference>
  2189. <option name="chunk" value=".venv\Lib\site-packages\git\objects\base.py: * :class:`Tree &lt;git.objects.tree.Tree&gt;`&#10;* :class:`Commit &lt;git.objects.commit.Commit&gt;`&#10;* :class:`TagObject &lt;git.objects.tag.TagObject&gt;`&#10;See :manpage:`gitglossary(7)` on:&#10;* &quot;object&quot;: https://git-scm.com/docs/gitglossary#def_object&#10;* &quot;object type&quot;: https://git-scm.com/docs/gitglossary#def_object_type&#10;* &quot;blob&quot;: https://git-scm.com/docs/gitglossary#def_blob_object&#10;* &quot;tree object&quot;: https://git-scm.com/docs/gitglossary#def_tree_object&#10;* &quot;commit object&quot;: https://git-scm.com/docs/gitglossary#def_commit_object&#10;* &quot;tag object&quot;: https://git-scm.com/docs/gitglossary#def_tag_object&#10;:note:&#10; See the :class:`~git.types.AnyGitObject` union type of the four leaf subclasses&#10; that represent actual git object types.&#10;:note:&#10; :class:`~git.objects.submodule.base.Submodule` is defined under the hierarchy" />
  2190. <option name="metadata">
  2191. <KnowledgeReferenceMetadata>
  2192. <option name="source" value="$PROJECT_DIR$/.venv/Lib/site-packages/git/objects/base.py" />
  2193. </KnowledgeReferenceMetadata>
  2194. </option>
  2195. </KnowledgeReference>
  2196. </list>
  2197. </option>
  2198. <option name="command" value="" />
  2199. <option name="conversationId" value="0195b41a198c73c3a9c093d68135fe4f" />
  2200. <option name="historyDocumentMap">
  2201. <map>
  2202. <entry key="file:///C:/Users/32965/PycharmProjects/GitNexus/api/gitRouter.py" value="import os, json,hashlib&#10;from fastapi import APIRouter, BackgroundTasks&#10;&#10;&#10;from git import Repo&#10;&#10;from pydantic import BaseModel&#10;&#10;from models.gitModels import Users&#10;&#10;&#10;class RequestBody(BaseModel):&#10; uuid: str&#10; repo_url: str&#10;&#10;&#10;def generate_repo_path(uuid, repo_url):&#10; repo_name = repo_url.split(&quot;/&quot;)[-1].replace(&quot;.git&quot;, &quot;&quot;)&#10; base_path = os.path.join(&quot;C:/Users/32965/repo&quot;, uuid)&#10; return os.path.join(base_path, repo_name), repo_name&#10;&#10;&#10;def get_repo(uuid, repo_url):&#10; path, _ = generate_repo_path(uuid, repo_url)&#10; if not os.path.exists(path):&#10; return 0&#10; return Repo(path)&#10;&#10;&#10;gitrouter = APIRouter()&#10;&#10;&#10;@gitrouter.post(&quot;/clone&quot;)&#10;async def clone(request: RequestBody, background_tasks: BackgroundTasks):&#10; local_path, repo_name = generate_repo_path(request.uuid, request.repo_url)&#10; if os.path.exists(local_path):&#10; return {&quot;status&quot;: &quot;400&quot;, &quot;msg&quot;: &quot;仓库已存在&quot;, &quot;uuid&quot;: request.uuid, &quot;repo_url&quot;: request.repo_url,&#10; &quot;path&quot;: local_path}&#10; else:&#10; background_tasks.add_task(Repo.clone_from, request.repo_url, local_path)&#10; response = {&quot;status&quot;: &quot;200&quot;, &quot;msg&quot;: &quot;成功创建克隆任务&quot;, &quot;uuid&quot;: request.uuid, &quot;repo_name&quot;: repo_name,&#10; &quot;local_path&quot;: local_path}&#10; return response&#10;&#10;&#10;@gitrouter.post(&quot;/log&quot;)&#10;async def log(request: RequestBody):&#10; print(request.uuid)&#10; user=await Users(uuid=request.uuid)&#10; print(user.username)&#10; email = user.email&#10; print(email)&#10; email_md5 = hashlib.md5(email.encode(encoding='UTF-8')).hexdigest()&#10; avatar = &quot;https://gravatar.loli.net/avatar/&quot;+email_md5+&quot;?s=512&amp;r=pg&quot;&#10; local_path, _ = generate_repo_path(request.uuid, request.repo_url)&#10; repo = get_repo(request.uuid, request.repo_url)&#10; if not repo:&#10; return {&quot;status&quot;: &quot;400&quot;, &quot;msg&quot;: &quot;仓库不存在&quot;, &quot;uuid&quot;: request.uuid, &quot;repo_url&quot;: request.repo_url,&#10; &quot;local_path&quot;: local_path,&quot;email&quot;:email,&quot;avatar&quot;:avatar}&#10;&#10; log_ = repo.git.log('--pretty={&quot;commit&quot;:&quot;%h&quot;,&quot;author&quot;:&quot;%an&quot;,&quot;summary&quot;:&quot;%s&quot;,&quot;date&quot;:&quot;%cd&quot;}', max_count=50,&#10; date='format:%Y-%m-%d %H:%M').split(&quot;\n&quot;)&#10; log = list(map(json.loads, log_))&#10; response = {&quot;status&quot;: &quot;200&quot;, &quot;msg&quot;: &quot;成功获取日志&quot;, &quot;uuid&quot;: request.uuid, &quot;repo_url&quot;: request.repo_url,&#10; &quot;local_path&quot;: local_path, &quot;git_log&quot;: log}&#10; return response&#10;&#10;&#10;@gitrouter.post(&quot;/status&quot;)&#10;async def status(request: RequestBody):&#10; repo = get_repo(request.uuid, request.repo_url)&#10; # 手动获取所有数据&#10; active_branch = repo.active_branch&#10; tracking_branch = active_branch.tracking_branch()&#10; ahead = sum(1 for _ in repo.iter_commits(f&quot;{active_branch}..{tracking_branch}&quot;))&#10; behind = sum(1 for _ in repo.iter_commits(f&quot;{tracking_branch}..{active_branch}&quot;))&#10; conflicts = repo.index.unmerged_blobs()&#10; conflicted = [path for path, entries in conflicts.items()]&#10; created_files = repo.untracked_files&#10; current = repo.active_branch.name&#10; head_commit = repo.head.commit&#10; tree = head_commit.tree&#10; all_files = [item.path for item in tree.traverse() if item.type == 'blob']&#10; diffs = repo.index.diff(None)&#10; deleted = [d.a_path for d in diffs if d.change_type == 'D']&#10; detached = repo.head.is_detached&#10; ignored_files = repo.git.execute([&quot;git&quot;, &quot;ls-files&quot;, &quot;--others&quot;, &quot;--ignored&quot;, &quot;--exclude-standard&quot;]).split(&quot;\n&quot;)&#10; modified_files = [d.a_path for d in diffs]&#10; untracked_files = repo.untracked_files&#10; staged_entries = repo.index.entries&#10; staged = [path[0] for path, _ in staged_entries.items()]&#10; tracking = active_branch.tracking_branch().name&#10;&#10; status = {&quot;ahead&quot;: ahead, &quot;behind&quot;: behind, &quot;conflicted&quot;: conflicted, &quot;created&quot;: created_files,&#10; &quot;current&quot;: current, &quot;deleted&quot;: deleted, &quot;detached&quot;: detached, &quot;files&quot;: all_files,&#10; &quot;ignored&quot;: ignored_files,&#10; &quot;modified&quot;: modified_files, &quot;not_added&quot;: untracked_files, &quot;staged&quot;: staged, &quot;tracking&quot;: tracking}&#10; return status&#10;" />
  2203. </map>
  2204. </option>
  2205. <option name="messageId" value="0195b41a198c72b7887b43d84c1b4d31" />
  2206. <option name="question" value="这里olt路由打印的fhvi怎么是Mlmv?" />
  2207. <option name="rating" value="UNRATED" />
  2208. <option name="referenceBeans">
  2209. <list />
  2210. </option>
  2211. <option name="status" value="SUCCESS" />
  2212. <option name="variables">
  2213. <list />
  2214. </option>
  2215. </Turn>
  2216. </list>
  2217. </option>
  2218. <option name="updateTime" value="1742483449480" />
  2219. </Conversation>
  2220. <Conversation>
  2221. <option name="createTime" value="1742466058549" />
  2222. <option name="id" value="0195b3120935765ca075fe467ac73da5" />
  2223. <option name="title" value="新对话 2025年3月20日 18:20:58" />
  2224. <option name="updateTime" value="1742466058549" />
  2225. </Conversation>
  2226. <Conversation>
  2227. <option name="createTime" value="1742390504729" />
  2228. <option name="id" value="0195ae912d197868ab44335846c122f6" />
  2229. <option name="title" value="新对话 2025年3月19日 21:21:44" />
  2230. <option name="updateTime" value="1742390504729" />
  2231. </Conversation>
  2232. <Conversation>
  2233. <option name="createTime" value="1742382368179" />
  2234. <option name="id" value="0195ae1505b37b5faf8e0d8fb5c30336" />
  2235. <option name="title" value="新对话 2025年3月19日 19:06:08" />
  2236. <option name="updateTime" value="1742382368179" />
  2237. </Conversation>
  2238. <Conversation>
  2239. <option name="createTime" value="1742376286697" />
  2240. <option name="id" value="0195adb839e971648c198471283307dc" />
  2241. <option name="title" value="新对话 2025年3月19日 17:24:46" />
  2242. <option name="updateTime" value="1742376286697" />
  2243. </Conversation>
  2244. <Conversation>
  2245. <option name="createTime" value="1742363604602" />
  2246. <option name="id" value="0195acf6b67a7859bf046bc3abaf64bd" />
  2247. <option name="title" value="新对话 2025年3月19日 13:53:24" />
  2248. <option name="updateTime" value="1742363604602" />
  2249. </Conversation>
  2250. </list>
  2251. </option>
  2252. </component>
  2253. </project>