micropython-stubber 1.16.3__py3-none-any.whl → 1.17.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {micropython_stubber-1.16.3.dist-info → micropython_stubber-1.17.0.dist-info}/METADATA +1 -1
- {micropython_stubber-1.16.3.dist-info → micropython_stubber-1.17.0.dist-info}/RECORD +48 -49
- stubber/__init__.py +1 -1
- stubber/basicgit.py +11 -13
- stubber/board/createstubs.py +138 -97
- stubber/board/createstubs_db.py +211 -239
- stubber/board/createstubs_db_min.py +322 -844
- stubber/board/createstubs_db_mpy.mpy +0 -0
- stubber/board/createstubs_lvgl.py +91 -137
- stubber/board/createstubs_lvgl_min.py +87 -129
- stubber/board/createstubs_lvgl_mpy.mpy +0 -0
- stubber/board/createstubs_mem.py +164 -199
- stubber/board/createstubs_mem_min.py +297 -791
- stubber/board/createstubs_mem_mpy.mpy +0 -0
- stubber/board/createstubs_min.py +286 -1009
- stubber/board/createstubs_mpy.mpy +0 -0
- stubber/board/modulelist.txt +1 -2
- stubber/codemod/_partials/__init__.py +1 -1
- stubber/codemod/_partials/db_main.py +90 -72
- stubber/codemod/_partials/modules_reader.py +29 -17
- stubber/codemod/board.py +2 -4
- stubber/codemod/enrich.py +1 -1
- stubber/commands/build_cmd.py +6 -4
- stubber/commands/get_docstubs_cmd.py +6 -11
- stubber/commands/get_frozen_cmd.py +6 -11
- stubber/commands/switch_cmd.py +6 -4
- stubber/freeze/freeze_manifest_2.py +2 -1
- stubber/freeze/get_frozen.py +28 -13
- stubber/minify.py +51 -38
- stubber/publish/candidates.py +15 -23
- stubber/publish/defaults.py +2 -2
- stubber/publish/merge_docstubs.py +5 -7
- stubber/publish/missing_class_methods.py +2 -2
- stubber/publish/pathnames.py +2 -2
- stubber/publish/publish.py +2 -1
- stubber/publish/stubpackage.py +20 -41
- stubber/rst/lookup.py +9 -7
- stubber/rst/reader.py +2 -1
- stubber/stubber.py +5 -6
- stubber/update_fallback.py +3 -1
- stubber/utils/__init__.py +1 -1
- stubber/utils/config.py +7 -9
- stubber/utils/repos.py +6 -5
- stubber/utils/versions.py +48 -7
- stubber/variants.py +3 -3
- stubber/board/logging.py +0 -99
- {micropython_stubber-1.16.3.dist-info → micropython_stubber-1.17.0.dist-info}/LICENSE +0 -0
- {micropython_stubber-1.16.3.dist-info → micropython_stubber-1.17.0.dist-info}/WHEEL +0 -0
- {micropython_stubber-1.16.3.dist-info → micropython_stubber-1.17.0.dist-info}/entry_points.txt +0 -0
@@ -1,52 +1,51 @@
|
|
1
|
-
stubber/__init__.py,sha256=
|
2
|
-
stubber/basicgit.py,sha256=
|
1
|
+
stubber/__init__.py,sha256=4lEzgn3yporXm1wTBvBjkHifnOZVmko4yEiRWPe6LL0,51
|
2
|
+
stubber/basicgit.py,sha256=5y7eIxmZXfGHwgGrdHtFWTB-tYdgAc7A-0b299wHMYc,9543
|
3
3
|
stubber/board/board_info.csv,sha256=K2VSmfR013fN-oJWkQUmiQ19w09dVwJHDquPy6QmMhY,8627
|
4
4
|
stubber/board/boot.py,sha256=XjWlKErU5nI1HJSugXIP_3hlwgRQboE6sJrpcbSygnk,1120
|
5
|
-
stubber/board/createstubs.py,sha256=
|
6
|
-
stubber/board/createstubs_db.py,sha256=
|
7
|
-
stubber/board/createstubs_db_min.py,sha256=
|
8
|
-
stubber/board/createstubs_db_mpy.mpy,sha256=
|
9
|
-
stubber/board/createstubs_lvgl.py,sha256=
|
10
|
-
stubber/board/createstubs_lvgl_min.py,sha256=
|
11
|
-
stubber/board/createstubs_lvgl_mpy.mpy,sha256=
|
12
|
-
stubber/board/createstubs_mem.py,sha256=
|
13
|
-
stubber/board/createstubs_mem_min.py,sha256=
|
14
|
-
stubber/board/createstubs_mem_mpy.mpy,sha256=
|
15
|
-
stubber/board/createstubs_min.py,sha256=
|
16
|
-
stubber/board/createstubs_mpy.mpy,sha256=
|
5
|
+
stubber/board/createstubs.py,sha256=ouxzbsQ4ENflgrvjV9NAnTIzFZFhuQlL3nGITjgLA5k,32312
|
6
|
+
stubber/board/createstubs_db.py,sha256=ZoGRFzdZWwWwAq1fMKegGuhhphH9RS5RSrlBClfXd2A,30024
|
7
|
+
stubber/board/createstubs_db_min.py,sha256=Vp6M1V2BexGktuE5m24laEVH9SZtRqhu3hP8T_SLm7s,11323
|
8
|
+
stubber/board/createstubs_db_mpy.mpy,sha256=tcCeLwAeGY5GfladqcZGSKjIBB5owJIb7vIVvXKCAEo,9427
|
9
|
+
stubber/board/createstubs_lvgl.py,sha256=CTe7eq1ACRK_JJxavaqDD8znn29nSWJiHHTZ_ps6EhM,27217
|
10
|
+
stubber/board/createstubs_lvgl_min.py,sha256=jLkWYmeboI2A8feMC7pT7cYWttLejQTuX7WAEZCylhw,27207
|
11
|
+
stubber/board/createstubs_lvgl_mpy.mpy,sha256=ex-nlq2V5e8anQBJvRWEEc-FzU7nlwg5NSrZ8vOadIA,9267
|
12
|
+
stubber/board/createstubs_mem.py,sha256=TA9ZaiJnG9WN7avaQrMWhv2LhL1pFV_DhTaO5pSJ4Fs,28358
|
13
|
+
stubber/board/createstubs_mem_min.py,sha256=R4EmIZy_S2O20PlmF6AgiH_dOAHB2GaS4LCPTcmtJUc,10869
|
14
|
+
stubber/board/createstubs_mem_mpy.mpy,sha256=tgrIEjfLCdBC9k3nLnjaIAY8j1oSvSulAS2t1ljQQ04,9009
|
15
|
+
stubber/board/createstubs_min.py,sha256=YY2HEaqpdN4VDUSZfIBPcCNgGuY_UXV6BeU4gqhPPJ4,13408
|
16
|
+
stubber/board/createstubs_mpy.mpy,sha256=4SjMXX59-g42MpgazS0nNP_sqqKfuLjUeN23kagLiFc,12111
|
17
17
|
stubber/board/fw_info.py,sha256=p5Szrqmp-DW1ieASEHL5rM7VN3gsLia21MB34lCX86g,4335
|
18
18
|
stubber/board/info.py,sha256=b7SOPZHVsVhaayKCwVkFZlYu0BW-UFI7LuG1Eop9480,5629
|
19
|
-
stubber/board/logging.py,sha256=rdneoAwZg84uiWBJWYIp0gMcT2oU9Lu-1WIu1LqT_9w,2218
|
20
19
|
stubber/board/main.py,sha256=f6V3tdt6sPZVLuwemT-NLuK9GySfW2c2J6PJMOOWQQw,413
|
21
|
-
stubber/board/modulelist.txt,sha256=
|
20
|
+
stubber/board/modulelist.txt,sha256=UrhmJUkrDaT3-URvVlAoXqOGT7KxfN9BXCM2EcEvpn0,2770
|
22
21
|
stubber/board/pyrightconfig.json,sha256=6oHS4aDOfwKBAFeUPsCGJzEXpUgBZsPaF0M4P-N26D4,1376
|
23
22
|
stubber/codemod/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
|
-
stubber/codemod/_partials/__init__.py,sha256=
|
25
|
-
stubber/codemod/_partials/db_main.py,sha256=
|
23
|
+
stubber/codemod/_partials/__init__.py,sha256=4v1lkgSBzFw08gxwujh5sivpbJbYqg5lZeRzgyvN4TE,1561
|
24
|
+
stubber/codemod/_partials/db_main.py,sha256=APeyLDuAc-FNXRQ7ECFVqVPLfOLVyAoLuE83e2Sfg1E,4183
|
26
25
|
stubber/codemod/_partials/lvgl_main.py,sha256=eAZt-nRNg7fxLmqFpt5SDd_IDtcbAY9Xz7QzxwarQSg,1934
|
27
|
-
stubber/codemod/_partials/modules_reader.py,sha256=
|
26
|
+
stubber/codemod/_partials/modules_reader.py,sha256=dJj-H0ncUWVtilSyohQ-dyiUZOjQObds_-llwy_LkYU,2046
|
28
27
|
stubber/codemod/add_comment.py,sha256=CZMjtKO9aarZo1E60QXo80CLJAH05z_ylK6Vvjvb0ls,1965
|
29
28
|
stubber/codemod/add_method.py,sha256=SSGgblIRCxo_m6uhkI1-DnVcCJYo2bhnhuWkOObbROU,2611
|
30
|
-
stubber/codemod/board.py,sha256=
|
31
|
-
stubber/codemod/enrich.py,sha256=
|
29
|
+
stubber/codemod/board.py,sha256=RyXX1n8ikEQR8w5FQWBXXE-PD3uyM4woFFMw1rzIJ_8,11756
|
30
|
+
stubber/codemod/enrich.py,sha256=VFhGhrajiEKZMPi9LrxQVtp3r-JMM-PNPJysTg6Jaws,5453
|
32
31
|
stubber/codemod/merge_docstub.py,sha256=BHjUZXt8nElX_q1ZBW2Z4gbAa5l291gYK9XPeQe9pj8,12691
|
33
32
|
stubber/codemod/modify_list.py,sha256=xrpFBKug273D9E02owUheZD418BvsIHIZCFj4YDjTxU,2118
|
34
33
|
stubber/codemod/utils.py,sha256=itARwbMps9UlzMaf4F3wJLJXJvtD-HYq1T1xw96zmR8,2459
|
35
34
|
stubber/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
36
|
-
stubber/commands/build_cmd.py,sha256=
|
35
|
+
stubber/commands/build_cmd.py,sha256=a3wW-SLw0HKl3b_7knqoUjMRHbZ14S6oeIQyEnf5-js,2461
|
37
36
|
stubber/commands/cli.py,sha256=pHtViupghgqKMxbyk5_Zz-qHx6i-BGdnTqRO-kngH2E,1850
|
38
37
|
stubber/commands/clone_cmd.py,sha256=Yutrkmt0FYF5XY2XFIbA7iUkFkT6FypDSLby790PMn0,2646
|
39
38
|
stubber/commands/config_cmd.py,sha256=Rmus8FoWtq9_3r6PC2r1rxuY54tar8-MeLiR_kUPkc0,920
|
40
39
|
stubber/commands/enrich_folder_cmd.py,sha256=oDXBeBow9wb7J3dAWcqEp7-Xjhe7hcb76FqBiP8bpgQ,1858
|
41
40
|
stubber/commands/get_core_cmd.py,sha256=oxiDb_r1Ao9N2maeV0EBKosI4nRDNJkDk52xNunYICM,2226
|
42
|
-
stubber/commands/get_docstubs_cmd.py,sha256=
|
43
|
-
stubber/commands/get_frozen_cmd.py,sha256=
|
41
|
+
stubber/commands/get_docstubs_cmd.py,sha256=kgUa5FXbCjipfOSFHOJ7A3K4aFiNqP3hg3ntLbAyX8w,2792
|
42
|
+
stubber/commands/get_frozen_cmd.py,sha256=hwq0GPfQBZA69zbBB1Jc5IkaXpNvd8U9qmdskSDDd6g,3971
|
44
43
|
stubber/commands/get_lobo_cmd.py,sha256=ss-MEeaDAAqQhBsvnSPjhQVd9adeJpe-EVR-Xt9iWjU,1516
|
45
44
|
stubber/commands/merge_cmd.py,sha256=2gQYxqapVGD8WMBsqRES7xjIS8acu4hTyutr1OANpAo,1673
|
46
45
|
stubber/commands/minify_cmd.py,sha256=PFFTezbPaXZ9vugQJ-s3zzbIuVm-PpFqDAPriKVTKgw,2272
|
47
46
|
stubber/commands/publish_cmd.py,sha256=myvgP7Y-pb-nyrMVMelNmIVHbxeK4g1ZXmQtxASblkk,2910
|
48
47
|
stubber/commands/stub_cmd.py,sha256=St3UlrVdbkddXystDG2NmKLq_1RbE-gNxlE7ShwQwaw,1186
|
49
|
-
stubber/commands/switch_cmd.py,sha256=
|
48
|
+
stubber/commands/switch_cmd.py,sha256=DM73QU4Vo3ifr01rv-xSmlxp36T20josOt9-cyUWUDU,1796
|
50
49
|
stubber/commands/upd_fallback_cmd.py,sha256=5d6lIFa1mTo-2O-gDZKwHOZAo5bvX5mp4iaTIfBSaQc,1056
|
51
50
|
stubber/commands/upd_module_list_cmd.py,sha256=drtjqS2aMd0aM-JJdnyl4jcnbq135lfSVcgK_6eovBk,499
|
52
51
|
stubber/commands/variants_cmd.py,sha256=QDm-KtDFIa9_Jl21vjArrW7OrToR8VfwK22pRo0e6CE,1284
|
@@ -60,51 +59,51 @@ stubber/downloader.py,sha256=UbrvPg8xaX5xcdAaFUe2pdDBor5clyTl3yzh7r7FLdc,1206
|
|
60
59
|
stubber/freeze/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
61
60
|
stubber/freeze/common.py,sha256=fydpiBQvwwBM-Uib12NG1k51Pm5gUmPa19UFj6ZTD5E,2639
|
62
61
|
stubber/freeze/freeze_folder.py,sha256=9jLa6M1Uie6MOBnXezrrBYkM9sq4Ja6bz7RGsFpIZJw,2491
|
63
|
-
stubber/freeze/freeze_manifest_2.py,sha256=
|
64
|
-
stubber/freeze/get_frozen.py,sha256=
|
62
|
+
stubber/freeze/freeze_manifest_2.py,sha256=2mJVxco9WjSWGkvn5TDFo84Tm4CZ9wNXcjGSm_7EDYc,4047
|
63
|
+
stubber/freeze/get_frozen.py,sha256=u8g47WSQ14ePDEwKJ4rjj0KnweyQSYgpWZQM9X0ijyw,5374
|
65
64
|
stubber/get_cpython.py,sha256=RYL3HHbNjaapT0JQZaLVd8wLSfm6RB6XpVELOae1z98,3782
|
66
65
|
stubber/get_lobo.py,sha256=jyysWbeEwNuZZtkTudJP1QbyVvh-TwFom5cE7iCi9lE,1776
|
67
|
-
stubber/minify.py,sha256=
|
66
|
+
stubber/minify.py,sha256=hGZFWF5THZG450ZK7MIVyHWKmy0ZQskzm9vqJmFj-70,14676
|
68
67
|
stubber/publish/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
69
68
|
stubber/publish/bump.py,sha256=qSb1DpaIxgyoH3YcPU1XKyDKgqkomxSm0WWf1sAVh0Y,3262
|
70
|
-
stubber/publish/candidates.py,sha256=
|
69
|
+
stubber/publish/candidates.py,sha256=wQWYmZJRWSCwgxiFFGEMnc2dZDqN3Fw030KJmNrmeY0,11419
|
71
70
|
stubber/publish/database.py,sha256=CLy5oiLasA-YzTTXi9d01qLAyk7NpugCDUOa5R9Ac2g,623
|
72
|
-
stubber/publish/defaults.py,sha256
|
71
|
+
stubber/publish/defaults.py,sha256=-Ey04lflKVnT0xO8r8AGliQSdtek9Dm_LDjpwvAnAVk,1636
|
73
72
|
stubber/publish/enums.py,sha256=YI_0q3Iz3v1YqDuHgbuj7x6FBS5y5w3G1UdgpCGunNs,954
|
74
73
|
stubber/publish/helpers.py,sha256=909umfKUHBMBoVnAanop1vKx8loCrWntlfiiG6z89lY,716
|
75
|
-
stubber/publish/merge_docstubs.py,sha256=
|
76
|
-
stubber/publish/missing_class_methods.py,sha256=
|
74
|
+
stubber/publish/merge_docstubs.py,sha256=OtbfVr3P1XBRHOufeAYwPTyTKNGaDeCT0vIukQEqois,5373
|
75
|
+
stubber/publish/missing_class_methods.py,sha256=qak-D7_ec2csPaZ_BlXiaoxTMSHzBRkWeUVxvBucf2Y,1803
|
77
76
|
stubber/publish/package.py,sha256=751NKo67Kq-2vUDWabWqw2eXTntay_BZ6d1vIIE1sX8,6333
|
78
|
-
stubber/publish/pathnames.py,sha256=
|
79
|
-
stubber/publish/publish.py,sha256=
|
77
|
+
stubber/publish/pathnames.py,sha256=VKZaj0JiexfFdlO8vpHLs1sYVrk0vs7uigkV-YXvdJ8,1819
|
78
|
+
stubber/publish/publish.py,sha256=4CTI3n2DDU8QnrSiaDT2SAqk73tlziPLE4cLt8saDrk,3698
|
80
79
|
stubber/publish/pypi.py,sha256=Mu1F7Xx4e0NPWK1_Erck6QGEfdY8w67EBeWFi6JiAzk,1240
|
81
|
-
stubber/publish/stubpackage.py,sha256=
|
80
|
+
stubber/publish/stubpackage.py,sha256=nYOmnsKV0eSEOLqmUFjD15TtxvBmdOUIjN-zJKxpSTM,44691
|
82
81
|
stubber/rst/__init__.py,sha256=5VcbDCotIICa2xnJDs_gw2sFXpjjGOZZbwCrNKXy1OE,293
|
83
82
|
stubber/rst/classsort.py,sha256=YCmF4QEYXqZ1Yu2FZb1iPQBrVkq-mrZaBaRcSUlC7ZE,2655
|
84
|
-
stubber/rst/lookup.py,sha256=
|
83
|
+
stubber/rst/lookup.py,sha256=Zu_qHPAoKmn2KgD5ERNmwIRT5u9xaYfuN8lOVMOwwfQ,20157
|
85
84
|
stubber/rst/output_dict.py,sha256=cpBXRtUD-uh0EgjWIBiRrMLBmIAEXjoJFSOAg-qJQiU,14755
|
86
|
-
stubber/rst/reader.py,sha256=
|
85
|
+
stubber/rst/reader.py,sha256=mfywE_6j-ZsVn37q1obTQQ02QBBSDZGo34JJc94JGG0,33383
|
87
86
|
stubber/rst/report_return.py,sha256=WZJSbgjsjxFeCeY-vLms56gv_x3TubaGXGQ8--d8RqI,2814
|
88
87
|
stubber/rst/rst_utils.py,sha256=q4MCmhCeI0fnx6KNVdgz1nE4_hAK4T-F7oAMBnmwZ4w,17817
|
89
|
-
stubber/stubber.py,sha256=
|
88
|
+
stubber/stubber.py,sha256=EzPqSJ1SKy5gMvnYEFg90mm5JzzkzBQUbI-v_9BtTRc,1963
|
90
89
|
stubber/stubs_from_docs.py,sha256=PXuHQWvhxMA11qrLgd-myitqf0jixIsord1u2hgmTI4,2885
|
91
90
|
stubber/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
92
91
|
stubber/tools/manifestfile.py,sha256=O8jYChw8wJyIeUb5NOoC5wbgH2zUMSCff3-KvQKGv8M,23715
|
93
92
|
stubber/tools/readme.md,sha256=kH7dA2Rs4BLCXa2ILoTDIj3sJHcGYtDPntyxVIOXvtI,199
|
94
|
-
stubber/update_fallback.py,sha256=
|
93
|
+
stubber/update_fallback.py,sha256=IXRN6Z-MktK7yUYkoQkKgK3LyXr5MyW70fLpak13vms,4719
|
95
94
|
stubber/update_module_list.py,sha256=QJ-c2K1Wf2SQdpMeGvlVabasKqsN9ZQV4ye5PbSpsWE,4640
|
96
|
-
stubber/utils/__init__.py,sha256=
|
97
|
-
stubber/utils/config.py,sha256=
|
95
|
+
stubber/utils/__init__.py,sha256=nV9FsOZsJ_hXsyUv4j0Qqp-PKycxyIktU9IoLs4kQmQ,225
|
96
|
+
stubber/utils/config.py,sha256=QLubx209ErjAc7tsz6xAIFx66YfWYd3HHIYQU9tcfLk,4881
|
98
97
|
stubber/utils/makeversionhdr.py,sha256=ZRpClirIzNK4saZHPaDuEpXhBRI_Ow_yZOxeNM3D_Ro,1908
|
99
98
|
stubber/utils/manifest.py,sha256=XBYCkxtYVAdUcch1784eHPAXlXfyfjco4WnRXxBHZYA,3273
|
100
99
|
stubber/utils/post.py,sha256=oSFZdoP6JwEeAOvsBo3kTk7l8ff_AVtL2Y4VIjzujlE,2837
|
101
|
-
stubber/utils/repos.py,sha256=
|
100
|
+
stubber/utils/repos.py,sha256=Lg_tYoMzAkxrw3xwgPKb6sX53uMN-ACoPP6oMkowob4,5819
|
102
101
|
stubber/utils/stubmaker.py,sha256=jHvRbbJA-Hp60R8NKct-TNM8ufFy2Rl2hesMW7ia7L8,4693
|
103
102
|
stubber/utils/typed_config_toml.py,sha256=ikifCIZGNhS_uqsfp6IwIpxdtZqbLtywprjWG_Q0y8o,2629
|
104
|
-
stubber/utils/versions.py,sha256=
|
105
|
-
stubber/variants.py,sha256
|
106
|
-
micropython_stubber-1.
|
107
|
-
micropython_stubber-1.
|
108
|
-
micropython_stubber-1.
|
109
|
-
micropython_stubber-1.
|
110
|
-
micropython_stubber-1.
|
103
|
+
stubber/utils/versions.py,sha256=VGO3CdtUDQ-GIH1oOgT4tg9yONqUzC6EgTIuQo1_Lgo,2924
|
104
|
+
stubber/variants.py,sha256=-o4TgotbKaCcYBdXkutPaBSR1JdxWmOAiuNT1UlahYc,3784
|
105
|
+
micropython_stubber-1.17.0.dist-info/entry_points.txt,sha256=NQi_M36fgq5k6giSuASas3LrpF6CVdkzfvJC0ja73_g,55
|
106
|
+
micropython_stubber-1.17.0.dist-info/LICENSE,sha256=2zsOXlYgl9W7_XGXcncAXIYfvSVlyNcVBycC6hhlKhA,1542
|
107
|
+
micropython_stubber-1.17.0.dist-info/METADATA,sha256=eE1OOVp3K886Ot5rnAsdwlpWulcnmfh29HiM18UgPG8,19038
|
108
|
+
micropython_stubber-1.17.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
109
|
+
micropython_stubber-1.17.0.dist-info/RECORD,,
|
stubber/__init__.py
CHANGED
stubber/basicgit.py
CHANGED
@@ -13,9 +13,12 @@ from github import Auth, Github
|
|
13
13
|
from loguru import logger as log
|
14
14
|
from packaging.version import parse
|
15
15
|
|
16
|
-
#
|
16
|
+
# from stubber.utils.versions import SET_PREVIEW
|
17
|
+
|
18
|
+
# Token with no permissions to avoid throttling
|
19
|
+
# https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28#getting-a-higher-rate-limit
|
17
20
|
PAT_NO_ACCESS = (
|
18
|
-
"github_pat" + "
|
21
|
+
"github_pat" + "_11AAHPVFQ0qAkDnSUaMKSp" + "_ZkDl5NRRwBsUN6EYg9ahp1Dvj4FDDONnXVgimxC2EtpY7Q7BUKBoQ0Jq72X"
|
19
22
|
)
|
20
23
|
PAT = os.environ.get("GITHUB_TOKEN") or PAT_NO_ACCESS
|
21
24
|
GH_CLIENT = Github(auth=Auth.Token(PAT))
|
@@ -67,7 +70,7 @@ def clone(remote_repo: str, path: Path, shallow: bool = False, tag: Optional[str
|
|
67
70
|
cmd = ["git", "clone"]
|
68
71
|
if shallow:
|
69
72
|
cmd += ["--depth", "1"]
|
70
|
-
if tag in
|
73
|
+
if tag in {"preview", "latest", "master"}:
|
71
74
|
tag = None
|
72
75
|
cmd += [remote_repo, "--branch", tag, str(path)] if tag else [remote_repo, str(path)]
|
73
76
|
if result := _run_local_git(cmd, expect_stderr=True, capture_output=False):
|
@@ -98,21 +101,16 @@ def get_local_tag(repo: Optional[Union[str, Path]] = None, abbreviate: bool = Tr
|
|
98
101
|
return None
|
99
102
|
tag: str = result.stdout
|
100
103
|
tag = tag.replace("\r", "").replace("\n", "")
|
101
|
-
if abbreviate
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
expect_stderr=True,
|
106
|
-
):
|
107
|
-
lines = result.stdout.replace("\r", "").split("\n")
|
108
|
-
if lines[0].startswith("On branch") and lines[0].endswith("master"):
|
109
|
-
tag = "latest"
|
104
|
+
if not abbreviate or "-" not in tag:
|
105
|
+
return tag
|
106
|
+
if "-preview" in tag:
|
107
|
+
tag = tag.split("-preview")[0] + "-preview"
|
110
108
|
return tag
|
111
109
|
|
112
110
|
|
113
111
|
def get_local_tags(repo: Optional[Path] = None, minver: Optional[str] = None) -> List[str]:
|
114
112
|
"""
|
115
|
-
get list of
|
113
|
+
get list of all tags of a local repo
|
116
114
|
"""
|
117
115
|
if not repo:
|
118
116
|
repo = Path(".")
|