{"id":470210,"date":"2025-08-11T09:00:08","date_gmt":"2025-08-11T09:00:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=470210"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=470210","title":{"rendered":"<span>TY \u2014 \u043d\u0435 thank you, \u0430 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 type checker \u0434\u043b\u044f Python<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c0a\/8ba\/eac\/c0a8baeac7f7e8ef2f7ff78f94f2cba4.png\" width=\"1280\" height=\"720\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c0a\/8ba\/eac\/c0a8baeac7f7e8ef2f7ff78f94f2cba4.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c0a\/8ba\/eac\/c0a8baeac7f7e8ef2f7ff78f94f2cba4.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0418\u0432\u0430\u043d, \u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u044e \u043d\u0430 Python, \u0430 \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0438\u0448\u0443 \u0434\u043b\u044f \u0431\u043b\u043e\u0433\u0430 \u041c\u0422\u0421. \u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 <a href=\"https:\/\/habr.com\/ru\/companies\/ru_mts\/articles\/902244\/\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c<\/a>, \u043a\u0430\u043a \u044f \u043e\u0441\u0432\u0430\u0438\u0432\u0430\u043b Go \u0438 \u0441 \u0447\u0435\u043c \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0447\u0438\u0442\u0430\u043b \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0445\u043e\u0447\u0443 \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u043c\u0435\u0433\u0430\u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 Python \u2014 ty: \u043a\u0430\u043a \u043e\u043d \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u043d\u044e\u0430\u043d\u0441\u044b, \u0430 \u0435\u0449\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c!<\/p>\n<h2>\u0427\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043f\u043e\u043a\u0435\u043c\u043e\u043d?<\/h2>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8e4\/313\/3bc\/8e43133bcc9b36a5dd09889951eaa738.png\" width=\"1041\" height=\"487\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/8e4\/313\/3bc\/8e43133bcc9b36a5dd09889951eaa738.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8e4\/313\/3bc\/8e43133bcc9b36a5dd09889951eaa738.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0431\u0430\u0437\u044b:<strong> ty <\/strong>\u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 <strong>Astral<\/strong>. \u041a\u0430\u043a \u043f\u0438\u0448\u0443\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/astral-sh\/ty\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>, \u044d\u0442\u043e \u0441\u0443\u043f\u0435\u0440-\u043f\u0443\u043f\u0435\u0440 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 Python, \u0430 \u0435\u0449\u0435 \u2014 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Rust. \u041f\u0440\u043e Rust \u043d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u0435\u0434\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b Astral \u2014 <strong>uv<\/strong> \u0438 <strong>ruff<\/strong> \u2014 \u0442\u043e\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d \u043d\u0430 \u043d\u0435\u043c.<\/p>\n<p>\u0423 ty \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f <a href=\"https:\/\/docs.astral.sh\/ty\/\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a>. \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u043e\u043d\u043b\u0430\u0439\u043d <a href=\"https:\/\/play.ty.dev\" rel=\"noopener noreferrer nofollow\">\u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435<\/a>, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430 \u041f\u041a \u043d\u0435 \u043d\u0443\u0436\u043d\u0430. <\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0443:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\"><strong>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0411\u044b\u0441\u0442\u0440\u044b\u0439, \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Rust, <strong>\u043d\u0435 \u0433\u043e\u0442\u043e\u0432<\/strong> \u043a \u043f\u0440\u043e\u0434\u0443<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0432\u0435\u0437\u0434 \u043d\u0430 GitHub<\/p>\n<\/td>\n<td>\n<p align=\"left\">10,6 \u0442\u044b\u0441.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 Issues<\/p>\n<\/td>\n<td>\n<p align=\"left\">310<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0412\u0435\u0440\u0441\u0438\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.0.1-alpha.14<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0413\u043e\u0434 \u0440\u0435\u043b\u0438\u0437\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">2025<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Pull Requests (PRs) <\/p>\n<\/td>\n<td>\n<p align=\"left\">0 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0438 162 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0423\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">MIT<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d \u0432\u043e\u043e\u0431\u0449\u0435 \u043c\u0435\u043d\u044f \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b? \u0412 2024 \u0433\u043e\u0434\u0443<em> <\/em>Astral \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 uv, \u0438 \u043e\u043d \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u043b \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c. \u0421\u0435\u0439\u0447\u0430\u0441 \u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 61 \u0442\u044b\u0441\u044f\u0447\u0430 \u0437\u0432\u0435\u0437\u0434 <a href=\"https:\/\/github.com\/astral-sh\/uv\" rel=\"noopener noreferrer nofollow\"><strong>\u043d\u0430 GitHub<\/strong><\/a>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e <strong>uv<\/strong> \u0438 \u0435\u0433\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u0445 \u043d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043f\u0438\u0441\u0430\u043b \u041b\u0435\u0448\u0430 \u0416\u0438\u0440\u044f\u043a\u043e\u0432 \u0438\u0437 MWS, \u043e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c: <a href=\"https:\/\/habr.com\/ru\/companies\/ru_mts\/articles\/883600\/\" rel=\"noopener noreferrer nofollow\">\u0442\u044b\u043a<\/a>.\u00a0 \u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043d\u0435 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u043a <strong>ty<\/strong>? <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bc9\/235\/575\/bc9235575c13b5e9d7236301c37c8778.png\" width=\"1000\" height=\"625\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/bc9\/235\/575\/bc9235575c13b5e9d7236301c37c8778.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bc9\/235\/575\/bc9235575c13b5e9d7236301c37c8778.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0438 \u0432 \u043f\u043b\u0430\u043d\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u0438 \u0432 \u043f\u043b\u0430\u043d\u0435 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0412 \u0446\u0435\u043b\u043e\u043c \u0435\u0441\u0442\u044c \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Astral \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f Python, \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u044d\u0442\u0438\u043c \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. <\/p>\n<p>\u041d\u043e \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a ty. \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043b \u0432\u044b\u0448\u0435, \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 Python \u0438 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439:<\/p>\n<p><strong>Type checker<\/strong> (\u0430\u043d\u0433\u043b. type \u2014 \u0442\u0438\u043f, checker \u2014 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440) \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u0434\u0435 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u043d \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Python \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430 <em>\u201cTypeError: unsupported operand type(s) for +: &#8216;int&#8217; and &#8216;str&#8217; \u201c).<\/em><\/p>\n<p><strong>Language server<\/strong> <em>(\u0441 \u0430\u043d\u0433\u043b. \u00ab\u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u00bb) \u2014 \u043f<\/em>\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u043c \u043a\u043e\u0434\u0430 \u0438 IDE \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c: <\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a;<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u2014 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043a\u043e\u0434\u0430 \u0438 IDE \u2014 \u044d\u0442\u043e <strong>LSP (Language Server Protocol)<\/strong>.<\/p>\n<h2>\u0413\u0430\u043b\u043e\u043f\u043e\u043c \u043f\u043e (\u0415\u0432\u0440\u043e\u043f\u0430\u043c) ty<\/h2>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/docs.astral.sh\/ty\/installation\/\" rel=\"noopener noreferrer nofollow\">\u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432<\/a>:<\/p>\n<pre><code class=\"rust\"># 1. pip pip install ty  # 2. pipx pipx install ty  # 3. uv uv tool install ty@latest<\/code><\/pre>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <strong>ty <\/strong>\u0442\u0430\u043a: <\/p>\n<pre><code class=\"rust\">ty &lt;\u041a\u041e\u041c\u0410\u041d\u0414\u0410&gt;<\/code><\/pre>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<ul>\n<li>\n<p><strong>check<\/strong> \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 (type errors);<\/p>\n<\/li>\n<li>\n<p><strong>server<\/strong> \u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440;<\/p>\n<\/li>\n<li>\n<p><strong>version<\/strong> \u2014 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u0435\u0440\u0441\u0438\u044e ty;<\/p>\n<\/li>\n<li>\n<p><strong>help<\/strong> \u2014 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u0438 \u043e\u043f\u0446\u0438\u044f\u0445 \u0438\u043b\u0438 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0434\u0432\u0435 \u043e\u043f\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p><strong>-h<\/strong>, <strong>&#8212;help<\/strong> \u2014 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e;<\/p>\n<\/li>\n<li>\n<p><strong>-V<\/strong>, <strong>&#8212;version<\/strong> \u2014 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u0435\u0440\u0441\u0438\u044e.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0414\u043b\u044f <strong>ty <\/strong>\u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0430\u0439\u043b\u0430 <strong>pyproject.toml<\/strong>:<\/p>\n<pre><code class=\"rust\">[tool.ty.rules] index-out-of-bounds = \"ignore\"<\/code><\/pre>\n<p>\u0418\u043b\u0438 <strong>ty.toml<\/strong>:<\/p>\n<pre><code class=\"rust\">[rules] index-out-of-bounds = \"ignore\"<\/code><\/pre>\n<p>\u041f\u0440\u0438\u0447\u0435\u043c \u0432\u0430\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0430 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430, \u0442\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0443 <strong>ty.toml<\/strong>. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 ty, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432 pyproject.toml, \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b. <\/p>\n<h3>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u0438\u0445 \u0443\u0440\u043e\u0432\u043d\u0438 <\/h3>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 <strong>ty <\/strong>\u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u2014 \u044d\u0442\u043e \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u043a\u043e\u0434\u0435. \u041a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0435 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0438\u043b\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. <\/p>\n<p>\u0423 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0435\u0441\u0442\u044c <a href=\"https:\/\/docs.astral.sh\/ty\/rules\/\" rel=\"noopener noreferrer nofollow\">\u0443\u0440\u043e\u0432\u043d\u0438<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c. \u0412\u0441\u0435\u0433\u043e \u0438\u0445 \u0442\u0440\u0438:<\/p>\n<ul>\n<li>\n<p><strong>Error<\/strong> (\u0441 \u0430\u043d\u0433\u043b. \u00ab\u043e\u0448\u0438\u0431\u043a\u0430\u00bb) \u2014 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043a\u0438, \u0438 <strong>ty <\/strong>\u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u043a\u043e\u0434\u043e\u043c \u0432\u044b\u0445\u043e\u0434\u0430 (exit code) <strong>1<\/strong>.<\/p>\n<\/li>\n<li>\n<p><strong>Warn<\/strong> (\u0441 \u0430\u043d\u0433\u043b. \u00ab\u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0442\u044c\u00bb) \u2014 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u0438 <strong>ty <\/strong>\u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u043a\u043e\u0434\u043e\u043c \u0432\u044b\u0445\u043e\u0434\u0430 <strong>0<\/strong>. \u041d\u043e \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0446\u0438\u044f <strong>&#8212;error-on-warning<\/strong>,<strong> <\/strong>\u043a\u043e\u0434 \u0432\u044b\u0445\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d <strong>1<\/strong>.<\/p>\n<\/li>\n<li>\n<p><strong>Ignore<\/strong> (\u0441 \u0430\u043d\u0433\u043b. \u00ab\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb) \u2014 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b:<\/p>\n<p>1. \u0412 \u0444\u0430\u0439\u043b\u0435: <\/p>\n<pre><code class=\"rust\">[tool.ty.rules] unused-ignore-comment = \"warn\" redundant-cast = \"ignore\" possibly-unbound-attribute = \"error\" possibly-unbound-import = \"error\"<\/code><\/pre>\n<p>2. \u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435:<\/p>\n<pre><code class=\"rust\">ty check \\  --warn unused-ignore-comment \\  --ignore redundant-cast \\  --error possibly-unbound-attribute \\  --error possibly-unbound-import<\/code><\/pre>\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f \u043d\u0430\u0441\u0447\u0438\u0442\u0430\u043b <a href=\"https:\/\/docs.astral.sh\/ty\/reference\/rules\/#invalid-declaration\" rel=\"noopener noreferrer nofollow\">66 \u043f\u0440\u0430\u0432\u0438\u043b<\/a>. \u0412\u043e\u0442 \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/824\/85b\/60a\/82485b60a4fefd83b6badf79955f394d.png\" width=\"1958\" height=\"860\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/824\/85b\/60a\/82485b60a4fefd83b6badf79955f394d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/824\/85b\/60a\/82485b60a4fefd83b6badf79955f394d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u041f\u043e\u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <\/h3>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e (\u0443\u0440\u043e\u0432\u0435\u043d\u044c <strong>ignore<\/strong>), \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u043e\u0432 \u043a\u043e\u0434\u0430.<\/p>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u2014 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 <strong># ty: ignore[&lt;rule&gt;]<\/strong>:<\/p>\n<pre><code class=\"python\">a = 42 + \"hello\"  # ty: ignore[unsupported-operator]<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a\u0430\u0445, \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0435:<\/p>\n<pre><code class=\"python\"># \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e def sum_three(a: int, b: int, c: int) -&gt; int:      ...   # \u0422\u0430\u043a \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0442\u0440\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0430, \u0442\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u043e. # \u041f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e. sum_three(    5,    6 )   ### \u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439  sum_three(  # ty: ignore[missing-argument]    5,    6 )   ### \u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439  sum_three(    5,    6 )  # ty: ignore[missing-argument]<\/code><\/pre>\n<p>\u041d\u0430\u0440\u0443\u0448\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0430\u0432\u0438\u043b? \u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0438\u0445 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445:<\/p>\n<pre><code class=\"python\">sum_three(\"hello\", 3)  # ty: ignore[missing-argument, invalid-argument-type]<\/code><\/pre>\n<p>\u0418 \u0435\u0449\u0435 \u043a\u043e\u0435-\u0447\u0442\u043e \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u2014 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440 <strong>@no_type_check<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"python\">from typing import no_type_check  @no_type_check def main():    sum_three(5, 6)<\/code><\/pre>\n<h3>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430<\/h3>\n<p><strong>ty <\/strong>\u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430. \u0421\u0435\u0439\u0447\u0430\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 Astral<strong> <\/strong>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=astral-sh.ty\" rel=\"noopener noreferrer nofollow\">\u043f\u043b\u0430\u0433\u0438\u043d<\/a> \u0434\u043b\u044f VS Code, \u0443 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/astral-sh\/ty-vscode\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u043d\u0430 GitHub.<\/p>\n<p>\u0415\u0449\u0435 <strong>ty <\/strong>\u043c\u043e\u0436\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 Neovim\u00a0\u2014 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 0.10 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/neovim\/nvim-lspconfig\" rel=\"noopener noreferrer nofollow\"><strong>nvim-lspconfig<\/strong><\/a><strong> <\/strong>\u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c:<\/p>\n<pre><code class=\"python\">require('lspconfig').ty.setup({  init_options = {    settings = {      -- \u0417\u0434\u0435\u0441\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 ty    }  } })<\/code><\/pre>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043a\u043e\u0434\u0430, \u043a \u043d\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c <strong>ty<\/strong>, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<h3>\u0412\u0435\u0440\u0441\u0438\u044f Python<\/h3>\n<p>\u0414\u043b\u044f <strong>ty<\/strong> \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Python \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u041e\u0442 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435. \u0421\u0430\u043c\u044b\u0439 \u044f\u0440\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \u044d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <strong>match <\/strong>\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <strong>stdlib_module_names<\/strong> \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044f <strong>sys<\/strong>:<\/p>\n<pre><code class=\"python\">import sys  # \u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f Python 3.9 \u0438\u043b\u0438 \u043d\u0438\u0436\u0435, \u0442\u043e \u0432\u044b\u0432\u0435\u0434\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430 `invalid-syntax` match \"echo Hello,Habr!\".split():    case [\"echo\", message]:        print(message)    case _:        print(\"you used unknown command\")   # \u0422\u043e \u0436\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043f\u0440\u043e \u0432\u0435\u0440\u0441\u0438\u044e. \u041e\u0448\u0438\u0431\u043a\u0430 `unresolved-attribute` print(sys.stdlib_module_names)  # \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044e if sys.version_info &gt;= (3, 10):    # \u041e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0438\u0438    print(sys.stdlib_module_names)<\/code><\/pre>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 (check)<\/h3>\n<p>\u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"rust\">ty check<\/code><\/pre>\n<p>\u041e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u0430\u043a \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439, \u0442\u0430\u043a \u0438 \u0432 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445. \u041d\u043e \u0435\u0441\u043b\u0438 ty \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0444\u0430\u0439\u043b <strong>pyproject.toml<\/strong>.<\/p>\n<p>\u0415\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"rust\">ty check something.py<\/code><\/pre>\n<p><strong>ty <\/strong>\u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 \u043f\u0443\u0442\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <strong>VIRTUAL_ENV <\/strong>\u0438\u043b\u0438<strong> CONDA_PREFIX<\/strong>;<\/p>\n<\/li>\n<li>\n<p>\u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <strong>.venv<\/strong> \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 <strong>ty <\/strong>\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u043f\u0430\u043a\u0435\u0442\u0430\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043e\u043f\u0446\u0438\u0438 <a href=\"https:\/\/docs.astral.sh\/ty\/reference\/cli\/#ty-check--python\" rel=\"noopener noreferrer nofollow\">&#8212;python<\/a>:<\/p>\n<pre><code class=\"rust\">ty check --python .venv\/bin\/python3 something.py<\/code><\/pre>\n<p><strong>ty<\/strong> \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u044b, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432 <strong>.ignore<\/strong> \u0438\u043b\u0438 <strong>.gitignore<\/strong>. \u041d\u043e \u044d\u0442\u0443 \u043e\u043f\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0443\u043a\u0430\u0437\u0430\u0432 <strong>&#8212;no-respect-gitignore<\/strong>:<\/p>\n<pre><code class=\"rust\">ty check --no-respect-gitignore<\/code><\/pre>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 FastAPI. \u0415\u0441\u0442\u044c \u0444\u0430\u0439\u043b <a href=\"http:\/\/main.py\" rel=\"noopener noreferrer nofollow\"><strong>main.py<\/strong><\/a>:<\/p>\n<pre><code class=\"rust\">from fastapi import FastAPI  from app.models import User  app = FastAPI()  def old_enough(age: int = None) -&gt; bool:    return True if age &gt;= 18 else False  @app.get(\"\/\") async def root():    return {\"hello!\": \"hello\"}  @app.post(\"\/user\/\") def user(data: User) -&gt; User:    data.is_adult = old_enough(data.age)    return data<\/code><\/pre>\n<p>\u0418 <a href=\"http:\/\/models.py\" rel=\"noopener noreferrer nofollow\">models.py<\/a>:<\/p>\n<pre><code class=\"rust\">from pydantic import BaseModel, ConfigDict  class User(BaseModel):    model_config = ConfigDict(extra=\u201dallow\u201d)    name: str    age: int<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443:<\/p>\n<pre><code class=\"python\">(venv) Ivans-PC:test iglebov$ ty check WARN ty is pre-release software and not ready for production use. Expect to encounter bugs, missing features, and fatal errors. error[invalid-parameter-default]: Default value of type `None` is not assignable to annotated parameter type `int`  --&gt; app\/main.py:7:16   | 5 | app = FastAPI() 6 | 7 | def old_enough(age: int = None) -&gt; bool:   |                ^^^^^^^^^^^^^^^ 8 |     return True if age &gt;= 18 else False   | info: rule `invalid-parameter-default` is enabled by default  error[unresolved-attribute]: Unresolved attribute `is_adult` on type `User`.   --&gt; app\/main.py:16:5    | 14 | @app.post(\"\/user\/\") 15 | def user(data: User) -&gt; User: 16 |     data.is_adult = old_enough(data.age)    |     ^^^^^^^^^^^^^ 17 |     return data    | info: rule `unresolved-attribute` is enabled by default<\/code><\/pre>\n<p>Found 2 diagnosticsty \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0446\u0435\u043b\u044b\u0445 \u0434\u0432\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p><strong>1. Default value of type <\/strong><code><strong>None<\/strong><\/code><strong> is not assignable to annotated parameter type <\/strong><code><strong>int<\/strong><\/code><\/p>\n<p>\u0422\u0443\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c <strong>None<\/strong> \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0441 \u0442\u0438\u043f\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 <strong>int<\/strong>.<\/p>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>old_enough<\/strong>:<\/p>\n<pre><code class=\"python\">def old_enough(age: int = 18) -&gt; bool:    return True if age &gt;= 18 else False<\/code><\/pre>\n<p><strong>2. Unresolved attribute <\/strong><code><strong>is_adult<\/strong><\/code><strong> on type <\/strong><code><strong>User<\/strong><\/code><\/p>\n<p>\u0414\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 User \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <strong>is_adult<\/strong>. \u0412 \u043d\u0435\u0439 \u043e\u043d \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d, \u043d\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>extra=\u201dallow\u201d<\/strong>, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u00ab\u043d\u0430 \u0445\u043e\u0434\u0443\u00bb.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043b\u043e\u0433\u0438\u043a\u0430 \u043a\u043e\u0434\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f, \u043d\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f: <\/p>\n<pre><code class=\"python\">@app.post(\"\/user\/\") def user(data: User) -&gt; User:    data.is_adult = old_enough(data.age)  # ty: ignore[unresolved-attribute]    return data<\/code><\/pre>\n<p>\u0421\u043d\u043e\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443:<\/p>\n<pre><code class=\"python\">(venv) Ivans-PC:test iglebov$ ty check WARN ty is pre-release software and not ready for production use. Expect to encounter bugs, missing features, and fatal errors. All checks passed!<\/code><\/pre>\n<p>\u0423\u0440\u0430, \u0432\u0441\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e! \u041d\u0430 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u043e\u0439 \u043d\u043e\u0442\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0436\u0443 \u043a \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/863\/17e\/330\/86317e33021473ab23c36aaafd4fa418.png\" width=\"1200\" height=\"613\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/863\/17e\/330\/86317e33021473ab23c36aaafd4fa418.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/863\/17e\/330\/86317e33021473ab23c36aaafd4fa418.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h2>\u0427\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435<\/h2>\n<p>\u041c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0442 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Astral \u2014 ty. \u041f\u043e\u043a\u0430 \u043e\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0431\u043e\u0440\u043e\u0442\u044b, \u043d\u043e \u0435\u0433\u043e \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0443\u0436\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044d\u0442\u043e: <\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u0438\u043a ty.toml \u0438\u043b\u0438 pyproject.toml \u0438 let\u2019s go;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c: \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e;<\/p>\n<\/li>\n<li>\n<p>\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u0438 \u0434\u0430\u0436\u0435 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f VS Code.<\/p>\n<\/li>\n<\/ul>\n<p>\u0410 \u043a\u0430\u043a \u0432\u0430\u0448\u0438 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u044f? \u041f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043b\u0438 ty \u0438\u043b\u0438 \u0436\u0434\u0435\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e? \u0421 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c \u043f\u043e\u0447\u0438\u0442\u0430\u044e. \u0418 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/935858\/\"> https:\/\/habr.com\/ru\/articles\/935858\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0418\u0432\u0430\u043d, \u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u044e \u043d\u0430 Python, \u0430 \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0438\u0448\u0443 \u0434\u043b\u044f \u0431\u043b\u043e\u0433\u0430 \u041c\u0422\u0421. \u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 <a href=\"https:\/\/habr.com\/ru\/companies\/ru_mts\/articles\/902244\/\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c<\/a>, \u043a\u0430\u043a \u044f \u043e\u0441\u0432\u0430\u0438\u0432\u0430\u043b Go \u0438 \u0441 \u0447\u0435\u043c \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0447\u0438\u0442\u0430\u043b \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0445\u043e\u0447\u0443 \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u043c\u0435\u0433\u0430\u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 Python \u2014 ty: \u043a\u0430\u043a \u043e\u043d \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u043d\u044e\u0430\u043d\u0441\u044b, \u0430 \u0435\u0449\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c!<\/p>\n<h2>\u0427\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043f\u043e\u043a\u0435\u043c\u043e\u043d?<\/h2>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0431\u0430\u0437\u044b:<strong> ty <\/strong>\u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 <strong>Astral<\/strong>. \u041a\u0430\u043a \u043f\u0438\u0448\u0443\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/astral-sh\/ty\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>, \u044d\u0442\u043e \u0441\u0443\u043f\u0435\u0440-\u043f\u0443\u043f\u0435\u0440 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 Python, \u0430 \u0435\u0449\u0435 \u2014 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Rust. \u041f\u0440\u043e Rust \u043d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u0435\u0434\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b Astral \u2014 <strong>uv<\/strong> \u0438 <strong>ruff<\/strong> \u2014 \u0442\u043e\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d \u043d\u0430 \u043d\u0435\u043c.<\/p>\n<p>\u0423 ty \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f <a href=\"https:\/\/docs.astral.sh\/ty\/\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a>. \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u043e\u043d\u043b\u0430\u0439\u043d <a href=\"https:\/\/play.ty.dev\" rel=\"noopener noreferrer nofollow\">\u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435<\/a>, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430 \u041f\u041a \u043d\u0435 \u043d\u0443\u0436\u043d\u0430. <\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0443:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\"><strong>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0411\u044b\u0441\u0442\u0440\u044b\u0439, \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Rust, <strong>\u043d\u0435 \u0433\u043e\u0442\u043e\u0432<\/strong> \u043a \u043f\u0440\u043e\u0434\u0443<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0432\u0435\u0437\u0434 \u043d\u0430 GitHub<\/p>\n<\/td>\n<td>\n<p align=\"left\">10,6 \u0442\u044b\u0441.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 Issues<\/p>\n<\/td>\n<td>\n<p align=\"left\">310<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0412\u0435\u0440\u0441\u0438\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">0.0.1-alpha.14<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0413\u043e\u0434 \u0440\u0435\u043b\u0438\u0437\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">2025<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Pull Requests (PRs) <\/p>\n<\/td>\n<td>\n<p align=\"left\">0 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0438 162 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0423\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">MIT<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d \u0432\u043e\u043e\u0431\u0449\u0435 \u043c\u0435\u043d\u044f \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b? \u0412 2024 \u0433\u043e\u0434\u0443<em> <\/em>Astral \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 uv, \u0438 \u043e\u043d \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u043b \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c. \u0421\u0435\u0439\u0447\u0430\u0441 \u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 61 \u0442\u044b\u0441\u044f\u0447\u0430 \u0437\u0432\u0435\u0437\u0434 <a href=\"https:\/\/github.com\/astral-sh\/uv\" rel=\"noopener noreferrer nofollow\"><strong>\u043d\u0430 GitHub<\/strong><\/a>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e <strong>uv<\/strong> \u0438 \u0435\u0433\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u0445 \u043d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043f\u0438\u0441\u0430\u043b \u041b\u0435\u0448\u0430 \u0416\u0438\u0440\u044f\u043a\u043e\u0432 \u0438\u0437 MWS, \u043e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c: <a href=\"https:\/\/habr.com\/ru\/companies\/ru_mts\/articles\/883600\/\" rel=\"noopener noreferrer nofollow\">\u0442\u044b\u043a<\/a>.\u00a0 \u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043d\u0435 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u043a <strong>ty<\/strong>? <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0438 \u0432 \u043f\u043b\u0430\u043d\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u0438 \u0432 \u043f\u043b\u0430\u043d\u0435 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0412 \u0446\u0435\u043b\u043e\u043c \u0435\u0441\u0442\u044c \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Astral \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f Python, \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u044d\u0442\u0438\u043c \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. <\/p>\n<p>\u041d\u043e \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a ty. \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043b \u0432\u044b\u0448\u0435, \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 Python \u0438 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439:<\/p>\n<p><strong>Type checker<\/strong> (\u0430\u043d\u0433\u043b. type \u2014 \u0442\u0438\u043f, checker \u2014 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440) \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u0434\u0435 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u043d \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Python \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430 <em>\u201cTypeError: unsupported operand type(s) for +: &#8216;int&#8217; and &#8216;str&#8217; \u201c).<\/em><\/p>\n<p><strong>Language server<\/strong> <em>(\u0441 \u0430\u043d\u0433\u043b. \u00ab\u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u00bb) \u2014 \u043f<\/em>\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u043c \u043a\u043e\u0434\u0430 \u0438 IDE \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c: <\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a;<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u2014 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043a\u043e\u0434\u0430 \u0438 IDE \u2014 \u044d\u0442\u043e <strong>LSP (Language Server Protocol)<\/strong>.<\/p>\n<h2>\u0413\u0430\u043b\u043e\u043f\u043e\u043c \u043f\u043e (\u0415\u0432\u0440\u043e\u043f\u0430\u043c) ty<\/h2>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/docs.astral.sh\/ty\/installation\/\" rel=\"noopener noreferrer nofollow\">\u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432<\/a>:<\/p>\n<pre><code class=\"rust\"># 1. pip pip install ty  # 2. pipx pipx install ty  # 3. uv uv tool install ty@latest<\/code><\/pre>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <strong>ty <\/strong>\u0442\u0430\u043a: <\/p>\n<pre><code class=\"rust\">ty &lt;\u041a\u041e\u041c\u0410\u041d\u0414\u0410&gt;<\/code><\/pre>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<ul>\n<li>\n<p><strong>check<\/strong> \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 (type errors);<\/p>\n<\/li>\n<li>\n<p><strong>server<\/strong> \u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440;<\/p>\n<\/li>\n<li>\n<p><strong>version<\/strong> \u2014 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u0435\u0440\u0441\u0438\u044e ty;<\/p>\n<\/li>\n<li>\n<p><strong>help<\/strong> \u2014 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u0438 \u043e\u043f\u0446\u0438\u044f\u0445 \u0438\u043b\u0438 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0434\u0432\u0435 \u043e\u043f\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p><strong>-h<\/strong>, <strong>&#8212;help<\/strong> \u2014 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e;<\/p>\n<\/li>\n<li>\n<p><strong>-V<\/strong>, <strong>&#8212;version<\/strong> \u2014 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u0435\u0440\u0441\u0438\u044e.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0414\u043b\u044f <strong>ty <\/strong>\u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0430\u0439\u043b\u0430 <strong>pyproject.toml<\/strong>:<\/p>\n<pre><code class=\"rust\">[tool.ty.rules] index-out-of-bounds = \"ignore\"<\/code><\/pre>\n<p>\u0418\u043b\u0438 <strong>ty.toml<\/strong>:<\/p>\n<pre><code class=\"rust\">[rules] index-out-of-bounds = \"ignore\"<\/code><\/pre>\n<p>\u041f\u0440\u0438\u0447\u0435\u043c \u0432\u0430\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0430 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430, \u0442\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0443 <strong>ty.toml<\/strong>. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 ty, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432 pyproject.toml, \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b. <\/p>\n<h3>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u0438\u0445 \u0443\u0440\u043e\u0432\u043d\u0438 <\/h3>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 <strong>ty <\/strong>\u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u2014 \u044d\u0442\u043e \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u043a\u043e\u0434\u0435. \u041a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0435 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0438\u043b\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. <\/p>\n<p>\u0423 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0435\u0441\u0442\u044c <a href=\"https:\/\/docs.astral.sh\/ty\/rules\/\" rel=\"noopener noreferrer nofollow\">\u0443\u0440\u043e\u0432\u043d\u0438<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c. \u0412\u0441\u0435\u0433\u043e \u0438\u0445 \u0442\u0440\u0438:<\/p>\n<ul>\n<li>\n<p><strong>Error<\/strong> (\u0441 \u0430\u043d\u0433\u043b. \u00ab\u043e\u0448\u0438\u0431\u043a\u0430\u00bb) \u2014 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043a\u0438, \u0438 <strong>ty <\/strong>\u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u043a\u043e\u0434\u043e\u043c \u0432\u044b\u0445\u043e\u0434\u0430 (exit code) <strong>1<\/strong>.<\/p>\n<\/li>\n<li>\n<p><strong>Warn<\/strong> (\u0441 \u0430\u043d\u0433\u043b. \u00ab\u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0442\u044c\u00bb) \u2014 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u0438 <strong>ty <\/strong>\u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u043a\u043e\u0434\u043e\u043c \u0432\u044b\u0445\u043e\u0434\u0430 <strong>0<\/strong>. \u041d\u043e \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0446\u0438\u044f <strong>&#8212;error-on-warning<\/strong>,<strong> <\/strong>\u043a\u043e\u0434 \u0432\u044b\u0445\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d <strong>1<\/strong>.<\/p>\n<\/li>\n<li>\n<p><strong>Ignore<\/strong> (\u0441 \u0430\u043d\u0433\u043b. \u00ab\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb) \u2014 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b:<\/p>\n<p>1. \u0412 \u0444\u0430\u0439\u043b\u0435: <\/p>\n<pre><code class=\"rust\">[tool.ty.rules] unused-ignore-comment = \"warn\" redundant-cast = \"ignore\" possibly-unbound-attribute = \"error\" possibly-unbound-import = \"error\"<\/code><\/pre>\n<p>2. \u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435:<\/p>\n<pre><code class=\"rust\">ty check \\  --warn unused-ignore-comment \\  --ignore redundant-cast \\  --error possibly-unbound-attribute \\  --error possibly-unbound-import<\/code><\/pre>\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f \u043d\u0430\u0441\u0447\u0438\u0442\u0430\u043b <a href=\"https:\/\/docs.astral.sh\/ty\/reference\/rules\/#invalid-declaration\" rel=\"noopener noreferrer nofollow\">66 \u043f\u0440\u0430\u0432\u0438\u043b<\/a>. \u0412\u043e\u0442 \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u041f\u043e\u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <\/h3>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e (\u0443\u0440\u043e\u0432\u0435\u043d\u044c <strong>ignore<\/strong>), \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u043e\u0432 \u043a\u043e\u0434\u0430.<\/p>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u2014 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 <strong># ty: ignore[&lt;rule&gt;]<\/strong>:<\/p>\n<pre><code class=\"python\">a = 42 + \"hello\"  # ty: ignore[unsupported-operator]<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a\u0430\u0445, \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0435:<\/p>\n<pre><code class=\"python\"># \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e def sum_three(a: int, b: int, c: int) -&gt; int:      ...   # \u0422\u0430\u043a \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0442\u0440\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0430, \u0442\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u043e. # \u041f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e. sum_three(    5,    6 )   ### \u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439  sum_three(  # ty: ignore[missing-argument]    5,    6 )   ### \u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439  sum_three(    5,    6 )  # ty: ignore[missing-argument]<\/code><\/pre>\n<p>\u041d\u0430\u0440\u0443\u0448\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0430\u0432\u0438\u043b? \u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0438\u0445 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445:<\/p>\n<pre><code class=\"python\">sum_three(\"hello\", 3)  # ty: ignore[missing-argument, invalid-argument-type]<\/code><\/pre>\n<p>\u0418 \u0435\u0449\u0435 \u043a\u043e\u0435-\u0447\u0442\u043e \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u2014 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440 <strong>@no_type_check<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"python\">from typing import no_type_check  @no_type_check def main():    sum_three(5, 6)<\/code><\/pre>\n<h3>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430<\/h3>\n<p><strong>ty <\/strong>\u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430. \u0421\u0435\u0439\u0447\u0430\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 Astral<strong> <\/strong>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=astral-sh.ty\" rel=\"noopener noreferrer nofollow\">\u043f\u043b\u0430\u0433\u0438\u043d<\/a> \u0434\u043b\u044f VS Code, \u0443 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/astral-sh\/ty-vscode\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u043d\u0430 GitHub.<\/p>\n<p>\u0415\u0449\u0435 <strong>ty <\/strong>\u043c\u043e\u0436\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 Neovim\u00a0\u2014 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 0.10 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/neovim\/nvim-lspconfig\" rel=\"noopener noreferrer nofollow\"><strong>nvim-lspconfig<\/strong><\/a><strong> <\/strong>\u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c:<\/p>\n<pre><code class=\"python\">require('lspconfig').ty.setup({  init_options = {    settings = {      -- \u0417\u0434\u0435\u0441\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 ty    }  } })<\/code><\/pre>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043a\u043e\u0434\u0430, \u043a \u043d\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c <strong>ty<\/strong>, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<h3>\u0412\u0435\u0440\u0441\u0438\u044f Python<\/h3>\n<p>\u0414\u043b\u044f <strong>ty<\/strong> \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Python \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u041e\u0442 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435. \u0421\u0430\u043c\u044b\u0439 \u044f\u0440\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \u044d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <strong>match <\/strong>\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <strong>stdlib_module_names<\/strong> \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044f <strong>sys<\/strong>:<\/p>\n<pre><code class=\"python\">import sys  # \u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f Python 3.9 \u0438\u043b\u0438 \u043d\u0438\u0436\u0435, \u0442\u043e \u0432\u044b\u0432\u0435\u0434\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430 `invalid-syntax` match \"echo Hello,Habr!\".split():    case [\"echo\", message]:        print(message)    case _:        print(\"you used unknown command\")   # \u0422\u043e \u0436\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043f\u0440\u043e \u0432\u0435\u0440\u0441\u0438\u044e. \u041e\u0448\u0438\u0431\u043a\u0430 `unresolved-attribute` print(sys.stdlib_module_names)  # \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044e if sys.version_info &gt;= (3, 10):    # \u041e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0438\u0438    print(sys.stdlib_module_names)<\/code><\/pre>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 (check)<\/h3>\n<p>\u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"rust\">ty check<\/code><\/pre>\n<p>\u041e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u0430\u043a \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439, \u0442\u0430\u043a \u0438 \u0432 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445. \u041d\u043e \u0435\u0441\u043b\u0438 ty \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0444\u0430\u0439\u043b <strong>pyproject.toml<\/strong>.<\/p>\n<p>\u0415\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"rust\">ty check something.py<\/code><\/pre>\n<p><strong>ty <\/strong>\u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 \u043f\u0443\u0442\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <strong>VIRTUAL_ENV <\/strong>\u0438\u043b\u0438<strong> CONDA_PREFIX<\/strong>;<\/p>\n<\/li>\n<li>\n<p>\u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <strong>.venv<\/strong> \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 <strong>ty <\/strong>\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u043f\u0430\u043a\u0435\u0442\u0430\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043e\u043f\u0446\u0438\u0438 <a href=\"https:\/\/docs.astral.sh\/ty\/reference\/cli\/#ty-check--python\" rel=\"noopener noreferrer nofollow\">&#8212;python<\/a>:<\/p>\n<pre><code class=\"rust\">ty check --python .venv\/bin\/python3 something.py<\/code><\/pre>\n<p><strong>ty<\/strong> \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u044b, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432 <strong>.ignore<\/strong> \u0438\u043b\u0438 <strong>.gitignore<\/strong>. \u041d\u043e \u044d\u0442\u0443 \u043e\u043f\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0443\u043a\u0430\u0437\u0430\u0432 <strong>&#8212;no-respect-gitignore<\/strong>:<\/p>\n<pre><code class=\"rust\">ty check --no-respect-gitignore<\/code><\/pre>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 FastAPI. \u0415\u0441\u0442\u044c \u0444\u0430\u0439\u043b <a href=\"http:\/\/main.py\" rel=\"noopener noreferrer nofollow\"><strong>main.py<\/strong><\/a>:<\/p>\n<pre><code class=\"rust\">from fastapi import FastAPI  from app.models import User  app = FastAPI()  def old_enough(age: int = None) -&gt; bool:    return True if age &gt;= 18 else False  @app.get(\"\/\") async def root():    return {\"hello!\": \"hello\"}  @app.post(\"\/user\/\") def user(data: User) -&gt; User:    data.is_adult = old_enough(data.age)    return data<\/code><\/pre>\n<p>\u0418 <a href=\"http:\/\/models.py\" rel=\"noopener noreferrer nofollow\">models.py<\/a>:<\/p>\n<pre><code class=\"rust\">from pydantic import BaseModel, ConfigDict  class User(BaseModel):    model_config = ConfigDict(extra=\u201dallow\u201d)    name: str    age: int<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443:<\/p>\n<pre><code class=\"python\">(venv) Ivans-PC:test iglebov$ ty check WARN ty is pre-release software and not ready for production use. Expect to encounter bugs, missing features, and fatal errors. error[invalid-parameter-default]: Default value of type `None` is not assignable to annotated parameter type `int`  --&gt; app\/main.py:7:16   | 5 | app = FastAPI() 6 | 7 | def old_enough(age: int = None) -&gt; bool:   |                ^^^^^^^^^^^^^^^ 8 |     return True if age &gt;= 18 else False   | info: rule `invalid-parameter-default` is enabled by default  error[unresolved-attribute]: Unresolved attribute `is_adult` on type `User`.   --&gt; app\/main.py:16:5    | 14 | @app.post(\"\/user\/\") 15 | def user(data: User) -&gt; User: 16 |     data.is_adult = old_enough(data.age)    |     ^^^^^^^^^^^^^ 17 |     return data    | info: rule `unresolved-attribute` is enabled by default<\/code><\/pre>\n<p>Found 2 diagnosticsty \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0446\u0435\u043b\u044b\u0445 \u0434\u0432\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p><strong>1. Default value of type <\/strong><code><strong>None<\/strong><\/code><strong> is not assignable to annotated parameter type <\/strong><code><strong>int<\/strong><\/code><\/p>\n<p>\u0422\u0443\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c <strong>None<\/strong> \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0441 \u0442\u0438\u043f\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 <strong>int<\/strong>.<\/p>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>old_enough<\/strong>:<\/p>\n<pre><code class=\"python\">def old_enough(age: int = 18) -&gt; bool:    return True if age &gt;= 18 else False<\/code><\/pre>\n<p><strong>2. Unresolved attribute <\/strong><code><strong>is_adult<\/strong><\/code><strong> on type <\/strong><code><strong>User<\/strong><\/code><\/p>\n<p>\u0414\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 User \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <strong>is_adult<\/strong>. \u0412 \u043d\u0435\u0439 \u043e\u043d \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d, \u043d\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>extra=\u201dallow\u201d<\/strong>, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u00ab\u043d\u0430 \u0445\u043e\u0434\u0443\u00bb.<\/p>\n<p>\u0415<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-470210","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/470210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=470210"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/470210\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=470210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=470210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=470210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}