matplotlib-rs 0.0.8__cp315-cp315-win_amd64.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.
Files changed (352) hide show
  1. docs/releases/0.0.1.md +268 -0
  2. docs/releases/0.0.2.md +69 -0
  3. docs/releases/0.0.3.md +80 -0
  4. docs/releases/0.0.4.md +73 -0
  5. docs/releases/0.0.5.md +24 -0
  6. docs/releases/0.0.6.md +24 -0
  7. docs/releases/0.0.7.md +24 -0
  8. docs/releases/0.0.8.md +16 -0
  9. licenses/LICENSE_CONTOURPY +29 -0
  10. licenses/LICENSE_CYCLER +27 -0
  11. licenses/LICENSE_DATEUTIL +54 -0
  12. licenses/LICENSE_KIWISOLVER +71 -0
  13. licenses/LICENSE_LIBWEBP +56 -0
  14. licenses/LICENSE_MATPLOTLIB +1253 -0
  15. licenses/LICENSE_PYPARSING +20 -0
  16. licenses/LICENSE_QHULL +39 -0
  17. licenses/LICENSE_SIX +18 -0
  18. matplotlib_rs/__init__.py +1683 -0
  19. matplotlib_rs/__main__.py +27 -0
  20. matplotlib_rs/_afm.py +500 -0
  21. matplotlib_rs/_animation_data.py +263 -0
  22. matplotlib_rs/_api/__init__.py +495 -0
  23. matplotlib_rs/_api/deprecation.py +534 -0
  24. matplotlib_rs/_axis_py.py +2991 -0
  25. matplotlib_rs/_blocking_input.py +31 -0
  26. matplotlib_rs/_cm.py +1500 -0
  27. matplotlib_rs/_cm_bivar.py +1289 -0
  28. matplotlib_rs/_cm_listed.py +2848 -0
  29. matplotlib_rs/_cm_multivar.py +167 -0
  30. matplotlib_rs/_color_data.py +1142 -0
  31. matplotlib_rs/_colormap.py +132 -0
  32. matplotlib_rs/_constrained_layout.py +825 -0
  33. matplotlib_rs/_contour.py +108 -0
  34. matplotlib_rs/_doc_cache.py +12214 -0
  35. matplotlib_rs/_docstring.py +142 -0
  36. matplotlib_rs/_enums.py +178 -0
  37. matplotlib_rs/_figure_rs.py +294 -0
  38. matplotlib_rs/_fontconfig_pattern.py +129 -0
  39. matplotlib_rs/_foreign.py +220 -0
  40. matplotlib_rs/_hook.py +94 -0
  41. matplotlib_rs/_image.py +160 -0
  42. matplotlib_rs/_imageio.py +229 -0
  43. matplotlib_rs/_internal_utils.py +65 -0
  44. matplotlib_rs/_kiwi.py +484 -0
  45. matplotlib_rs/_layoutgrid.py +549 -0
  46. matplotlib_rs/_live.py +192 -0
  47. matplotlib_rs/_mathtext.py +3103 -0
  48. matplotlib_rs/_mathtext_data.py +1811 -0
  49. matplotlib_rs/_mplrs.cp315-win_amd64.pyd +0 -0
  50. matplotlib_rs/_path.py +25 -0
  51. matplotlib_rs/_png.py +162 -0
  52. matplotlib_rs/_pylab_helpers.py +137 -0
  53. matplotlib_rs/_qhull.py +66 -0
  54. matplotlib_rs/_rcpush.py +84 -0
  55. matplotlib_rs/_spines_rs.py +108 -0
  56. matplotlib_rs/_style_helpers.py +52 -0
  57. matplotlib_rs/_text_helpers.py +51 -0
  58. matplotlib_rs/_tight_bbox.py +85 -0
  59. matplotlib_rs/_tight_layout.py +302 -0
  60. matplotlib_rs/_tri.py +140 -0
  61. matplotlib_rs/_type1font.py +1228 -0
  62. matplotlib_rs/_vendor/__init__.py +8 -0
  63. matplotlib_rs/_vendor/cycler.py +574 -0
  64. matplotlib_rs/_vendor/dateutil/__init__.py +27 -0
  65. matplotlib_rs/_vendor/dateutil/_common.py +44 -0
  66. matplotlib_rs/_vendor/dateutil/_tzdata_impl.py +148 -0
  67. matplotlib_rs/_vendor/dateutil/_version.py +5 -0
  68. matplotlib_rs/_vendor/dateutil/easter.py +90 -0
  69. matplotlib_rs/_vendor/dateutil/parser/__init__.py +62 -0
  70. matplotlib_rs/_vendor/dateutil/parser/_parser.py +1614 -0
  71. matplotlib_rs/_vendor/dateutil/parser/isoparser.py +417 -0
  72. matplotlib_rs/_vendor/dateutil/relativedelta.py +597 -0
  73. matplotlib_rs/_vendor/dateutil/rrule.py +1765 -0
  74. matplotlib_rs/_vendor/dateutil/tz/__init__.py +61 -0
  75. matplotlib_rs/_vendor/dateutil/tz/_common.py +420 -0
  76. matplotlib_rs/_vendor/dateutil/tz/_factories.py +81 -0
  77. matplotlib_rs/_vendor/dateutil/tz/_tzfile.py +1429 -0
  78. matplotlib_rs/_vendor/dateutil/tz/_tzpath.py +105 -0
  79. matplotlib_rs/_vendor/dateutil/tz/tz.py +1473 -0
  80. matplotlib_rs/_vendor/dateutil/tz/win.py +371 -0
  81. matplotlib_rs/_vendor/dateutil/tzwin.py +3 -0
  82. matplotlib_rs/_vendor/dateutil/utils.py +72 -0
  83. matplotlib_rs/_vendor/dateutil/zoneinfo/__init__.py +234 -0
  84. matplotlib_rs/_vendor/pyparsing/__init__.py +414 -0
  85. matplotlib_rs/_vendor/pyparsing/actions.py +265 -0
  86. matplotlib_rs/_vendor/pyparsing/common.py +571 -0
  87. matplotlib_rs/_vendor/pyparsing/core.py +6973 -0
  88. matplotlib_rs/_vendor/pyparsing/exceptions.py +354 -0
  89. matplotlib_rs/_vendor/pyparsing/helpers.py +1770 -0
  90. matplotlib_rs/_vendor/pyparsing/results.py +929 -0
  91. matplotlib_rs/_vendor/pyparsing/testing.py +399 -0
  92. matplotlib_rs/_vendor/pyparsing/unicode.py +357 -0
  93. matplotlib_rs/_vendor/pyparsing/util.py +515 -0
  94. matplotlib_rs/_vendor/pyparsing/warnings.py +11 -0
  95. matplotlib_rs/_vendor/six.py +1004 -0
  96. matplotlib_rs/animation.py +1843 -0
  97. matplotlib_rs/artist.py +2302 -0
  98. matplotlib_rs/axes/__init__.py +19 -0
  99. matplotlib_rs/axes/_axes.py +9402 -0
  100. matplotlib_rs/axes/_bar.py +185 -0
  101. matplotlib_rs/axes/_base.py +5236 -0
  102. matplotlib_rs/axes/_base_rs.py +727 -0
  103. matplotlib_rs/axes/_boxplot.py +391 -0
  104. matplotlib_rs/axes/_hist.py +99 -0
  105. matplotlib_rs/axes/_secondary_axes.py +357 -0
  106. matplotlib_rs/axis.py +1963 -0
  107. matplotlib_rs/backend_bases.py +3760 -0
  108. matplotlib_rs/backend_managers.py +388 -0
  109. matplotlib_rs/backend_tools.py +1002 -0
  110. matplotlib_rs/backends/__init__.py +6 -0
  111. matplotlib_rs/backends/_backend_pdf_ps.py +451 -0
  112. matplotlib_rs/backends/backend_agg.py +552 -0
  113. matplotlib_rs/backends/backend_mixed.py +123 -0
  114. matplotlib_rs/backends/backend_pdf.py +2711 -0
  115. matplotlib_rs/backends/backend_pgf.py +1031 -0
  116. matplotlib_rs/backends/backend_ps.py +1491 -0
  117. matplotlib_rs/backends/backend_svg.py +1395 -0
  118. matplotlib_rs/backends/backend_template.py +214 -0
  119. matplotlib_rs/backends/registry.py +423 -0
  120. matplotlib_rs/bezier.py +691 -0
  121. matplotlib_rs/category.py +236 -0
  122. matplotlib_rs/cbook.py +2762 -0
  123. matplotlib_rs/cm.py +251 -0
  124. matplotlib_rs/collections.py +2711 -0
  125. matplotlib_rs/colorbar.py +1586 -0
  126. matplotlib_rs/colorizer.py +909 -0
  127. matplotlib_rs/colors.py +4278 -0
  128. matplotlib_rs/container.py +256 -0
  129. matplotlib_rs/contour.py +1756 -0
  130. matplotlib_rs/dates.py +1847 -0
  131. matplotlib_rs/dviread.py +1386 -0
  132. matplotlib_rs/figure.py +3815 -0
  133. matplotlib_rs/font_manager.py +1855 -0
  134. matplotlib_rs/ft2font.py +515 -0
  135. matplotlib_rs/gridspec.py +808 -0
  136. matplotlib_rs/hatch.py +244 -0
  137. matplotlib_rs/image.py +1863 -0
  138. matplotlib_rs/inset.py +291 -0
  139. matplotlib_rs/layout_engine.py +310 -0
  140. matplotlib_rs/legend.py +1480 -0
  141. matplotlib_rs/legend_handler.py +812 -0
  142. matplotlib_rs/lines.py +1886 -0
  143. matplotlib_rs/markers.py +908 -0
  144. matplotlib_rs/mathtext.py +141 -0
  145. matplotlib_rs/mlab.py +959 -0
  146. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans-Bold.ttf +0 -0
  147. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans-BoldOblique.ttf +0 -0
  148. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans-Oblique.ttf +0 -0
  149. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans.ttf +0 -0
  150. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansDisplay.ttf +0 -0
  151. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono-Bold.ttf +0 -0
  152. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono-BoldOblique.ttf +0 -0
  153. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono-Oblique.ttf +0 -0
  154. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono.ttf +0 -0
  155. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif-Bold.ttf +0 -0
  156. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif-BoldItalic.ttf +0 -0
  157. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif-Italic.ttf +0 -0
  158. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif.ttf +0 -0
  159. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerifDisplay.ttf +0 -0
  160. matplotlib_rs/mpl-data/fonts/ttf/LICENSE_DEJAVU +99 -0
  161. matplotlib_rs/mpl-data/fonts/ttf/LICENSE_STIX +124 -0
  162. matplotlib_rs/mpl-data/fonts/ttf/LastResortHE-Regular.ttf +0 -0
  163. matplotlib_rs/mpl-data/fonts/ttf/STIXGeneral.ttf +0 -0
  164. matplotlib_rs/mpl-data/fonts/ttf/STIXGeneralBol.ttf +0 -0
  165. matplotlib_rs/mpl-data/fonts/ttf/STIXGeneralBolIta.ttf +0 -0
  166. matplotlib_rs/mpl-data/fonts/ttf/STIXGeneralItalic.ttf +0 -0
  167. matplotlib_rs/mpl-data/fonts/ttf/STIXNonUni.ttf +0 -0
  168. matplotlib_rs/mpl-data/fonts/ttf/STIXNonUniBol.ttf +0 -0
  169. matplotlib_rs/mpl-data/fonts/ttf/STIXNonUniBolIta.ttf +0 -0
  170. matplotlib_rs/mpl-data/fonts/ttf/STIXNonUniIta.ttf +0 -0
  171. matplotlib_rs/mpl-data/fonts/ttf/STIXSizFiveSymReg.ttf +0 -0
  172. matplotlib_rs/mpl-data/fonts/ttf/STIXSizFourSymBol.ttf +0 -0
  173. matplotlib_rs/mpl-data/fonts/ttf/STIXSizFourSymReg.ttf +0 -0
  174. matplotlib_rs/mpl-data/fonts/ttf/STIXSizOneSymBol.ttf +0 -0
  175. matplotlib_rs/mpl-data/fonts/ttf/STIXSizOneSymReg.ttf +0 -0
  176. matplotlib_rs/mpl-data/fonts/ttf/STIXSizThreeSymBol.ttf +0 -0
  177. matplotlib_rs/mpl-data/fonts/ttf/STIXSizThreeSymReg.ttf +0 -0
  178. matplotlib_rs/mpl-data/fonts/ttf/STIXSizTwoSymBol.ttf +0 -0
  179. matplotlib_rs/mpl-data/fonts/ttf/STIXSizTwoSymReg.ttf +0 -0
  180. matplotlib_rs/mpl-data/fonts/ttf/cmb10.ttf +0 -0
  181. matplotlib_rs/mpl-data/fonts/ttf/cmex10.ttf +0 -0
  182. matplotlib_rs/mpl-data/fonts/ttf/cmmi10.ttf +0 -0
  183. matplotlib_rs/mpl-data/fonts/ttf/cmr10.ttf +0 -0
  184. matplotlib_rs/mpl-data/fonts/ttf/cmss10.ttf +0 -0
  185. matplotlib_rs/mpl-data/fonts/ttf/cmsy10.ttf +0 -0
  186. matplotlib_rs/mpl-data/fonts/ttf/cmti10.ttf +0 -0
  187. matplotlib_rs/mpl-data/fonts/ttf/cmtt10.ttf +0 -0
  188. matplotlib_rs/mpl-data/images/back-symbolic.svg +46 -0
  189. matplotlib_rs/mpl-data/images/back.pdf +0 -0
  190. matplotlib_rs/mpl-data/images/back.png +0 -0
  191. matplotlib_rs/mpl-data/images/back.svg +46 -0
  192. matplotlib_rs/mpl-data/images/back_large.png +0 -0
  193. matplotlib_rs/mpl-data/images/filesave-symbolic.svg +68 -0
  194. matplotlib_rs/mpl-data/images/filesave.pdf +72 -0
  195. matplotlib_rs/mpl-data/images/filesave.png +0 -0
  196. matplotlib_rs/mpl-data/images/filesave.svg +68 -0
  197. matplotlib_rs/mpl-data/images/filesave_large.png +0 -0
  198. matplotlib_rs/mpl-data/images/forward-symbolic.svg +46 -0
  199. matplotlib_rs/mpl-data/images/forward.pdf +0 -0
  200. matplotlib_rs/mpl-data/images/forward.png +0 -0
  201. matplotlib_rs/mpl-data/images/forward.svg +46 -0
  202. matplotlib_rs/mpl-data/images/forward_large.png +0 -0
  203. matplotlib_rs/mpl-data/images/hand.pdf +0 -0
  204. matplotlib_rs/mpl-data/images/hand.png +0 -0
  205. matplotlib_rs/mpl-data/images/hand.svg +130 -0
  206. matplotlib_rs/mpl-data/images/help-symbolic.svg +52 -0
  207. matplotlib_rs/mpl-data/images/help.pdf +71 -0
  208. matplotlib_rs/mpl-data/images/help.png +0 -0
  209. matplotlib_rs/mpl-data/images/help.svg +52 -0
  210. matplotlib_rs/mpl-data/images/help_large.png +0 -0
  211. matplotlib_rs/mpl-data/images/home-symbolic.svg +59 -0
  212. matplotlib_rs/mpl-data/images/home.pdf +0 -0
  213. matplotlib_rs/mpl-data/images/home.png +0 -0
  214. matplotlib_rs/mpl-data/images/home.svg +59 -0
  215. matplotlib_rs/mpl-data/images/home_large.png +0 -0
  216. matplotlib_rs/mpl-data/images/matplotlib.pdf +0 -0
  217. matplotlib_rs/mpl-data/images/matplotlib.png +0 -0
  218. matplotlib_rs/mpl-data/images/matplotlib.svg +3171 -0
  219. matplotlib_rs/mpl-data/images/matplotlib_large.png +0 -0
  220. matplotlib_rs/mpl-data/images/move-symbolic.svg +73 -0
  221. matplotlib_rs/mpl-data/images/move.pdf +0 -0
  222. matplotlib_rs/mpl-data/images/move.png +0 -0
  223. matplotlib_rs/mpl-data/images/move.svg +73 -0
  224. matplotlib_rs/mpl-data/images/move_large.png +0 -0
  225. matplotlib_rs/mpl-data/images/qt4_editor_options.pdf +0 -0
  226. matplotlib_rs/mpl-data/images/qt4_editor_options.png +0 -0
  227. matplotlib_rs/mpl-data/images/qt4_editor_options.svg +48 -0
  228. matplotlib_rs/mpl-data/images/qt4_editor_options_large.png +0 -0
  229. matplotlib_rs/mpl-data/images/subplots-symbolic.svg +81 -0
  230. matplotlib_rs/mpl-data/images/subplots.pdf +0 -0
  231. matplotlib_rs/mpl-data/images/subplots.png +0 -0
  232. matplotlib_rs/mpl-data/images/subplots.svg +81 -0
  233. matplotlib_rs/mpl-data/images/subplots_large.png +0 -0
  234. matplotlib_rs/mpl-data/images/zoom_to_rect-symbolic.svg +40 -0
  235. matplotlib_rs/mpl-data/images/zoom_to_rect.pdf +69 -0
  236. matplotlib_rs/mpl-data/images/zoom_to_rect.png +0 -0
  237. matplotlib_rs/mpl-data/images/zoom_to_rect.svg +40 -0
  238. matplotlib_rs/mpl-data/images/zoom_to_rect_large.png +0 -0
  239. matplotlib_rs/mpl-data/kpsewhich.lua +4 -0
  240. matplotlib_rs/mpl-data/matplotlibrc +849 -0
  241. matplotlib_rs/mpl-data/plot_directive/plot_directive.css +16 -0
  242. matplotlib_rs/mpl-data/sample_data/Minduka_Present_Blue_Pack.png +0 -0
  243. matplotlib_rs/mpl-data/sample_data/README.txt +2 -0
  244. matplotlib_rs/mpl-data/sample_data/Stocks.csv +526 -0
  245. matplotlib_rs/mpl-data/sample_data/axes_grid/bivariate_normal.npy +0 -0
  246. matplotlib_rs/mpl-data/sample_data/data_x_x2_x3.csv +11 -0
  247. matplotlib_rs/mpl-data/sample_data/eeg.dat +0 -0
  248. matplotlib_rs/mpl-data/sample_data/embedding_in_wx3.xrc +65 -0
  249. matplotlib_rs/mpl-data/sample_data/goog.npz +0 -0
  250. matplotlib_rs/mpl-data/sample_data/grace_hopper.jpg +0 -0
  251. matplotlib_rs/mpl-data/sample_data/jacksboro_fault_dem.npz +0 -0
  252. matplotlib_rs/mpl-data/sample_data/logo2.png +0 -0
  253. matplotlib_rs/mpl-data/sample_data/membrane.dat +0 -0
  254. matplotlib_rs/mpl-data/sample_data/msft.csv +66 -0
  255. matplotlib_rs/mpl-data/sample_data/s1045.ima.gz +0 -0
  256. matplotlib_rs/mpl-data/sample_data/topobathy.npz +0 -0
  257. matplotlib_rs/mpl-data/stylelib/Solarize_Light2.mplstyle +53 -0
  258. matplotlib_rs/mpl-data/stylelib/_classic_test_patch.mplstyle +8 -0
  259. matplotlib_rs/mpl-data/stylelib/_mpl-gallery-nogrid.mplstyle +19 -0
  260. matplotlib_rs/mpl-data/stylelib/_mpl-gallery.mplstyle +19 -0
  261. matplotlib_rs/mpl-data/stylelib/bmh.mplstyle +27 -0
  262. matplotlib_rs/mpl-data/stylelib/classic.mplstyle +491 -0
  263. matplotlib_rs/mpl-data/stylelib/dark_background.mplstyle +26 -0
  264. matplotlib_rs/mpl-data/stylelib/fast.mplstyle +11 -0
  265. matplotlib_rs/mpl-data/stylelib/fivethirtyeight.mplstyle +37 -0
  266. matplotlib_rs/mpl-data/stylelib/ggplot.mplstyle +39 -0
  267. matplotlib_rs/mpl-data/stylelib/grayscale.mplstyle +29 -0
  268. matplotlib_rs/mpl-data/stylelib/petroff10.mplstyle +5 -0
  269. matplotlib_rs/mpl-data/stylelib/petroff6.mplstyle +5 -0
  270. matplotlib_rs/mpl-data/stylelib/petroff8.mplstyle +5 -0
  271. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-bright.mplstyle +3 -0
  272. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-colorblind.mplstyle +3 -0
  273. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-dark-palette.mplstyle +3 -0
  274. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-dark.mplstyle +30 -0
  275. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-darkgrid.mplstyle +30 -0
  276. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-deep.mplstyle +3 -0
  277. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-muted.mplstyle +3 -0
  278. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-notebook.mplstyle +21 -0
  279. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-paper.mplstyle +21 -0
  280. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-pastel.mplstyle +3 -0
  281. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-poster.mplstyle +21 -0
  282. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-talk.mplstyle +21 -0
  283. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-ticks.mplstyle +30 -0
  284. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-white.mplstyle +30 -0
  285. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-whitegrid.mplstyle +30 -0
  286. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8.mplstyle +57 -0
  287. matplotlib_rs/mpl-data/stylelib/tableau-colorblind10.mplstyle +3 -0
  288. matplotlib_rs/mpl_toolkits/__init__.py +3 -0
  289. matplotlib_rs/mpl_toolkits/axes_grid1/__init__.py +11 -0
  290. matplotlib_rs/mpl_toolkits/axes_grid1/anchored_artists.py +415 -0
  291. matplotlib_rs/mpl_toolkits/axes_grid1/axes_divider.py +619 -0
  292. matplotlib_rs/mpl_toolkits/axes_grid1/axes_grid.py +565 -0
  293. matplotlib_rs/mpl_toolkits/axes_grid1/axes_rgb.py +158 -0
  294. matplotlib_rs/mpl_toolkits/axes_grid1/axes_size.py +272 -0
  295. matplotlib_rs/mpl_toolkits/axes_grid1/inset_locator.py +525 -0
  296. matplotlib_rs/mpl_toolkits/axes_grid1/mpl_axes.py +129 -0
  297. matplotlib_rs/mpl_toolkits/axes_grid1/parasite_axes.py +261 -0
  298. matplotlib_rs/mpl_toolkits/axisartist/__init__.py +15 -0
  299. matplotlib_rs/mpl_toolkits/axisartist/angle_helper.py +396 -0
  300. matplotlib_rs/mpl_toolkits/axisartist/axes_divider.py +3 -0
  301. matplotlib_rs/mpl_toolkits/axisartist/axis_artist.py +1148 -0
  302. matplotlib_rs/mpl_toolkits/axisartist/axisline_style.py +193 -0
  303. matplotlib_rs/mpl_toolkits/axisartist/axislines.py +475 -0
  304. matplotlib_rs/mpl_toolkits/axisartist/floating_axes.py +265 -0
  305. matplotlib_rs/mpl_toolkits/axisartist/grid_finder.py +329 -0
  306. matplotlib_rs/mpl_toolkits/axisartist/grid_helper_curvelinear.py +353 -0
  307. matplotlib_rs/mpl_toolkits/axisartist/parasite_axes.py +8 -0
  308. matplotlib_rs/mpl_toolkits/mplot3d/__init__.py +4 -0
  309. matplotlib_rs/mpl_toolkits/mplot3d/art3d.py +1758 -0
  310. matplotlib_rs/mpl_toolkits/mplot3d/axes3d.py +4462 -0
  311. matplotlib_rs/mpl_toolkits/mplot3d/axis3d.py +807 -0
  312. matplotlib_rs/mpl_toolkits/mplot3d/proj3d.py +270 -0
  313. matplotlib_rs/offsetbox.py +1726 -0
  314. matplotlib_rs/patches.py +5049 -0
  315. matplotlib_rs/path.py +1147 -0
  316. matplotlib_rs/patheffects.py +512 -0
  317. matplotlib_rs/projections/__init__.py +126 -0
  318. matplotlib_rs/projections/geo.py +512 -0
  319. matplotlib_rs/projections/polar.py +1518 -0
  320. matplotlib_rs/pylab.py +68 -0
  321. matplotlib_rs/pyplot.py +4834 -0
  322. matplotlib_rs/quiver.py +1236 -0
  323. matplotlib_rs/rcsetup.py +3435 -0
  324. matplotlib_rs/sankey.py +815 -0
  325. matplotlib_rs/scale.py +1002 -0
  326. matplotlib_rs/spines.py +618 -0
  327. matplotlib_rs/stackplot.py +144 -0
  328. matplotlib_rs/streamplot.py +768 -0
  329. matplotlib_rs/style/__init__.py +269 -0
  330. matplotlib_rs/style/core.py +28 -0
  331. matplotlib_rs/table.py +860 -0
  332. matplotlib_rs/texmanager.py +375 -0
  333. matplotlib_rs/text.py +2412 -0
  334. matplotlib_rs/textpath.py +377 -0
  335. matplotlib_rs/ticker.py +3111 -0
  336. matplotlib_rs/transforms.py +3069 -0
  337. matplotlib_rs/tri/__init__.py +24 -0
  338. matplotlib_rs/tri/_triangulation.py +248 -0
  339. matplotlib_rs/tri/_tricontour.py +271 -0
  340. matplotlib_rs/tri/_trifinder.py +97 -0
  341. matplotlib_rs/tri/_triinterpolate.py +1575 -0
  342. matplotlib_rs/tri/_tripcolor.py +170 -0
  343. matplotlib_rs/tri/_triplot.py +87 -0
  344. matplotlib_rs/tri/_trirefine.py +308 -0
  345. matplotlib_rs/tri/_tritools.py +264 -0
  346. matplotlib_rs/typing.py +597 -0
  347. matplotlib_rs/units.py +196 -0
  348. matplotlib_rs/widgets.py +4455 -0
  349. matplotlib_rs-0.0.8.dist-info/METADATA +392 -0
  350. matplotlib_rs-0.0.8.dist-info/RECORD +352 -0
  351. matplotlib_rs-0.0.8.dist-info/WHEEL +4 -0
  352. matplotlib_rs-0.0.8.dist-info/sboms/matplotlib-rs.cyclonedx.json +4390 -0
@@ -0,0 +1,8 @@
1
+ """Pure-Python packages used by matplotlib, vendored so that matplotlib_rs needs
2
+ only NumPy at run time (regenerate with tools/vendor_deps.py).
3
+
4
+ - cycler 0.12.1
5
+ - pyparsing 3.3.3
6
+ - python-dateutil 3.0.0
7
+ - six 1.17.0
8
+ """
@@ -0,0 +1,574 @@
1
+ # Vendored by tools/vendor_deps.py from cycler 0.12.1 (see licenses/LICENSE_CYCLER).
2
+ """
3
+ Cycler
4
+ ======
5
+
6
+ Cycling through combinations of values, producing dictionaries.
7
+
8
+ You can add cyclers::
9
+
10
+ from cycler import cycler
11
+ cc = (cycler(color=list('rgb')) +
12
+ cycler(linestyle=['-', '--', '-.']))
13
+ for d in cc:
14
+ print(d)
15
+
16
+ Results in::
17
+
18
+ {'color': 'r', 'linestyle': '-'}
19
+ {'color': 'g', 'linestyle': '--'}
20
+ {'color': 'b', 'linestyle': '-.'}
21
+
22
+
23
+ You can multiply cyclers::
24
+
25
+ from cycler import cycler
26
+ cc = (cycler(color=list('rgb')) *
27
+ cycler(linestyle=['-', '--', '-.']))
28
+ for d in cc:
29
+ print(d)
30
+
31
+ Results in::
32
+
33
+ {'color': 'r', 'linestyle': '-'}
34
+ {'color': 'r', 'linestyle': '--'}
35
+ {'color': 'r', 'linestyle': '-.'}
36
+ {'color': 'g', 'linestyle': '-'}
37
+ {'color': 'g', 'linestyle': '--'}
38
+ {'color': 'g', 'linestyle': '-.'}
39
+ {'color': 'b', 'linestyle': '-'}
40
+ {'color': 'b', 'linestyle': '--'}
41
+ {'color': 'b', 'linestyle': '-.'}
42
+ """
43
+
44
+
45
+ from __future__ import annotations
46
+
47
+ from collections.abc import Hashable, Iterable, Generator
48
+ import copy
49
+ from functools import reduce
50
+ from itertools import product, cycle
51
+ from operator import mul, add
52
+ # Dict, List, Union required for runtime cast calls
53
+ from typing import TypeVar, Generic, Callable, Union, Dict, List, Any, overload, cast
54
+
55
+ __version__ = "0.12.1"
56
+
57
+ K = TypeVar("K", bound=Hashable)
58
+ L = TypeVar("L", bound=Hashable)
59
+ V = TypeVar("V")
60
+ U = TypeVar("U")
61
+
62
+
63
+ def _process_keys(
64
+ left: Cycler[K, V] | Iterable[dict[K, V]],
65
+ right: Cycler[K, V] | Iterable[dict[K, V]] | None,
66
+ ) -> set[K]:
67
+ """
68
+ Helper function to compose cycler keys.
69
+
70
+ Parameters
71
+ ----------
72
+ left, right : iterable of dictionaries or None
73
+ The cyclers to be composed.
74
+
75
+ Returns
76
+ -------
77
+ keys : set
78
+ The keys in the composition of the two cyclers.
79
+ """
80
+ l_peek: dict[K, V] = next(iter(left)) if left != [] else {}
81
+ r_peek: dict[K, V] = next(iter(right)) if right is not None else {}
82
+ l_key: set[K] = set(l_peek.keys())
83
+ r_key: set[K] = set(r_peek.keys())
84
+ if l_key & r_key:
85
+ raise ValueError("Can not compose overlapping cycles")
86
+ return l_key | r_key
87
+
88
+
89
+ def concat(left: Cycler[K, V], right: Cycler[K, U]) -> Cycler[K, V | U]:
90
+ r"""
91
+ Concatenate `Cycler`\s, as if chained using `itertools.chain`.
92
+
93
+ The keys must match exactly.
94
+
95
+ Examples
96
+ --------
97
+ >>> num = cycler('a', range(3))
98
+ >>> let = cycler('a', 'abc')
99
+ >>> num.concat(let)
100
+ cycler('a', [0, 1, 2, 'a', 'b', 'c'])
101
+
102
+ Returns
103
+ -------
104
+ `Cycler`
105
+ The concatenated cycler.
106
+ """
107
+ if left.keys != right.keys:
108
+ raise ValueError(
109
+ "Keys do not match:\n"
110
+ "\tIntersection: {both!r}\n"
111
+ "\tDisjoint: {just_one!r}".format(
112
+ both=left.keys & right.keys, just_one=left.keys ^ right.keys
113
+ )
114
+ )
115
+ _l = cast(Dict[K, List[Union[V, U]]], left.by_key())
116
+ _r = cast(Dict[K, List[Union[V, U]]], right.by_key())
117
+ return reduce(add, (_cycler(k, _l[k] + _r[k]) for k in left.keys))
118
+
119
+
120
+ class Cycler(Generic[K, V]):
121
+ """
122
+ Composable cycles.
123
+
124
+ This class has compositions methods:
125
+
126
+ ``+``
127
+ for 'inner' products (zip)
128
+
129
+ ``+=``
130
+ in-place ``+``
131
+
132
+ ``*``
133
+ for outer products (`itertools.product`) and integer multiplication
134
+
135
+ ``*=``
136
+ in-place ``*``
137
+
138
+ and supports basic slicing via ``[]``.
139
+
140
+ Parameters
141
+ ----------
142
+ left, right : Cycler or None
143
+ The 'left' and 'right' cyclers.
144
+ op : func or None
145
+ Function which composes the 'left' and 'right' cyclers.
146
+ """
147
+
148
+ def __call__(self):
149
+ return cycle(self)
150
+
151
+ def __init__(
152
+ self,
153
+ left: Cycler[K, V] | Iterable[dict[K, V]] | None,
154
+ right: Cycler[K, V] | None = None,
155
+ op: Any = None,
156
+ ):
157
+ """
158
+ Semi-private init.
159
+
160
+ Do not use this directly, use `cycler` function instead.
161
+ """
162
+ if isinstance(left, Cycler):
163
+ self._left: Cycler[K, V] | list[dict[K, V]] = Cycler(
164
+ left._left, left._right, left._op
165
+ )
166
+ elif left is not None:
167
+ # Need to copy the dictionary or else that will be a residual
168
+ # mutable that could lead to strange errors
169
+ self._left = [copy.copy(v) for v in left]
170
+ else:
171
+ self._left = []
172
+
173
+ if isinstance(right, Cycler):
174
+ self._right: Cycler[K, V] | None = Cycler(
175
+ right._left, right._right, right._op
176
+ )
177
+ else:
178
+ self._right = None
179
+
180
+ self._keys: set[K] = _process_keys(self._left, self._right)
181
+ self._op: Any = op
182
+
183
+ def __contains__(self, k):
184
+ return k in self._keys
185
+
186
+ @property
187
+ def keys(self) -> set[K]:
188
+ """The keys this Cycler knows about."""
189
+ return set(self._keys)
190
+
191
+ def change_key(self, old: K, new: K) -> None:
192
+ """
193
+ Change a key in this cycler to a new name.
194
+ Modification is performed in-place.
195
+
196
+ Does nothing if the old key is the same as the new key.
197
+ Raises a ValueError if the new key is already a key.
198
+ Raises a KeyError if the old key isn't a key.
199
+ """
200
+ if old == new:
201
+ return
202
+ if new in self._keys:
203
+ raise ValueError(
204
+ f"Can't replace {old} with {new}, {new} is already a key"
205
+ )
206
+ if old not in self._keys:
207
+ raise KeyError(
208
+ f"Can't replace {old} with {new}, {old} is not a key"
209
+ )
210
+
211
+ self._keys.remove(old)
212
+ self._keys.add(new)
213
+
214
+ if self._right is not None and old in self._right.keys:
215
+ self._right.change_key(old, new)
216
+
217
+ # self._left should always be non-None
218
+ # if self._keys is non-empty.
219
+ elif isinstance(self._left, Cycler):
220
+ self._left.change_key(old, new)
221
+ else:
222
+ # It should be completely safe at this point to
223
+ # assume that the old key can be found in each
224
+ # iteration.
225
+ self._left = [{new: entry[old]} for entry in self._left]
226
+
227
+ @classmethod
228
+ def _from_iter(cls, label: K, itr: Iterable[V]) -> Cycler[K, V]:
229
+ """
230
+ Class method to create 'base' Cycler objects
231
+ that do not have a 'right' or 'op' and for which
232
+ the 'left' object is not another Cycler.
233
+
234
+ Parameters
235
+ ----------
236
+ label : hashable
237
+ The property key.
238
+
239
+ itr : iterable
240
+ Finite length iterable of the property values.
241
+
242
+ Returns
243
+ -------
244
+ `Cycler`
245
+ New 'base' cycler.
246
+ """
247
+ ret: Cycler[K, V] = cls(None)
248
+ ret._left = list({label: v} for v in itr)
249
+ ret._keys = {label}
250
+ return ret
251
+
252
+ def __getitem__(self, key: slice) -> Cycler[K, V]:
253
+ # TODO : maybe add numpy style fancy slicing
254
+ if isinstance(key, slice):
255
+ trans = self.by_key()
256
+ return reduce(add, (_cycler(k, v[key]) for k, v in trans.items()))
257
+ else:
258
+ raise ValueError("Can only use slices with Cycler.__getitem__")
259
+
260
+ def __iter__(self) -> Generator[dict[K, V], None, None]:
261
+ if self._right is None:
262
+ for left in self._left:
263
+ yield dict(left)
264
+ else:
265
+ if self._op is None:
266
+ raise TypeError(
267
+ "Operation cannot be None when both left and right are defined"
268
+ )
269
+ for a, b in self._op(self._left, self._right):
270
+ out = {}
271
+ out.update(a)
272
+ out.update(b)
273
+ yield out
274
+
275
+ def __add__(self, other: Cycler[L, U]) -> Cycler[K | L, V | U]:
276
+ """
277
+ Pair-wise combine two equal length cyclers (zip).
278
+
279
+ Parameters
280
+ ----------
281
+ other : Cycler
282
+ """
283
+ if len(self) != len(other):
284
+ raise ValueError(
285
+ f"Can only add equal length cycles, not {len(self)} and {len(other)}"
286
+ )
287
+ return Cycler(
288
+ cast(Cycler[Union[K, L], Union[V, U]], self),
289
+ cast(Cycler[Union[K, L], Union[V, U]], other),
290
+ zip
291
+ )
292
+
293
+ @overload
294
+ def __mul__(self, other: Cycler[L, U]) -> Cycler[K | L, V | U]:
295
+ ...
296
+
297
+ @overload
298
+ def __mul__(self, other: int) -> Cycler[K, V]:
299
+ ...
300
+
301
+ def __mul__(self, other):
302
+ """
303
+ Outer product of two cyclers (`itertools.product`) or integer
304
+ multiplication.
305
+
306
+ Parameters
307
+ ----------
308
+ other : Cycler or int
309
+ """
310
+ if isinstance(other, Cycler):
311
+ return Cycler(
312
+ cast(Cycler[Union[K, L], Union[V, U]], self),
313
+ cast(Cycler[Union[K, L], Union[V, U]], other),
314
+ product
315
+ )
316
+ elif isinstance(other, int):
317
+ trans = self.by_key()
318
+ return reduce(
319
+ add, (_cycler(k, v * other) for k, v in trans.items())
320
+ )
321
+ else:
322
+ return NotImplemented
323
+
324
+ @overload
325
+ def __rmul__(self, other: Cycler[L, U]) -> Cycler[K | L, V | U]:
326
+ ...
327
+
328
+ @overload
329
+ def __rmul__(self, other: int) -> Cycler[K, V]:
330
+ ...
331
+
332
+ def __rmul__(self, other):
333
+ return self * other
334
+
335
+ def __len__(self) -> int:
336
+ op_dict: dict[Callable, Callable[[int, int], int]] = {zip: min, product: mul}
337
+ if self._right is None:
338
+ return len(self._left)
339
+ l_len = len(self._left)
340
+ r_len = len(self._right)
341
+ return op_dict[self._op](l_len, r_len)
342
+
343
+ # iadd and imul do not exapand the the type as the returns must be consistent with
344
+ # self, thus they flag as inconsistent with add/mul
345
+ def __iadd__(self, other: Cycler[K, V]) -> Cycler[K, V]: # type: ignore[misc]
346
+ """
347
+ In-place pair-wise combine two equal length cyclers (zip).
348
+
349
+ Parameters
350
+ ----------
351
+ other : Cycler
352
+ """
353
+ if not isinstance(other, Cycler):
354
+ raise TypeError("Cannot += with a non-Cycler object")
355
+ # True shallow copy of self is fine since this is in-place
356
+ old_self = copy.copy(self)
357
+ self._keys = _process_keys(old_self, other)
358
+ self._left = old_self
359
+ self._op = zip
360
+ self._right = Cycler(other._left, other._right, other._op)
361
+ return self
362
+
363
+ def __imul__(self, other: Cycler[K, V] | int) -> Cycler[K, V]: # type: ignore[misc]
364
+ """
365
+ In-place outer product of two cyclers (`itertools.product`).
366
+
367
+ Parameters
368
+ ----------
369
+ other : Cycler
370
+ """
371
+ if not isinstance(other, Cycler):
372
+ raise TypeError("Cannot *= with a non-Cycler object")
373
+ # True shallow copy of self is fine since this is in-place
374
+ old_self = copy.copy(self)
375
+ self._keys = _process_keys(old_self, other)
376
+ self._left = old_self
377
+ self._op = product
378
+ self._right = Cycler(other._left, other._right, other._op)
379
+ return self
380
+
381
+ def __eq__(self, other: object) -> bool:
382
+ if not isinstance(other, Cycler):
383
+ return False
384
+ if len(self) != len(other):
385
+ return False
386
+ if self.keys ^ other.keys:
387
+ return False
388
+ return all(a == b for a, b in zip(self, other))
389
+
390
+ __hash__ = None # type: ignore
391
+
392
+ def __repr__(self) -> str:
393
+ op_map = {zip: "+", product: "*"}
394
+ if self._right is None:
395
+ lab = self.keys.pop()
396
+ itr = list(v[lab] for v in self)
397
+ return f"cycler({lab!r}, {itr!r})"
398
+ else:
399
+ op = op_map.get(self._op, "?")
400
+ msg = "({left!r} {op} {right!r})"
401
+ return msg.format(left=self._left, op=op, right=self._right)
402
+
403
+ def _repr_html_(self) -> str:
404
+ # an table showing the value of each key through a full cycle
405
+ output = "<table>"
406
+ sorted_keys = sorted(self.keys, key=repr)
407
+ for key in sorted_keys:
408
+ output += f"<th>{key!r}</th>"
409
+ for d in iter(self):
410
+ output += "<tr>"
411
+ for k in sorted_keys:
412
+ output += f"<td>{d[k]!r}</td>"
413
+ output += "</tr>"
414
+ output += "</table>"
415
+ return output
416
+
417
+ def by_key(self) -> dict[K, list[V]]:
418
+ """
419
+ Values by key.
420
+
421
+ This returns the transposed values of the cycler. Iterating
422
+ over a `Cycler` yields dicts with a single value for each key,
423
+ this method returns a `dict` of `list` which are the values
424
+ for the given key.
425
+
426
+ The returned value can be used to create an equivalent `Cycler`
427
+ using only `+`.
428
+
429
+ Returns
430
+ -------
431
+ transpose : dict
432
+ dict of lists of the values for each key.
433
+ """
434
+
435
+ # TODO : sort out if this is a bottle neck, if there is a better way
436
+ # and if we care.
437
+
438
+ keys = self.keys
439
+ out: dict[K, list[V]] = {k: list() for k in keys}
440
+
441
+ for d in self:
442
+ for k in keys:
443
+ out[k].append(d[k])
444
+ return out
445
+
446
+ # for back compatibility
447
+ _transpose = by_key
448
+
449
+ def simplify(self) -> Cycler[K, V]:
450
+ """
451
+ Simplify the cycler into a sum (but no products) of cyclers.
452
+
453
+ Returns
454
+ -------
455
+ simple : Cycler
456
+ """
457
+ # TODO: sort out if it is worth the effort to make sure this is
458
+ # balanced. Currently it is is
459
+ # (((a + b) + c) + d) vs
460
+ # ((a + b) + (c + d))
461
+ # I would believe that there is some performance implications
462
+ trans = self.by_key()
463
+ return reduce(add, (_cycler(k, v) for k, v in trans.items()))
464
+
465
+ concat = concat
466
+
467
+
468
+ @overload
469
+ def cycler(arg: Cycler[K, V]) -> Cycler[K, V]:
470
+ ...
471
+
472
+
473
+ @overload
474
+ def cycler(**kwargs: Iterable[V]) -> Cycler[str, V]:
475
+ ...
476
+
477
+
478
+ @overload
479
+ def cycler(label: K, itr: Iterable[V]) -> Cycler[K, V]:
480
+ ...
481
+
482
+
483
+ def cycler(*args, **kwargs):
484
+ """
485
+ Create a new `Cycler` object from a single positional argument,
486
+ a pair of positional arguments, or the combination of keyword arguments.
487
+
488
+ cycler(arg)
489
+ cycler(label1=itr1[, label2=iter2[, ...]])
490
+ cycler(label, itr)
491
+
492
+ Form 1 simply copies a given `Cycler` object.
493
+
494
+ Form 2 composes a `Cycler` as an inner product of the
495
+ pairs of keyword arguments. In other words, all of the
496
+ iterables are cycled simultaneously, as if through zip().
497
+
498
+ Form 3 creates a `Cycler` from a label and an iterable.
499
+ This is useful for when the label cannot be a keyword argument
500
+ (e.g., an integer or a name that has a space in it).
501
+
502
+ Parameters
503
+ ----------
504
+ arg : Cycler
505
+ Copy constructor for Cycler (does a shallow copy of iterables).
506
+ label : name
507
+ The property key. In the 2-arg form of the function,
508
+ the label can be any hashable object. In the keyword argument
509
+ form of the function, it must be a valid python identifier.
510
+ itr : iterable
511
+ Finite length iterable of the property values.
512
+ Can be a single-property `Cycler` that would
513
+ be like a key change, but as a shallow copy.
514
+
515
+ Returns
516
+ -------
517
+ cycler : Cycler
518
+ New `Cycler` for the given property
519
+
520
+ """
521
+ if args and kwargs:
522
+ raise TypeError(
523
+ "cycler() can only accept positional OR keyword arguments -- not both."
524
+ )
525
+
526
+ if len(args) == 1:
527
+ if not isinstance(args[0], Cycler):
528
+ raise TypeError(
529
+ "If only one positional argument given, it must "
530
+ "be a Cycler instance."
531
+ )
532
+ return Cycler(args[0])
533
+ elif len(args) == 2:
534
+ return _cycler(*args)
535
+ elif len(args) > 2:
536
+ raise TypeError(
537
+ "Only a single Cycler can be accepted as the lone "
538
+ "positional argument. Use keyword arguments instead."
539
+ )
540
+
541
+ if kwargs:
542
+ return reduce(add, (_cycler(k, v) for k, v in kwargs.items()))
543
+
544
+ raise TypeError("Must have at least a positional OR keyword arguments")
545
+
546
+
547
+ def _cycler(label: K, itr: Iterable[V]) -> Cycler[K, V]:
548
+ """
549
+ Create a new `Cycler` object from a property name and iterable of values.
550
+
551
+ Parameters
552
+ ----------
553
+ label : hashable
554
+ The property key.
555
+ itr : iterable
556
+ Finite length iterable of the property values.
557
+
558
+ Returns
559
+ -------
560
+ cycler : Cycler
561
+ New `Cycler` for the given property
562
+ """
563
+ if isinstance(itr, Cycler):
564
+ keys = itr.keys
565
+ if len(keys) != 1:
566
+ msg = "Can not create Cycler from a multi-property Cycler"
567
+ raise ValueError(msg)
568
+
569
+ lab = keys.pop()
570
+ # Doesn't need to be a new list because
571
+ # _from_iter() will be creating that new list anyway.
572
+ itr = (v[lab] for v in itr)
573
+
574
+ return Cycler._from_iter(label, itr)
@@ -0,0 +1,27 @@
1
+ # Vendored by tools/vendor_deps.py from python-dateutil 3.0.0 (see licenses/LICENSE_DATEUTIL).
2
+ # -*- coding: utf-8 -*-
3
+ import sys
4
+
5
+ try:
6
+ from ._version import version as __version__
7
+ except ImportError:
8
+ __version__ = 'unknown'
9
+
10
+ __all__ = ["easter", "parser", "relativedelta", "rrule", "tz", "utils"]
11
+
12
+
13
+ def __getattr__(name):
14
+ import importlib
15
+
16
+ if name in __all__ or name == "zoneinfo":
17
+ return importlib.import_module("." + name, __name__)
18
+ raise AttributeError(
19
+ "module {!r} has no attribute {!r}".format(__name__, name)
20
+ )
21
+
22
+
23
+ def __dir__():
24
+ # __dir__ should include all the lazy-importable modules as well.
25
+ return (
26
+ [x for x in globals() if x not in sys.modules] + __all__ + ["zoneinfo"]
27
+ )
@@ -0,0 +1,44 @@
1
+ # Vendored by tools/vendor_deps.py from python-dateutil 3.0.0 (see licenses/LICENSE_DATEUTIL).
2
+ """
3
+ Common code used in multiple modules.
4
+ """
5
+
6
+
7
+ class weekday(object):
8
+ __slots__ = ["weekday", "n"]
9
+
10
+ def __init__(self, weekday, n=None):
11
+ self.weekday = weekday
12
+ self.n = n
13
+
14
+ def __call__(self, n):
15
+ if n == self.n:
16
+ return self
17
+ else:
18
+ return self.__class__(self.weekday, n)
19
+
20
+ def __eq__(self, other):
21
+ try:
22
+ if self.weekday != other.weekday or self.n != other.n:
23
+ return False
24
+ except AttributeError:
25
+ return False
26
+ return True
27
+
28
+ def __hash__(self):
29
+ return hash((
30
+ self.weekday,
31
+ self.n,
32
+ ))
33
+
34
+ def __ne__(self, other):
35
+ return not (self == other)
36
+
37
+ def __repr__(self):
38
+ s = ("MO", "TU", "WE", "TH", "FR", "SA", "SU")[self.weekday]
39
+ if not self.n:
40
+ return s
41
+ else:
42
+ return "%s(%+d)" % (s, self.n)
43
+
44
+ # vim:ts=4:sw=4:et