๐Ÿ Tiny CLI to post simultaneously to Mastodon and Bluesky
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

1st commit

+2110
+19
.github/workflows/pytest.yml
··· 1 + name: pytest 2 + 'on': 3 + - push 4 + - pull_request 5 + jobs: 6 + build: 7 + runs-on: ubuntu-latest 8 + strategy: 9 + matrix: 10 + python-version: ["3.9", "3.10", "3.11", "3.12"] 11 + steps: 12 + - uses: actions/checkout@v3 13 + - uses: actions/setup-python@v4 14 + with: 15 + python-version: ${{ matrix.python-version }} 16 + - uses: snok/install-poetry@v1 17 + - run: poetry install 18 + - run: poetry run ruff format . tests/ --check 19 + - run: poetry run pytest
+5
.gitignore
··· 1 + *.pyc 2 + .env 3 + .pytest_cache/ 4 + .ruff_cache/ 5 + __pycache__/
+674
LICENSE
··· 1 + GNU GENERAL PUBLIC LICENSE 2 + Version 3, 29 June 2007 3 + 4 + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> 5 + Everyone is permitted to copy and distribute verbatim copies 6 + of this license document, but changing it is not allowed. 7 + 8 + Preamble 9 + 10 + The GNU General Public License is a free, copyleft license for 11 + software and other kinds of works. 12 + 13 + The licenses for most software and other practical works are designed 14 + to take away your freedom to share and change the works. By contrast, 15 + the GNU General Public License is intended to guarantee your freedom to 16 + share and change all versions of a program--to make sure it remains free 17 + software for all its users. We, the Free Software Foundation, use the 18 + GNU General Public License for most of our software; it applies also to 19 + any other work released this way by its authors. You can apply it to 20 + your programs, too. 21 + 22 + When we speak of free software, we are referring to freedom, not 23 + price. Our General Public Licenses are designed to make sure that you 24 + have the freedom to distribute copies of free software (and charge for 25 + them if you wish), that you receive source code or can get it if you 26 + want it, that you can change the software or use pieces of it in new 27 + free programs, and that you know you can do these things. 28 + 29 + To protect your rights, we need to prevent others from denying you 30 + these rights or asking you to surrender the rights. Therefore, you have 31 + certain responsibilities if you distribute copies of the software, or if 32 + you modify it: responsibilities to respect the freedom of others. 33 + 34 + For example, if you distribute copies of such a program, whether 35 + gratis or for a fee, you must pass on to the recipients the same 36 + freedoms that you received. You must make sure that they, too, receive 37 + or can get the source code. And you must show them these terms so they 38 + know their rights. 39 + 40 + Developers that use the GNU GPL protect your rights with two steps: 41 + (1) assert copyright on the software, and (2) offer you this License 42 + giving you legal permission to copy, distribute and/or modify it. 43 + 44 + For the developers' and authors' protection, the GPL clearly explains 45 + that there is no warranty for this free software. For both users' and 46 + authors' sake, the GPL requires that modified versions be marked as 47 + changed, so that their problems will not be attributed erroneously to 48 + authors of previous versions. 49 + 50 + Some devices are designed to deny users access to install or run 51 + modified versions of the software inside them, although the manufacturer 52 + can do so. This is fundamentally incompatible with the aim of 53 + protecting users' freedom to change the software. The systematic 54 + pattern of such abuse occurs in the area of products for individuals to 55 + use, which is precisely where it is most unacceptable. Therefore, we 56 + have designed this version of the GPL to prohibit the practice for those 57 + products. If such problems arise substantially in other domains, we 58 + stand ready to extend this provision to those domains in future versions 59 + of the GPL, as needed to protect the freedom of users. 60 + 61 + Finally, every program is threatened constantly by software patents. 62 + States should not allow patents to restrict development and use of 63 + software on general-purpose computers, but in those that do, we wish to 64 + avoid the special danger that patents applied to a free program could 65 + make it effectively proprietary. To prevent this, the GPL assures that 66 + patents cannot be used to render the program non-free. 67 + 68 + The precise terms and conditions for copying, distribution and 69 + modification follow. 70 + 71 + TERMS AND CONDITIONS 72 + 73 + 0. Definitions. 74 + 75 + "This License" refers to version 3 of the GNU General Public License. 76 + 77 + "Copyright" also means copyright-like laws that apply to other kinds of 78 + works, such as semiconductor masks. 79 + 80 + "The Program" refers to any copyrightable work licensed under this 81 + License. Each licensee is addressed as "you". "Licensees" and 82 + "recipients" may be individuals or organizations. 83 + 84 + To "modify" a work means to copy from or adapt all or part of the work 85 + in a fashion requiring copyright permission, other than the making of an 86 + exact copy. The resulting work is called a "modified version" of the 87 + earlier work or a work "based on" the earlier work. 88 + 89 + A "covered work" means either the unmodified Program or a work based 90 + on the Program. 91 + 92 + To "propagate" a work means to do anything with it that, without 93 + permission, would make you directly or secondarily liable for 94 + infringement under applicable copyright law, except executing it on a 95 + computer or modifying a private copy. Propagation includes copying, 96 + distribution (with or without modification), making available to the 97 + public, and in some countries other activities as well. 98 + 99 + To "convey" a work means any kind of propagation that enables other 100 + parties to make or receive copies. Mere interaction with a user through 101 + a computer network, with no transfer of a copy, is not conveying. 102 + 103 + An interactive user interface displays "Appropriate Legal Notices" 104 + to the extent that it includes a convenient and prominently visible 105 + feature that (1) displays an appropriate copyright notice, and (2) 106 + tells the user that there is no warranty for the work (except to the 107 + extent that warranties are provided), that licensees may convey the 108 + work under this License, and how to view a copy of this License. If 109 + the interface presents a list of user commands or options, such as a 110 + menu, a prominent item in the list meets this criterion. 111 + 112 + 1. Source Code. 113 + 114 + The "source code" for a work means the preferred form of the work 115 + for making modifications to it. "Object code" means any non-source 116 + form of a work. 117 + 118 + A "Standard Interface" means an interface that either is an official 119 + standard defined by a recognized standards body, or, in the case of 120 + interfaces specified for a particular programming language, one that 121 + is widely used among developers working in that language. 122 + 123 + The "System Libraries" of an executable work include anything, other 124 + than the work as a whole, that (a) is included in the normal form of 125 + packaging a Major Component, but which is not part of that Major 126 + Component, and (b) serves only to enable use of the work with that 127 + Major Component, or to implement a Standard Interface for which an 128 + implementation is available to the public in source code form. A 129 + "Major Component", in this context, means a major essential component 130 + (kernel, window system, and so on) of the specific operating system 131 + (if any) on which the executable work runs, or a compiler used to 132 + produce the work, or an object code interpreter used to run it. 133 + 134 + The "Corresponding Source" for a work in object code form means all 135 + the source code needed to generate, install, and (for an executable 136 + work) run the object code and to modify the work, including scripts to 137 + control those activities. However, it does not include the work's 138 + System Libraries, or general-purpose tools or generally available free 139 + programs which are used unmodified in performing those activities but 140 + which are not part of the work. For example, Corresponding Source 141 + includes interface definition files associated with source files for 142 + the work, and the source code for shared libraries and dynamically 143 + linked subprograms that the work is specifically designed to require, 144 + such as by intimate data communication or control flow between those 145 + subprograms and other parts of the work. 146 + 147 + The Corresponding Source need not include anything that users 148 + can regenerate automatically from other parts of the Corresponding 149 + Source. 150 + 151 + The Corresponding Source for a work in source code form is that 152 + same work. 153 + 154 + 2. Basic Permissions. 155 + 156 + All rights granted under this License are granted for the term of 157 + copyright on the Program, and are irrevocable provided the stated 158 + conditions are met. This License explicitly affirms your unlimited 159 + permission to run the unmodified Program. The output from running a 160 + covered work is covered by this License only if the output, given its 161 + content, constitutes a covered work. This License acknowledges your 162 + rights of fair use or other equivalent, as provided by copyright law. 163 + 164 + You may make, run and propagate covered works that you do not 165 + convey, without conditions so long as your license otherwise remains 166 + in force. You may convey covered works to others for the sole purpose 167 + of having them make modifications exclusively for you, or provide you 168 + with facilities for running those works, provided that you comply with 169 + the terms of this License in conveying all material for which you do 170 + not control copyright. Those thus making or running the covered works 171 + for you must do so exclusively on your behalf, under your direction 172 + and control, on terms that prohibit them from making any copies of 173 + your copyrighted material outside their relationship with you. 174 + 175 + Conveying under any other circumstances is permitted solely under 176 + the conditions stated below. Sublicensing is not allowed; section 10 177 + makes it unnecessary. 178 + 179 + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 + 181 + No covered work shall be deemed part of an effective technological 182 + measure under any applicable law fulfilling obligations under article 183 + 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 + similar laws prohibiting or restricting circumvention of such 185 + measures. 186 + 187 + When you convey a covered work, you waive any legal power to forbid 188 + circumvention of technological measures to the extent such circumvention 189 + is effected by exercising rights under this License with respect to 190 + the covered work, and you disclaim any intention to limit operation or 191 + modification of the work as a means of enforcing, against the work's 192 + users, your or third parties' legal rights to forbid circumvention of 193 + technological measures. 194 + 195 + 4. Conveying Verbatim Copies. 196 + 197 + You may convey verbatim copies of the Program's source code as you 198 + receive it, in any medium, provided that you conspicuously and 199 + appropriately publish on each copy an appropriate copyright notice; 200 + keep intact all notices stating that this License and any 201 + non-permissive terms added in accord with section 7 apply to the code; 202 + keep intact all notices of the absence of any warranty; and give all 203 + recipients a copy of this License along with the Program. 204 + 205 + You may charge any price or no price for each copy that you convey, 206 + and you may offer support or warranty protection for a fee. 207 + 208 + 5. Conveying Modified Source Versions. 209 + 210 + You may convey a work based on the Program, or the modifications to 211 + produce it from the Program, in the form of source code under the 212 + terms of section 4, provided that you also meet all of these conditions: 213 + 214 + a) The work must carry prominent notices stating that you modified 215 + it, and giving a relevant date. 216 + 217 + b) The work must carry prominent notices stating that it is 218 + released under this License and any conditions added under section 219 + 7. This requirement modifies the requirement in section 4 to 220 + "keep intact all notices". 221 + 222 + c) You must license the entire work, as a whole, under this 223 + License to anyone who comes into possession of a copy. This 224 + License will therefore apply, along with any applicable section 7 225 + additional terms, to the whole of the work, and all its parts, 226 + regardless of how they are packaged. This License gives no 227 + permission to license the work in any other way, but it does not 228 + invalidate such permission if you have separately received it. 229 + 230 + d) If the work has interactive user interfaces, each must display 231 + Appropriate Legal Notices; however, if the Program has interactive 232 + interfaces that do not display Appropriate Legal Notices, your 233 + work need not make them do so. 234 + 235 + A compilation of a covered work with other separate and independent 236 + works, which are not by their nature extensions of the covered work, 237 + and which are not combined with it such as to form a larger program, 238 + in or on a volume of a storage or distribution medium, is called an 239 + "aggregate" if the compilation and its resulting copyright are not 240 + used to limit the access or legal rights of the compilation's users 241 + beyond what the individual works permit. Inclusion of a covered work 242 + in an aggregate does not cause this License to apply to the other 243 + parts of the aggregate. 244 + 245 + 6. Conveying Non-Source Forms. 246 + 247 + You may convey a covered work in object code form under the terms 248 + of sections 4 and 5, provided that you also convey the 249 + machine-readable Corresponding Source under the terms of this License, 250 + in one of these ways: 251 + 252 + a) Convey the object code in, or embodied in, a physical product 253 + (including a physical distribution medium), accompanied by the 254 + Corresponding Source fixed on a durable physical medium 255 + customarily used for software interchange. 256 + 257 + b) Convey the object code in, or embodied in, a physical product 258 + (including a physical distribution medium), accompanied by a 259 + written offer, valid for at least three years and valid for as 260 + long as you offer spare parts or customer support for that product 261 + model, to give anyone who possesses the object code either (1) a 262 + copy of the Corresponding Source for all the software in the 263 + product that is covered by this License, on a durable physical 264 + medium customarily used for software interchange, for a price no 265 + more than your reasonable cost of physically performing this 266 + conveying of source, or (2) access to copy the 267 + Corresponding Source from a network server at no charge. 268 + 269 + c) Convey individual copies of the object code with a copy of the 270 + written offer to provide the Corresponding Source. This 271 + alternative is allowed only occasionally and noncommercially, and 272 + only if you received the object code with such an offer, in accord 273 + with subsection 6b. 274 + 275 + d) Convey the object code by offering access from a designated 276 + place (gratis or for a charge), and offer equivalent access to the 277 + Corresponding Source in the same way through the same place at no 278 + further charge. You need not require recipients to copy the 279 + Corresponding Source along with the object code. If the place to 280 + copy the object code is a network server, the Corresponding Source 281 + may be on a different server (operated by you or a third party) 282 + that supports equivalent copying facilities, provided you maintain 283 + clear directions next to the object code saying where to find the 284 + Corresponding Source. Regardless of what server hosts the 285 + Corresponding Source, you remain obligated to ensure that it is 286 + available for as long as needed to satisfy these requirements. 287 + 288 + e) Convey the object code using peer-to-peer transmission, provided 289 + you inform other peers where the object code and Corresponding 290 + Source of the work are being offered to the general public at no 291 + charge under subsection 6d. 292 + 293 + A separable portion of the object code, whose source code is excluded 294 + from the Corresponding Source as a System Library, need not be 295 + included in conveying the object code work. 296 + 297 + A "User Product" is either (1) a "consumer product", which means any 298 + tangible personal property which is normally used for personal, family, 299 + or household purposes, or (2) anything designed or sold for incorporation 300 + into a dwelling. In determining whether a product is a consumer product, 301 + doubtful cases shall be resolved in favor of coverage. For a particular 302 + product received by a particular user, "normally used" refers to a 303 + typical or common use of that class of product, regardless of the status 304 + of the particular user or of the way in which the particular user 305 + actually uses, or expects or is expected to use, the product. A product 306 + is a consumer product regardless of whether the product has substantial 307 + commercial, industrial or non-consumer uses, unless such uses represent 308 + the only significant mode of use of the product. 309 + 310 + "Installation Information" for a User Product means any methods, 311 + procedures, authorization keys, or other information required to install 312 + and execute modified versions of a covered work in that User Product from 313 + a modified version of its Corresponding Source. The information must 314 + suffice to ensure that the continued functioning of the modified object 315 + code is in no case prevented or interfered with solely because 316 + modification has been made. 317 + 318 + If you convey an object code work under this section in, or with, or 319 + specifically for use in, a User Product, and the conveying occurs as 320 + part of a transaction in which the right of possession and use of the 321 + User Product is transferred to the recipient in perpetuity or for a 322 + fixed term (regardless of how the transaction is characterized), the 323 + Corresponding Source conveyed under this section must be accompanied 324 + by the Installation Information. But this requirement does not apply 325 + if neither you nor any third party retains the ability to install 326 + modified object code on the User Product (for example, the work has 327 + been installed in ROM). 328 + 329 + The requirement to provide Installation Information does not include a 330 + requirement to continue to provide support service, warranty, or updates 331 + for a work that has been modified or installed by the recipient, or for 332 + the User Product in which it has been modified or installed. Access to a 333 + network may be denied when the modification itself materially and 334 + adversely affects the operation of the network or violates the rules and 335 + protocols for communication across the network. 336 + 337 + Corresponding Source conveyed, and Installation Information provided, 338 + in accord with this section must be in a format that is publicly 339 + documented (and with an implementation available to the public in 340 + source code form), and must require no special password or key for 341 + unpacking, reading or copying. 342 + 343 + 7. Additional Terms. 344 + 345 + "Additional permissions" are terms that supplement the terms of this 346 + License by making exceptions from one or more of its conditions. 347 + Additional permissions that are applicable to the entire Program shall 348 + be treated as though they were included in this License, to the extent 349 + that they are valid under applicable law. If additional permissions 350 + apply only to part of the Program, that part may be used separately 351 + under those permissions, but the entire Program remains governed by 352 + this License without regard to the additional permissions. 353 + 354 + When you convey a copy of a covered work, you may at your option 355 + remove any additional permissions from that copy, or from any part of 356 + it. (Additional permissions may be written to require their own 357 + removal in certain cases when you modify the work.) You may place 358 + additional permissions on material, added by you to a covered work, 359 + for which you have or can give appropriate copyright permission. 360 + 361 + Notwithstanding any other provision of this License, for material you 362 + add to a covered work, you may (if authorized by the copyright holders of 363 + that material) supplement the terms of this License with terms: 364 + 365 + a) Disclaiming warranty or limiting liability differently from the 366 + terms of sections 15 and 16 of this License; or 367 + 368 + b) Requiring preservation of specified reasonable legal notices or 369 + author attributions in that material or in the Appropriate Legal 370 + Notices displayed by works containing it; or 371 + 372 + c) Prohibiting misrepresentation of the origin of that material, or 373 + requiring that modified versions of such material be marked in 374 + reasonable ways as different from the original version; or 375 + 376 + d) Limiting the use for publicity purposes of names of licensors or 377 + authors of the material; or 378 + 379 + e) Declining to grant rights under trademark law for use of some 380 + trade names, trademarks, or service marks; or 381 + 382 + f) Requiring indemnification of licensors and authors of that 383 + material by anyone who conveys the material (or modified versions of 384 + it) with contractual assumptions of liability to the recipient, for 385 + any liability that these contractual assumptions directly impose on 386 + those licensors and authors. 387 + 388 + All other non-permissive additional terms are considered "further 389 + restrictions" within the meaning of section 10. If the Program as you 390 + received it, or any part of it, contains a notice stating that it is 391 + governed by this License along with a term that is a further 392 + restriction, you may remove that term. If a license document contains 393 + a further restriction but permits relicensing or conveying under this 394 + License, you may add to a covered work material governed by the terms 395 + of that license document, provided that the further restriction does 396 + not survive such relicensing or conveying. 397 + 398 + If you add terms to a covered work in accord with this section, you 399 + must place, in the relevant source files, a statement of the 400 + additional terms that apply to those files, or a notice indicating 401 + where to find the applicable terms. 402 + 403 + Additional terms, permissive or non-permissive, may be stated in the 404 + form of a separately written license, or stated as exceptions; 405 + the above requirements apply either way. 406 + 407 + 8. Termination. 408 + 409 + You may not propagate or modify a covered work except as expressly 410 + provided under this License. Any attempt otherwise to propagate or 411 + modify it is void, and will automatically terminate your rights under 412 + this License (including any patent licenses granted under the third 413 + paragraph of section 11). 414 + 415 + However, if you cease all violation of this License, then your 416 + license from a particular copyright holder is reinstated (a) 417 + provisionally, unless and until the copyright holder explicitly and 418 + finally terminates your license, and (b) permanently, if the copyright 419 + holder fails to notify you of the violation by some reasonable means 420 + prior to 60 days after the cessation. 421 + 422 + Moreover, your license from a particular copyright holder is 423 + reinstated permanently if the copyright holder notifies you of the 424 + violation by some reasonable means, this is the first time you have 425 + received notice of violation of this License (for any work) from that 426 + copyright holder, and you cure the violation prior to 30 days after 427 + your receipt of the notice. 428 + 429 + Termination of your rights under this section does not terminate the 430 + licenses of parties who have received copies or rights from you under 431 + this License. If your rights have been terminated and not permanently 432 + reinstated, you do not qualify to receive new licenses for the same 433 + material under section 10. 434 + 435 + 9. Acceptance Not Required for Having Copies. 436 + 437 + You are not required to accept this License in order to receive or 438 + run a copy of the Program. Ancillary propagation of a covered work 439 + occurring solely as a consequence of using peer-to-peer transmission 440 + to receive a copy likewise does not require acceptance. However, 441 + nothing other than this License grants you permission to propagate or 442 + modify any covered work. These actions infringe copyright if you do 443 + not accept this License. Therefore, by modifying or propagating a 444 + covered work, you indicate your acceptance of this License to do so. 445 + 446 + 10. Automatic Licensing of Downstream Recipients. 447 + 448 + Each time you convey a covered work, the recipient automatically 449 + receives a license from the original licensors, to run, modify and 450 + propagate that work, subject to this License. You are not responsible 451 + for enforcing compliance by third parties with this License. 452 + 453 + An "entity transaction" is a transaction transferring control of an 454 + organization, or substantially all assets of one, or subdividing an 455 + organization, or merging organizations. If propagation of a covered 456 + work results from an entity transaction, each party to that 457 + transaction who receives a copy of the work also receives whatever 458 + licenses to the work the party's predecessor in interest had or could 459 + give under the previous paragraph, plus a right to possession of the 460 + Corresponding Source of the work from the predecessor in interest, if 461 + the predecessor has it or can get it with reasonable efforts. 462 + 463 + You may not impose any further restrictions on the exercise of the 464 + rights granted or affirmed under this License. For example, you may 465 + not impose a license fee, royalty, or other charge for exercise of 466 + rights granted under this License, and you may not initiate litigation 467 + (including a cross-claim or counterclaim in a lawsuit) alleging that 468 + any patent claim is infringed by making, using, selling, offering for 469 + sale, or importing the Program or any portion of it. 470 + 471 + 11. Patents. 472 + 473 + A "contributor" is a copyright holder who authorizes use under this 474 + License of the Program or a work on which the Program is based. The 475 + work thus licensed is called the contributor's "contributor version". 476 + 477 + A contributor's "essential patent claims" are all patent claims 478 + owned or controlled by the contributor, whether already acquired or 479 + hereafter acquired, that would be infringed by some manner, permitted 480 + by this License, of making, using, or selling its contributor version, 481 + but do not include claims that would be infringed only as a 482 + consequence of further modification of the contributor version. For 483 + purposes of this definition, "control" includes the right to grant 484 + patent sublicenses in a manner consistent with the requirements of 485 + this License. 486 + 487 + Each contributor grants you a non-exclusive, worldwide, royalty-free 488 + patent license under the contributor's essential patent claims, to 489 + make, use, sell, offer for sale, import and otherwise run, modify and 490 + propagate the contents of its contributor version. 491 + 492 + In the following three paragraphs, a "patent license" is any express 493 + agreement or commitment, however denominated, not to enforce a patent 494 + (such as an express permission to practice a patent or covenant not to 495 + sue for patent infringement). To "grant" such a patent license to a 496 + party means to make such an agreement or commitment not to enforce a 497 + patent against the party. 498 + 499 + If you convey a covered work, knowingly relying on a patent license, 500 + and the Corresponding Source of the work is not available for anyone 501 + to copy, free of charge and under the terms of this License, through a 502 + publicly available network server or other readily accessible means, 503 + then you must either (1) cause the Corresponding Source to be so 504 + available, or (2) arrange to deprive yourself of the benefit of the 505 + patent license for this particular work, or (3) arrange, in a manner 506 + consistent with the requirements of this License, to extend the patent 507 + license to downstream recipients. "Knowingly relying" means you have 508 + actual knowledge that, but for the patent license, your conveying the 509 + covered work in a country, or your recipient's use of the covered work 510 + in a country, would infringe one or more identifiable patents in that 511 + country that you have reason to believe are valid. 512 + 513 + If, pursuant to or in connection with a single transaction or 514 + arrangement, you convey, or propagate by procuring conveyance of, a 515 + covered work, and grant a patent license to some of the parties 516 + receiving the covered work authorizing them to use, propagate, modify 517 + or convey a specific copy of the covered work, then the patent license 518 + you grant is automatically extended to all recipients of the covered 519 + work and works based on it. 520 + 521 + A patent license is "discriminatory" if it does not include within 522 + the scope of its coverage, prohibits the exercise of, or is 523 + conditioned on the non-exercise of one or more of the rights that are 524 + specifically granted under this License. You may not convey a covered 525 + work if you are a party to an arrangement with a third party that is 526 + in the business of distributing software, under which you make payment 527 + to the third party based on the extent of your activity of conveying 528 + the work, and under which the third party grants, to any of the 529 + parties who would receive the covered work from you, a discriminatory 530 + patent license (a) in connection with copies of the covered work 531 + conveyed by you (or copies made from those copies), or (b) primarily 532 + for and in connection with specific products or compilations that 533 + contain the covered work, unless you entered into that arrangement, 534 + or that patent license was granted, prior to 28 March 2007. 535 + 536 + Nothing in this License shall be construed as excluding or limiting 537 + any implied license or other defenses to infringement that may 538 + otherwise be available to you under applicable patent law. 539 + 540 + 12. No Surrender of Others' Freedom. 541 + 542 + If conditions are imposed on you (whether by court order, agreement or 543 + otherwise) that contradict the conditions of this License, they do not 544 + excuse you from the conditions of this License. If you cannot convey a 545 + covered work so as to satisfy simultaneously your obligations under this 546 + License and any other pertinent obligations, then as a consequence you may 547 + not convey it at all. For example, if you agree to terms that obligate you 548 + to collect a royalty for further conveying from those to whom you convey 549 + the Program, the only way you could satisfy both those terms and this 550 + License would be to refrain entirely from conveying the Program. 551 + 552 + 13. Use with the GNU Affero General Public License. 553 + 554 + Notwithstanding any other provision of this License, you have 555 + permission to link or combine any covered work with a work licensed 556 + under version 3 of the GNU Affero General Public License into a single 557 + combined work, and to convey the resulting work. The terms of this 558 + License will continue to apply to the part which is the covered work, 559 + but the special requirements of the GNU Affero General Public License, 560 + section 13, concerning interaction through a network will apply to the 561 + combination as such. 562 + 563 + 14. Revised Versions of this License. 564 + 565 + The Free Software Foundation may publish revised and/or new versions of 566 + the GNU General Public License from time to time. Such new versions will 567 + be similar in spirit to the present version, but may differ in detail to 568 + address new problems or concerns. 569 + 570 + Each version is given a distinguishing version number. If the 571 + Program specifies that a certain numbered version of the GNU General 572 + Public License "or any later version" applies to it, you have the 573 + option of following the terms and conditions either of that numbered 574 + version or of any later version published by the Free Software 575 + Foundation. If the Program does not specify a version number of the 576 + GNU General Public License, you may choose any version ever published 577 + by the Free Software Foundation. 578 + 579 + If the Program specifies that a proxy can decide which future 580 + versions of the GNU General Public License can be used, that proxy's 581 + public statement of acceptance of a version permanently authorizes you 582 + to choose that version for the Program. 583 + 584 + Later license versions may give you additional or different 585 + permissions. However, no additional obligations are imposed on any 586 + author or copyright holder as a result of your choosing to follow a 587 + later version. 588 + 589 + 15. Disclaimer of Warranty. 590 + 591 + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 + APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 + HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 + OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 + PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 + IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 + ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 + 600 + 16. Limitation of Liability. 601 + 602 + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 + THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 + GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 + USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 + PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 + EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 + SUCH DAMAGES. 611 + 612 + 17. Interpretation of Sections 15 and 16. 613 + 614 + If the disclaimer of warranty and limitation of liability provided 615 + above cannot be given local legal effect according to their terms, 616 + reviewing courts shall apply local law that most closely approximates 617 + an absolute waiver of all civil liability in connection with the 618 + Program, unless a warranty or assumption of liability accompanies a 619 + copy of the Program in return for a fee. 620 + 621 + END OF TERMS AND CONDITIONS 622 + 623 + How to Apply These Terms to Your New Programs 624 + 625 + If you develop a new program, and you want it to be of the greatest 626 + possible use to the public, the best way to achieve this is to make it 627 + free software which everyone can redistribute and change under these terms. 628 + 629 + To do so, attach the following notices to the program. It is safest 630 + to attach them to the start of each source file to most effectively 631 + state the exclusion of warranty; and each file should have at least 632 + the "copyright" line and a pointer to where the full notice is found. 633 + 634 + <one line to give the program's name and a brief idea of what it does.> 635 + Copyright (C) <year> <name of author> 636 + 637 + This program is free software: you can redistribute it and/or modify 638 + it under the terms of the GNU General Public License as published by 639 + the Free Software Foundation, either version 3 of the License, or 640 + (at your option) any later version. 641 + 642 + This program is distributed in the hope that it will be useful, 643 + but WITHOUT ANY WARRANTY; without even the implied warranty of 644 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 + GNU General Public License for more details. 646 + 647 + You should have received a copy of the GNU General Public License 648 + along with this program. If not, see <https://www.gnu.org/licenses/>. 649 + 650 + Also add information on how to contact you by electronic and paper mail. 651 + 652 + If the program does terminal interaction, make it output a short 653 + notice like this when it starts in an interactive mode: 654 + 655 + <program> Copyright (C) <year> <name of author> 656 + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 + This is free software, and you are welcome to redistribute it 658 + under certain conditions; type `show c' for details. 659 + 660 + The hypothetical commands `show w' and `show c' should show the appropriate 661 + parts of the General Public License. Of course, your program's commands 662 + might be different; for a GUI interface, you would use an "about box". 663 + 664 + You should also get your employer (if you work as a programmer) or school, 665 + if any, to sign a "copyright disclaimer" for the program, if necessary. 666 + For more information on this, and how to apply and follow the GNU GPL, see 667 + <https://www.gnu.org/licenses/>. 668 + 669 + The GNU General Public License does not permit incorporating your program 670 + into proprietary programs. If your program is a subroutine library, you 671 + may consider it more useful to permit linking proprietary applications with 672 + the library. If this is what you want to do, use the GNU Lesser General 673 + Public License instead of this License. But first, please read 674 + <https://www.gnu.org/licenses/why-not-lgpl.html>.
+54
README.md
··· 1 + # Not my ex 2 + 3 + Tiny CLI to post simultaneously to Mastodon and Bluesky. 4 + 5 + <small>Obviously, based on [`cuducos/from-my-ex`](https://github.com/cuducos/from-my-ex).</small> 6 + 7 + ## Getting started 8 + 9 + ### Requirements 10 + 11 + * Python 3.9 or newer 12 + * [Poetry](https://python-poetry.org) 13 + 14 + ### Configuration 15 + 16 + #### To repost in [Bluesky](https://bsky.app) 17 + 18 + | Name | Description | Example | Default value | 19 + |---|---|---|---| 20 + | `NOT_MY_EX_BSKY_AGENT` | Bluesky instance | `"https://bsky.social"` | `"https://bsky.social"` | 21 + | `NOT_MY_EX_BSKY_EMAIL` | Email used in Bluesky | `"cuducos@mailinator.com"` | `None` | 22 + | `NOT_MY_EX_BSKY_PASSWORD` | Password used in Bluesky | As created in [App Passwords](https://bsky.app/settings/app-passwords) | `None` | 23 + 24 + Not setting `NOT_MY_EX_BSKY_EMAIL` **or** `NOT_MY_EX_BSKY_PASSWORD` disables Bluesky reposting. 25 + 26 + #### To repost in [Mastodon](https://joinmastodon.org/) 27 + 28 + | Name | Description | Example | Default value | 29 + |---|---|---|---| 30 + | `NOT_MY_EX_MASTODON_INSTANCE` | Mastodon instance | `"https://tech.lgbt"` | `"https://mastodon.social"` | 31 + | `NOT_MY_EX_MASTODON_TOKEN` | Mastodon access token | Go to your _Settings_, _Development_ and then create an app to get the access token. Select the `write:statuses` and `write:media` scopes. | `None` | 32 + 33 + Not setting `NOT_MY_EX_MASTODON_TOKEN` disables Mastodon reposting. 34 + 35 + ## Usage 36 + 37 + ```console 38 + $ poetry install 39 + $ poetry shell 40 + $ python -m not_my_ex "Magic, madness, heaven, sin " --images /tmp/1989.gif 41 + $ exit 42 + ``` 43 + 44 + You can skip `--images` or pass multiple images (e.g. `--images taylor.jpg --images swift.gif`). 45 + 46 + ## Contributing 47 + 48 + The tests include [Ruff](https://docs.astral.sh/ruff/) and [`isort`](https://pycqa.github.io/isort/): 49 + 50 + ```console 51 + $ poetry run ruff format . tests/ 52 + $ poetry run ruff . tests/ 53 + $ poetry run pytest 54 + ```
not_my_ex/__init__.py

This is a binary file and will not be displayed.

+34
not_my_ex/__main__.py
··· 1 + from pathlib import Path 2 + from typing import List 3 + 4 + from typer import run 5 + 6 + from not_my_ex.bluesky import Bluesky 7 + from not_my_ex.mastodon import Mastodon 8 + from not_my_ex.posts import Media, Post 9 + from not_my_ex.settings import BLUESKY, CLIENTS_AVAILABLE, MASTODON 10 + 11 + 12 + def clients(): 13 + clients = {BLUESKY: Bluesky, MASTODON: Mastodon} 14 + yield from (cls() for key, cls in clients.items() if key in CLIENTS_AVAILABLE) 15 + 16 + 17 + def media_from(path): 18 + path = Path(path) 19 + if not path.exists(): 20 + raise FileNotFoundError(path) 21 + 22 + alt = input(f"Enter an alt text for {path.name}: ") 23 + return Media.from_img(path, alt=alt) 24 + 25 + 26 + def main(text: str, images: List[str] = []): 27 + images = tuple(media_from(path) for path in images) 28 + post = Post(text, images or None) 29 + for client in clients(): 30 + print(client.post(post)) 31 + 32 + 33 + if __name__ == "__main__": 34 + run(main)
+122
not_my_ex/bluesky.py
··· 1 + from datetime import datetime 2 + from re import compile 3 + 4 + from backoff import expo, on_exception 5 + from httpx import ReadTimeout, post 6 + 7 + from not_my_ex import settings 8 + 9 + URL = compile( 10 + r"(http(s?):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]))" 11 + ) 12 + 13 + 14 + class BlueskyCredentialsNotFoundError(Exception): 15 + pass 16 + 17 + 18 + class BlueskyError(Exception): 19 + def __init__(self, response, *args, **kwargs): 20 + data = response.json() 21 + msg = ( 22 + f"Error from Bluesky agent/instance - " 23 + f"[HTTP Status {response.status_code}] " 24 + f"{data['error']}: {data['message']}" 25 + ) 26 + super().__init__(msg, *args, **kwargs) 27 + 28 + 29 + class Bluesky: 30 + def __init__(self): 31 + if settings.BLUESKY not in settings.CLIENTS_AVAILABLE: 32 + raise BlueskyCredentialsNotFoundError( 33 + "NOT_MY_EX_BSKY_EMAIL and/or NOT_MY_EX_BSKY_PASSWORD " 34 + "environment variables not set" 35 + ) 36 + 37 + credentials = { 38 + "identifier": settings.BSKY_EMAIL, 39 + "password": settings.BSKY_PASSWORD, 40 + } 41 + resp = post( 42 + f"{settings.BSKY_AGENT}/xrpc/com.atproto.server.createSession", 43 + json=credentials, 44 + ) 45 + 46 + if resp.status_code == 401: 47 + raise BlueskyError(resp) 48 + 49 + resp.raise_for_status() 50 + data = resp.json() 51 + self.token = data["accessJwt"] 52 + self.did = data["did"] 53 + self.handle = data["handle"] 54 + 55 + @on_exception(expo, ReadTimeout, max_tries=7) 56 + def xrpc(self, resource, **kwargs): 57 + headers = kwargs.pop("headers", {}) 58 + headers["Authorization"] = f"Bearer {self.token}" 59 + return post(f"{settings.BSKY_AGENT}/xrpc/{resource}", headers=headers, **kwargs) 60 + 61 + def upload(self, media): 62 + resp = self.xrpc( 63 + "com.atproto.repo.uploadBlob", 64 + headers={"Content-type": media.mime}, 65 + data=media.content, 66 + ) 67 + if resp.status_code != 200: 68 + BlueskyError(resp) 69 + return {"alt": media.alt, "image": resp.json()["blob"]} 70 + 71 + def data(self, text, media): 72 + data = { 73 + "repo": self.did, 74 + "collection": "app.bsky.feed.post", 75 + "record": { 76 + "$type": "app.bsky.feed.post", 77 + "text": text, 78 + "createdAt": datetime.utcnow().isoformat(), 79 + }, 80 + } 81 + 82 + if matches := URL.findall(text): 83 + data["record"]["facets"] = [] 84 + start = 0 85 + source = text.encode() 86 + for url, *_ in matches: 87 + target = url.encode() 88 + start = source.find(target, start) 89 + end = start + len(target) 90 + data["record"]["facets"].append( 91 + { 92 + "index": {"byteStart": start, "byteEnd": end}, 93 + "features": [ 94 + { 95 + "$type": "app.bsky.richtext.facet#link", 96 + "uri": url, 97 + } 98 + ], 99 + } 100 + ) 101 + start = end 102 + 103 + if media: 104 + embed = [self.upload(media) for media in media] 105 + data["record"]["embed"] = { 106 + "$type": "app.bsky.embed.images", 107 + "images": embed, 108 + } 109 + 110 + return data 111 + 112 + def url_from(self, resp): 113 + *_, post_id = resp.json()["uri"].split("/") 114 + return f"https://bsky.app/profile/{self.handle}/post/{post_id}" 115 + 116 + def post(self, post): 117 + data = self.data(post.text, post.media) 118 + resp = self.xrpc("com.atproto.repo.createRecord", json=data) 119 + if resp.status_code != 200: 120 + raise BlueskyError(resp) 121 + 122 + return self.url_from(resp)
+75
not_my_ex/mastodon.py
··· 1 + from io import BytesIO 2 + 3 + from backoff import expo, on_exception 4 + from httpx import get, post 5 + 6 + from not_my_ex import settings 7 + 8 + 9 + class MediaNotReadyError(Exception): 10 + pass 11 + 12 + 13 + class MastodonCredentialsNotFoundError(Exception): 14 + pass 15 + 16 + 17 + class MastodonError(Exception): 18 + def __init__(self, response, *args, **kwargs): 19 + data = response.json() 20 + msg = ( 21 + f"Error from Mastodon instance server - " 22 + f"[HTTP Status {response.status_code}] {data['error']}" 23 + ) 24 + super().__init__(msg, *args, **kwargs) 25 + 26 + 27 + class Mastodon: 28 + def __init__(self): 29 + if settings.MASTODON not in settings.CLIENTS_AVAILABLE: 30 + raise MastodonCredentialsNotFoundError( 31 + "NOT_MY_EX_MASTODON_TOKEN environment variables not set" 32 + ) 33 + self.headers = {"Authorization": f"Bearer {settings.MASTODON_TOKEN}"} 34 + 35 + def req(self, path, **kwargs): 36 + return post( 37 + f"{settings.MASTODON_INSTANCE}{path}", headers=self.headers, **kwargs 38 + ) 39 + 40 + @on_exception(expo, MediaNotReadyError, max_tries=422) 41 + def wait_media_processing(self, media_id): 42 + resp = get( 43 + f"{settings.MASTODON_INSTANCE}/api/v1/media/{media_id}", 44 + headers=self.headers, 45 + ) 46 + if resp.status_code != 200: 47 + raise MediaNotReadyError(resp) 48 + 49 + def upload(self, media): 50 + data = {"description": media.alt} if media.alt else None 51 + ext = media.mime.split("/")[1] 52 + 53 + with BytesIO(media.content) as attachment: 54 + files = {"file": (f"image.{ext}", attachment, media.mime)} 55 + resp = self.req("/api/v2/media", data=data, files=files) 56 + 57 + if resp.status_code not in (202, 200): 58 + raise MastodonError(resp) 59 + 60 + media_id = resp.json()["id"] 61 + if resp.status_code == 202: 62 + self.wait_media_processing(media_id) 63 + 64 + return media_id 65 + 66 + def post(self, status): 67 + data = {"status": status.text} 68 + if status.media: 69 + data["media_ids"] = [self.upload(media) for media in status.media] 70 + 71 + resp = self.req("/api/v1/statuses", json=data) 72 + if resp.status_code != 200: 73 + raise MastodonError(resp) 74 + 75 + return resp.json()["url"]
+40
not_my_ex/posts.py
··· 1 + from dataclasses import dataclass 2 + from mimetypes import guess_type 3 + from pathlib import Path 4 + from typing import Iterable, Optional 5 + 6 + from eld import LanguageDetector 7 + 8 + from not_my_ex.settings import LIMIT 9 + 10 + 11 + class PostTooLongError(Exception): 12 + pass 13 + 14 + 15 + @dataclass 16 + class Media: 17 + content: bytes 18 + mime: str 19 + alt: str 20 + 21 + @classmethod 22 + def from_img(cls, img, alt): 23 + path = Path(img) 24 + mime, *_ = guess_type(path) 25 + return cls(path.read_bytes(), mime, alt) 26 + 27 + 28 + @dataclass 29 + class Post: 30 + text: str 31 + media: Optional[Iterable[Media]] = None 32 + lang: Optional[str] = None 33 + 34 + def __post_init__(self): 35 + if len(self.text) > LIMIT: 36 + raise PostTooLongError(f"Text cannot be longer than {LIMIT} characters") 37 + 38 + if not self.lang: 39 + detector = LanguageDetector() 40 + self.lang = detector.detect(self.text).language
+34
not_my_ex/settings.py
··· 1 + from os import getenv 2 + 3 + 4 + class EnvironmentVariableNotFoundError(Exception): 5 + pass 6 + 7 + 8 + BLUESKY = "bsky" 9 + MASTODON = "mstdn" 10 + 11 + BSKY_AGENT = getenv("NOT_MY_EX_BSKY_AGENT", "https://bsky.social") 12 + BSKY_EMAIL = getenv("NOT_MY_EX_BSKY_EMAIL") 13 + BSKY_PASSWORD = getenv("NOT_MY_EX_BSKY_PASSWORD") 14 + 15 + MASTODON_INSTANCE = getenv("NOT_MY_EX_MASTODON_INSTANCE", "https://mastodon.social") 16 + MASTODON_TOKEN = getenv("NOT_MY_EX_MASTODON_TOKEN") 17 + 18 + CLIENTS_AVAILABLE = set( 19 + key 20 + for key, value in ( 21 + (BLUESKY, BSKY_EMAIL and BSKY_PASSWORD), 22 + (MASTODON, MASTODON_TOKEN), 23 + ) 24 + if value 25 + ) 26 + 27 + LIMIT = 300 if BLUESKY in CLIENTS_AVAILABLE else 1024 28 + 29 + if not CLIENTS_AVAILABLE: 30 + raise EnvironmentVariableNotFoundError( 31 + "No clients available. Please set at least one of the following environment variables:\n" 32 + "- NOT_MY_EX_BSKY_EMAIL and NOT_MY_EX_BSKY_PASSWORD" 33 + "- NOT_MY_EX_MASTODON_TOKEN" 34 + )
+753
poetry.lock
··· 1 + # This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. 2 + 3 + [[package]] 4 + name = "anyio" 5 + version = "4.0.0" 6 + description = "High level compatibility layer for multiple asynchronous event loop implementations" 7 + optional = false 8 + python-versions = ">=3.8" 9 + files = [ 10 + {file = "anyio-4.0.0-py3-none-any.whl", hash = "sha256:cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f"}, 11 + {file = "anyio-4.0.0.tar.gz", hash = "sha256:f7ed51751b2c2add651e5747c891b47e26d2a21be5d32d9311dfe9692f3e5d7a"}, 12 + ] 13 + 14 + [package.dependencies] 15 + exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} 16 + idna = ">=2.8" 17 + sniffio = ">=1.1" 18 + 19 + [package.extras] 20 + doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)"] 21 + test = ["anyio[trio]", "coverage[toml] (>=7)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] 22 + trio = ["trio (>=0.22)"] 23 + 24 + [[package]] 25 + name = "appnope" 26 + version = "0.1.3" 27 + description = "Disable App Nap on macOS >= 10.9" 28 + optional = false 29 + python-versions = "*" 30 + files = [ 31 + {file = "appnope-0.1.3-py2.py3-none-any.whl", hash = "sha256:265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e"}, 32 + {file = "appnope-0.1.3.tar.gz", hash = "sha256:02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24"}, 33 + ] 34 + 35 + [[package]] 36 + name = "asttokens" 37 + version = "2.4.1" 38 + description = "Annotate AST trees with source code positions" 39 + optional = false 40 + python-versions = "*" 41 + files = [ 42 + {file = "asttokens-2.4.1-py2.py3-none-any.whl", hash = "sha256:051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24"}, 43 + {file = "asttokens-2.4.1.tar.gz", hash = "sha256:b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0"}, 44 + ] 45 + 46 + [package.dependencies] 47 + six = ">=1.12.0" 48 + 49 + [package.extras] 50 + astroid = ["astroid (>=1,<2)", "astroid (>=2,<4)"] 51 + test = ["astroid (>=1,<2)", "astroid (>=2,<4)", "pytest"] 52 + 53 + [[package]] 54 + name = "backcall" 55 + version = "0.2.0" 56 + description = "Specifications for callback functions passed in to an API" 57 + optional = false 58 + python-versions = "*" 59 + files = [ 60 + {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, 61 + {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, 62 + ] 63 + 64 + [[package]] 65 + name = "backoff" 66 + version = "2.2.1" 67 + description = "Function decoration for backoff and retry" 68 + optional = false 69 + python-versions = ">=3.7,<4.0" 70 + files = [ 71 + {file = "backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8"}, 72 + {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, 73 + ] 74 + 75 + [[package]] 76 + name = "certifi" 77 + version = "2023.7.22" 78 + description = "Python package for providing Mozilla's CA Bundle." 79 + optional = false 80 + python-versions = ">=3.6" 81 + files = [ 82 + {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, 83 + {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, 84 + ] 85 + 86 + [[package]] 87 + name = "click" 88 + version = "8.1.7" 89 + description = "Composable command line interface toolkit" 90 + optional = false 91 + python-versions = ">=3.7" 92 + files = [ 93 + {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, 94 + {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, 95 + ] 96 + 97 + [package.dependencies] 98 + colorama = {version = "*", markers = "platform_system == \"Windows\""} 99 + 100 + [[package]] 101 + name = "colorama" 102 + version = "0.4.6" 103 + description = "Cross-platform colored terminal text." 104 + optional = false 105 + python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" 106 + files = [ 107 + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, 108 + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, 109 + ] 110 + 111 + [[package]] 112 + name = "decorator" 113 + version = "5.1.1" 114 + description = "Decorators for Humans" 115 + optional = false 116 + python-versions = ">=3.5" 117 + files = [ 118 + {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, 119 + {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, 120 + ] 121 + 122 + [[package]] 123 + name = "eld" 124 + version = "1.0.6" 125 + description = "Fast and accurate natural language detection. Detector written in Python. Nito-ELD, ELD." 126 + optional = false 127 + python-versions = ">=3.7,<4.0" 128 + files = [ 129 + {file = "eld-1.0.6-py3-none-any.whl", hash = "sha256:175f570537e8cdf65d48b6e3d2c14438e236d9e5ac5b5b5005d07cd8dab797b2"}, 130 + {file = "eld-1.0.6.tar.gz", hash = "sha256:68f750069cabab1294b54020bd2c7e2ce72b42779261b0446168f1f7171d97a7"}, 131 + ] 132 + 133 + [package.dependencies] 134 + regex = "*" 135 + 136 + [[package]] 137 + name = "exceptiongroup" 138 + version = "1.1.3" 139 + description = "Backport of PEP 654 (exception groups)" 140 + optional = false 141 + python-versions = ">=3.7" 142 + files = [ 143 + {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, 144 + {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, 145 + ] 146 + 147 + [package.extras] 148 + test = ["pytest (>=6)"] 149 + 150 + [[package]] 151 + name = "executing" 152 + version = "2.0.0" 153 + description = "Get the currently executing AST node of a frame, and other information" 154 + optional = false 155 + python-versions = "*" 156 + files = [ 157 + {file = "executing-2.0.0-py2.py3-none-any.whl", hash = "sha256:06df6183df67389625f4e763921c6cf978944721abf3e714000200aab95b0657"}, 158 + {file = "executing-2.0.0.tar.gz", hash = "sha256:0ff053696fdeef426cda5bd18eacd94f82c91f49823a2e9090124212ceea9b08"}, 159 + ] 160 + 161 + [package.extras] 162 + tests = ["asttokens (>=2.1.0)", "coverage", "coverage-enable-subprocess", "ipython", "littleutils", "pytest", "rich"] 163 + 164 + [[package]] 165 + name = "h11" 166 + version = "0.14.0" 167 + description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" 168 + optional = false 169 + python-versions = ">=3.7" 170 + files = [ 171 + {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, 172 + {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, 173 + ] 174 + 175 + [[package]] 176 + name = "httpcore" 177 + version = "0.18.0" 178 + description = "A minimal low-level HTTP client." 179 + optional = false 180 + python-versions = ">=3.8" 181 + files = [ 182 + {file = "httpcore-0.18.0-py3-none-any.whl", hash = "sha256:adc5398ee0a476567bf87467063ee63584a8bce86078bf748e48754f60202ced"}, 183 + {file = "httpcore-0.18.0.tar.gz", hash = "sha256:13b5e5cd1dca1a6636a6aaea212b19f4f85cd88c366a2b82304181b769aab3c9"}, 184 + ] 185 + 186 + [package.dependencies] 187 + anyio = ">=3.0,<5.0" 188 + certifi = "*" 189 + h11 = ">=0.13,<0.15" 190 + sniffio = "==1.*" 191 + 192 + [package.extras] 193 + http2 = ["h2 (>=3,<5)"] 194 + socks = ["socksio (==1.*)"] 195 + 196 + [[package]] 197 + name = "httpx" 198 + version = "0.25.0" 199 + description = "The next generation HTTP client." 200 + optional = false 201 + python-versions = ">=3.8" 202 + files = [ 203 + {file = "httpx-0.25.0-py3-none-any.whl", hash = "sha256:181ea7f8ba3a82578be86ef4171554dd45fec26a02556a744db029a0a27b7100"}, 204 + {file = "httpx-0.25.0.tar.gz", hash = "sha256:47ecda285389cb32bb2691cc6e069e3ab0205956f681c5b2ad2325719751d875"}, 205 + ] 206 + 207 + [package.dependencies] 208 + certifi = "*" 209 + httpcore = ">=0.18.0,<0.19.0" 210 + idna = "*" 211 + sniffio = "*" 212 + 213 + [package.extras] 214 + brotli = ["brotli", "brotlicffi"] 215 + cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] 216 + http2 = ["h2 (>=3,<5)"] 217 + socks = ["socksio (==1.*)"] 218 + 219 + [[package]] 220 + name = "idna" 221 + version = "3.4" 222 + description = "Internationalized Domain Names in Applications (IDNA)" 223 + optional = false 224 + python-versions = ">=3.5" 225 + files = [ 226 + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, 227 + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, 228 + ] 229 + 230 + [[package]] 231 + name = "iniconfig" 232 + version = "2.0.0" 233 + description = "brain-dead simple config-ini parsing" 234 + optional = false 235 + python-versions = ">=3.7" 236 + files = [ 237 + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, 238 + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, 239 + ] 240 + 241 + [[package]] 242 + name = "ipdb" 243 + version = "0.13.13" 244 + description = "IPython-enabled pdb" 245 + optional = false 246 + python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" 247 + files = [ 248 + {file = "ipdb-0.13.13-py3-none-any.whl", hash = "sha256:45529994741c4ab6d2388bfa5d7b725c2cf7fe9deffabdb8a6113aa5ed449ed4"}, 249 + {file = "ipdb-0.13.13.tar.gz", hash = "sha256:e3ac6018ef05126d442af680aad863006ec19d02290561ac88b8b1c0b0cfc726"}, 250 + ] 251 + 252 + [package.dependencies] 253 + decorator = {version = "*", markers = "python_version > \"3.6\""} 254 + ipython = {version = ">=7.31.1", markers = "python_version > \"3.6\""} 255 + tomli = {version = "*", markers = "python_version > \"3.6\" and python_version < \"3.11\""} 256 + 257 + [[package]] 258 + name = "ipython" 259 + version = "8.16.1" 260 + description = "IPython: Productive Interactive Computing" 261 + optional = false 262 + python-versions = ">=3.9" 263 + files = [ 264 + {file = "ipython-8.16.1-py3-none-any.whl", hash = "sha256:0852469d4d579d9cd613c220af7bf0c9cc251813e12be647cb9d463939db9b1e"}, 265 + {file = "ipython-8.16.1.tar.gz", hash = "sha256:ad52f58fca8f9f848e256c629eff888efc0528c12fe0f8ec14f33205f23ef938"}, 266 + ] 267 + 268 + [package.dependencies] 269 + appnope = {version = "*", markers = "sys_platform == \"darwin\""} 270 + backcall = "*" 271 + colorama = {version = "*", markers = "sys_platform == \"win32\""} 272 + decorator = "*" 273 + exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} 274 + jedi = ">=0.16" 275 + matplotlib-inline = "*" 276 + pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} 277 + pickleshare = "*" 278 + prompt-toolkit = ">=3.0.30,<3.0.37 || >3.0.37,<3.1.0" 279 + pygments = ">=2.4.0" 280 + stack-data = "*" 281 + traitlets = ">=5" 282 + typing-extensions = {version = "*", markers = "python_version < \"3.10\""} 283 + 284 + [package.extras] 285 + all = ["black", "curio", "docrepr", "exceptiongroup", "ipykernel", "ipyparallel", "ipywidgets", "matplotlib", "matplotlib (!=3.2.0)", "nbconvert", "nbformat", "notebook", "numpy (>=1.21)", "pandas", "pytest (<7)", "pytest (<7.1)", "pytest-asyncio", "qtconsole", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "stack-data", "testpath", "trio", "typing-extensions"] 286 + black = ["black"] 287 + doc = ["docrepr", "exceptiongroup", "ipykernel", "matplotlib", "pytest (<7)", "pytest (<7.1)", "pytest-asyncio", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "stack-data", "testpath", "typing-extensions"] 288 + kernel = ["ipykernel"] 289 + nbconvert = ["nbconvert"] 290 + nbformat = ["nbformat"] 291 + notebook = ["ipywidgets", "notebook"] 292 + parallel = ["ipyparallel"] 293 + qtconsole = ["qtconsole"] 294 + test = ["pytest (<7.1)", "pytest-asyncio", "testpath"] 295 + test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.21)", "pandas", "pytest (<7.1)", "pytest-asyncio", "testpath", "trio"] 296 + 297 + [[package]] 298 + name = "isort" 299 + version = "5.12.0" 300 + description = "A Python utility / library to sort Python imports." 301 + optional = false 302 + python-versions = ">=3.8.0" 303 + files = [ 304 + {file = "isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, 305 + {file = "isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, 306 + ] 307 + 308 + [package.extras] 309 + colors = ["colorama (>=0.4.3)"] 310 + pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"] 311 + plugins = ["setuptools"] 312 + requirements-deprecated-finder = ["pip-api", "pipreqs"] 313 + 314 + [[package]] 315 + name = "jedi" 316 + version = "0.19.1" 317 + description = "An autocompletion tool for Python that can be used for text editors." 318 + optional = false 319 + python-versions = ">=3.6" 320 + files = [ 321 + {file = "jedi-0.19.1-py2.py3-none-any.whl", hash = "sha256:e983c654fe5c02867aef4cdfce5a2fbb4a50adc0af145f70504238f18ef5e7e0"}, 322 + {file = "jedi-0.19.1.tar.gz", hash = "sha256:cf0496f3651bc65d7174ac1b7d043eff454892c708a87d1b683e57b569927ffd"}, 323 + ] 324 + 325 + [package.dependencies] 326 + parso = ">=0.8.3,<0.9.0" 327 + 328 + [package.extras] 329 + docs = ["Jinja2 (==2.11.3)", "MarkupSafe (==1.1.1)", "Pygments (==2.8.1)", "alabaster (==0.7.12)", "babel (==2.9.1)", "chardet (==4.0.0)", "commonmark (==0.8.1)", "docutils (==0.17.1)", "future (==0.18.2)", "idna (==2.10)", "imagesize (==1.2.0)", "mock (==1.0.1)", "packaging (==20.9)", "pyparsing (==2.4.7)", "pytz (==2021.1)", "readthedocs-sphinx-ext (==2.1.4)", "recommonmark (==0.5.0)", "requests (==2.25.1)", "six (==1.15.0)", "snowballstemmer (==2.1.0)", "sphinx (==1.8.5)", "sphinx-rtd-theme (==0.4.3)", "sphinxcontrib-serializinghtml (==1.1.4)", "sphinxcontrib-websupport (==1.2.4)", "urllib3 (==1.26.4)"] 330 + qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] 331 + testing = ["Django", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] 332 + 333 + [[package]] 334 + name = "matplotlib-inline" 335 + version = "0.1.6" 336 + description = "Inline Matplotlib backend for Jupyter" 337 + optional = false 338 + python-versions = ">=3.5" 339 + files = [ 340 + {file = "matplotlib-inline-0.1.6.tar.gz", hash = "sha256:f887e5f10ba98e8d2b150ddcf4702c1e5f8b3a20005eb0f74bfdbd360ee6f304"}, 341 + {file = "matplotlib_inline-0.1.6-py3-none-any.whl", hash = "sha256:f1f41aab5328aa5aaea9b16d083b128102f8712542f819fe7e6a420ff581b311"}, 342 + ] 343 + 344 + [package.dependencies] 345 + traitlets = "*" 346 + 347 + [[package]] 348 + name = "packaging" 349 + version = "23.2" 350 + description = "Core utilities for Python packages" 351 + optional = false 352 + python-versions = ">=3.7" 353 + files = [ 354 + {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, 355 + {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, 356 + ] 357 + 358 + [[package]] 359 + name = "parso" 360 + version = "0.8.3" 361 + description = "A Python Parser" 362 + optional = false 363 + python-versions = ">=3.6" 364 + files = [ 365 + {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, 366 + {file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"}, 367 + ] 368 + 369 + [package.extras] 370 + qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] 371 + testing = ["docopt", "pytest (<6.0.0)"] 372 + 373 + [[package]] 374 + name = "pexpect" 375 + version = "4.8.0" 376 + description = "Pexpect allows easy control of interactive console applications." 377 + optional = false 378 + python-versions = "*" 379 + files = [ 380 + {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, 381 + {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, 382 + ] 383 + 384 + [package.dependencies] 385 + ptyprocess = ">=0.5" 386 + 387 + [[package]] 388 + name = "pickleshare" 389 + version = "0.7.5" 390 + description = "Tiny 'shelve'-like database with concurrency support" 391 + optional = false 392 + python-versions = "*" 393 + files = [ 394 + {file = "pickleshare-0.7.5-py2.py3-none-any.whl", hash = "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56"}, 395 + {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"}, 396 + ] 397 + 398 + [[package]] 399 + name = "pluggy" 400 + version = "1.3.0" 401 + description = "plugin and hook calling mechanisms for python" 402 + optional = false 403 + python-versions = ">=3.8" 404 + files = [ 405 + {file = "pluggy-1.3.0-py3-none-any.whl", hash = "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7"}, 406 + {file = "pluggy-1.3.0.tar.gz", hash = "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12"}, 407 + ] 408 + 409 + [package.extras] 410 + dev = ["pre-commit", "tox"] 411 + testing = ["pytest", "pytest-benchmark"] 412 + 413 + [[package]] 414 + name = "prompt-toolkit" 415 + version = "3.0.39" 416 + description = "Library for building powerful interactive command lines in Python" 417 + optional = false 418 + python-versions = ">=3.7.0" 419 + files = [ 420 + {file = "prompt_toolkit-3.0.39-py3-none-any.whl", hash = "sha256:9dffbe1d8acf91e3de75f3b544e4842382fc06c6babe903ac9acb74dc6e08d88"}, 421 + {file = "prompt_toolkit-3.0.39.tar.gz", hash = "sha256:04505ade687dc26dc4284b1ad19a83be2f2afe83e7a828ace0c72f3a1df72aac"}, 422 + ] 423 + 424 + [package.dependencies] 425 + wcwidth = "*" 426 + 427 + [[package]] 428 + name = "ptyprocess" 429 + version = "0.7.0" 430 + description = "Run a subprocess in a pseudo terminal" 431 + optional = false 432 + python-versions = "*" 433 + files = [ 434 + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, 435 + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, 436 + ] 437 + 438 + [[package]] 439 + name = "pure-eval" 440 + version = "0.2.2" 441 + description = "Safely evaluate AST nodes without side effects" 442 + optional = false 443 + python-versions = "*" 444 + files = [ 445 + {file = "pure_eval-0.2.2-py3-none-any.whl", hash = "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350"}, 446 + {file = "pure_eval-0.2.2.tar.gz", hash = "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3"}, 447 + ] 448 + 449 + [package.extras] 450 + tests = ["pytest"] 451 + 452 + [[package]] 453 + name = "pygments" 454 + version = "2.16.1" 455 + description = "Pygments is a syntax highlighting package written in Python." 456 + optional = false 457 + python-versions = ">=3.7" 458 + files = [ 459 + {file = "Pygments-2.16.1-py3-none-any.whl", hash = "sha256:13fc09fa63bc8d8671a6d247e1eb303c4b343eaee81d861f3404db2935653692"}, 460 + {file = "Pygments-2.16.1.tar.gz", hash = "sha256:1daff0494820c69bc8941e407aa20f577374ee88364ee10a98fdbe0aece96e29"}, 461 + ] 462 + 463 + [package.extras] 464 + plugins = ["importlib-metadata"] 465 + 466 + [[package]] 467 + name = "pytest" 468 + version = "7.4.3" 469 + description = "pytest: simple powerful testing with Python" 470 + optional = false 471 + python-versions = ">=3.7" 472 + files = [ 473 + {file = "pytest-7.4.3-py3-none-any.whl", hash = "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac"}, 474 + {file = "pytest-7.4.3.tar.gz", hash = "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"}, 475 + ] 476 + 477 + [package.dependencies] 478 + colorama = {version = "*", markers = "sys_platform == \"win32\""} 479 + exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} 480 + iniconfig = "*" 481 + packaging = "*" 482 + pluggy = ">=0.12,<2.0" 483 + tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} 484 + 485 + [package.extras] 486 + testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] 487 + 488 + [[package]] 489 + name = "pytest-isort" 490 + version = "3.1.0" 491 + description = "py.test plugin to check import ordering using isort" 492 + optional = false 493 + python-versions = ">=3.7,<4" 494 + files = [ 495 + {file = "pytest_isort-3.1.0-py3-none-any.whl", hash = "sha256:13e68d84b35d4f79d20d3d165f491bffc9e4b9509f420381a4186118c4454bd3"}, 496 + {file = "pytest_isort-3.1.0.tar.gz", hash = "sha256:067801dc5e54a474330d074d521c815948ff6d5cf0ed3b9d057b78216851186c"}, 497 + ] 498 + 499 + [package.dependencies] 500 + isort = ">=4.0" 501 + pytest = ">=5.0" 502 + 503 + [[package]] 504 + name = "pytest-ruff" 505 + version = "0.1.1" 506 + description = "pytest plugin to check ruff requirements." 507 + optional = false 508 + python-versions = ">=3.7,<4.0" 509 + files = [ 510 + {file = "pytest_ruff-0.1.1-py3-none-any.whl", hash = "sha256:db33c8d32d730d61d372c1ac4615b1036c47a14c781cbc0ae71811c4cadadc47"}, 511 + {file = "pytest_ruff-0.1.1.tar.gz", hash = "sha256:f599768ff3834d6b1d6d26b25a030a5b1dcc9cf187239bd9621a7f25f7d8fe46"}, 512 + ] 513 + 514 + [package.dependencies] 515 + ruff = ">=0.0.242" 516 + 517 + [[package]] 518 + name = "regex" 519 + version = "2023.10.3" 520 + description = "Alternative regular expression module, to replace re." 521 + optional = false 522 + python-versions = ">=3.7" 523 + files = [ 524 + {file = "regex-2023.10.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4c34d4f73ea738223a094d8e0ffd6d2c1a1b4c175da34d6b0de3d8d69bee6bcc"}, 525 + {file = "regex-2023.10.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a8f4e49fc3ce020f65411432183e6775f24e02dff617281094ba6ab079ef0915"}, 526 + {file = "regex-2023.10.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4cd1bccf99d3ef1ab6ba835308ad85be040e6a11b0977ef7ea8c8005f01a3c29"}, 527 + {file = "regex-2023.10.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:81dce2ddc9f6e8f543d94b05d56e70d03a0774d32f6cca53e978dc01e4fc75b8"}, 528 + {file = "regex-2023.10.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c6b4d23c04831e3ab61717a707a5d763b300213db49ca680edf8bf13ab5d91b"}, 529 + {file = "regex-2023.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c15ad0aee158a15e17e0495e1e18741573d04eb6da06d8b84af726cfc1ed02ee"}, 530 + {file = "regex-2023.10.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6239d4e2e0b52c8bd38c51b760cd870069f0bdf99700a62cd509d7a031749a55"}, 531 + {file = "regex-2023.10.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4a8bf76e3182797c6b1afa5b822d1d5802ff30284abe4599e1247be4fd6b03be"}, 532 + {file = "regex-2023.10.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d9c727bbcf0065cbb20f39d2b4f932f8fa1631c3e01fcedc979bd4f51fe051c5"}, 533 + {file = "regex-2023.10.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:3ccf2716add72f80714b9a63899b67fa711b654be3fcdd34fa391d2d274ce767"}, 534 + {file = "regex-2023.10.3-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:107ac60d1bfdc3edb53be75e2a52aff7481b92817cfdddd9b4519ccf0e54a6ff"}, 535 + {file = "regex-2023.10.3-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:00ba3c9818e33f1fa974693fb55d24cdc8ebafcb2e4207680669d8f8d7cca79a"}, 536 + {file = "regex-2023.10.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f0a47efb1dbef13af9c9a54a94a0b814902e547b7f21acb29434504d18f36e3a"}, 537 + {file = "regex-2023.10.3-cp310-cp310-win32.whl", hash = "sha256:36362386b813fa6c9146da6149a001b7bd063dabc4d49522a1f7aa65b725c7ec"}, 538 + {file = "regex-2023.10.3-cp310-cp310-win_amd64.whl", hash = "sha256:c65a3b5330b54103e7d21cac3f6bf3900d46f6d50138d73343d9e5b2900b2353"}, 539 + {file = "regex-2023.10.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:90a79bce019c442604662d17bf69df99090e24cdc6ad95b18b6725c2988a490e"}, 540 + {file = "regex-2023.10.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c7964c2183c3e6cce3f497e3a9f49d182e969f2dc3aeeadfa18945ff7bdd7051"}, 541 + {file = "regex-2023.10.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ef80829117a8061f974b2fda8ec799717242353bff55f8a29411794d635d964"}, 542 + {file = "regex-2023.10.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5addc9d0209a9afca5fc070f93b726bf7003bd63a427f65ef797a931782e7edc"}, 543 + {file = "regex-2023.10.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c148bec483cc4b421562b4bcedb8e28a3b84fcc8f0aa4418e10898f3c2c0eb9b"}, 544 + {file = "regex-2023.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d1f21af4c1539051049796a0f50aa342f9a27cde57318f2fc41ed50b0dbc4ac"}, 545 + {file = "regex-2023.10.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0b9ac09853b2a3e0d0082104036579809679e7715671cfbf89d83c1cb2a30f58"}, 546 + {file = "regex-2023.10.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ebedc192abbc7fd13c5ee800e83a6df252bec691eb2c4bedc9f8b2e2903f5e2a"}, 547 + {file = "regex-2023.10.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:d8a993c0a0ffd5f2d3bda23d0cd75e7086736f8f8268de8a82fbc4bd0ac6791e"}, 548 + {file = "regex-2023.10.3-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:be6b7b8d42d3090b6c80793524fa66c57ad7ee3fe9722b258aec6d0672543fd0"}, 549 + {file = "regex-2023.10.3-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4023e2efc35a30e66e938de5aef42b520c20e7eda7bb5fb12c35e5d09a4c43f6"}, 550 + {file = "regex-2023.10.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0d47840dc05e0ba04fe2e26f15126de7c755496d5a8aae4a08bda4dd8d646c54"}, 551 + {file = "regex-2023.10.3-cp311-cp311-win32.whl", hash = "sha256:9145f092b5d1977ec8c0ab46e7b3381b2fd069957b9862a43bd383e5c01d18c2"}, 552 + {file = "regex-2023.10.3-cp311-cp311-win_amd64.whl", hash = "sha256:b6104f9a46bd8743e4f738afef69b153c4b8b592d35ae46db07fc28ae3d5fb7c"}, 553 + {file = "regex-2023.10.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:bff507ae210371d4b1fe316d03433ac099f184d570a1a611e541923f78f05037"}, 554 + {file = "regex-2023.10.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:be5e22bbb67924dea15039c3282fa4cc6cdfbe0cbbd1c0515f9223186fc2ec5f"}, 555 + {file = "regex-2023.10.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a992f702c9be9c72fa46f01ca6e18d131906a7180950958f766c2aa294d4b41"}, 556 + {file = "regex-2023.10.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7434a61b158be563c1362d9071358f8ab91b8d928728cd2882af060481244c9e"}, 557 + {file = "regex-2023.10.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c2169b2dcabf4e608416f7f9468737583ce5f0a6e8677c4efbf795ce81109d7c"}, 558 + {file = "regex-2023.10.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9e908ef5889cda4de038892b9accc36d33d72fb3e12c747e2799a0e806ec841"}, 559 + {file = "regex-2023.10.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:12bd4bc2c632742c7ce20db48e0d99afdc05e03f0b4c1af90542e05b809a03d9"}, 560 + {file = "regex-2023.10.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:bc72c231f5449d86d6c7d9cc7cd819b6eb30134bb770b8cfdc0765e48ef9c420"}, 561 + {file = "regex-2023.10.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bce8814b076f0ce5766dc87d5a056b0e9437b8e0cd351b9a6c4e1134a7dfbda9"}, 562 + {file = "regex-2023.10.3-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:ba7cd6dc4d585ea544c1412019921570ebd8a597fabf475acc4528210d7c4a6f"}, 563 + {file = "regex-2023.10.3-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b0c7d2f698e83f15228ba41c135501cfe7d5740181d5903e250e47f617eb4292"}, 564 + {file = "regex-2023.10.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:5a8f91c64f390ecee09ff793319f30a0f32492e99f5dc1c72bc361f23ccd0a9a"}, 565 + {file = "regex-2023.10.3-cp312-cp312-win32.whl", hash = "sha256:ad08a69728ff3c79866d729b095872afe1e0557251da4abb2c5faff15a91d19a"}, 566 + {file = "regex-2023.10.3-cp312-cp312-win_amd64.whl", hash = "sha256:39cdf8d141d6d44e8d5a12a8569d5a227f645c87df4f92179bd06e2e2705e76b"}, 567 + {file = "regex-2023.10.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4a3ee019a9befe84fa3e917a2dd378807e423d013377a884c1970a3c2792d293"}, 568 + {file = "regex-2023.10.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76066d7ff61ba6bf3cb5efe2428fc82aac91802844c022d849a1f0f53820502d"}, 569 + {file = "regex-2023.10.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bfe50b61bab1b1ec260fa7cd91106fa9fece57e6beba05630afe27c71259c59b"}, 570 + {file = "regex-2023.10.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fd88f373cb71e6b59b7fa597e47e518282455c2734fd4306a05ca219a1991b0"}, 571 + {file = "regex-2023.10.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3ab05a182c7937fb374f7e946f04fb23a0c0699c0450e9fb02ef567412d2fa3"}, 572 + {file = "regex-2023.10.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dac37cf08fcf2094159922edc7a2784cfcc5c70f8354469f79ed085f0328ebdf"}, 573 + {file = "regex-2023.10.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e54ddd0bb8fb626aa1f9ba7b36629564544954fff9669b15da3610c22b9a0991"}, 574 + {file = "regex-2023.10.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3367007ad1951fde612bf65b0dffc8fd681a4ab98ac86957d16491400d661302"}, 575 + {file = "regex-2023.10.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:16f8740eb6dbacc7113e3097b0a36065a02e37b47c936b551805d40340fb9971"}, 576 + {file = "regex-2023.10.3-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:f4f2ca6df64cbdd27f27b34f35adb640b5d2d77264228554e68deda54456eb11"}, 577 + {file = "regex-2023.10.3-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:39807cbcbe406efca2a233884e169d056c35aa7e9f343d4e78665246a332f597"}, 578 + {file = "regex-2023.10.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:7eece6fbd3eae4a92d7c748ae825cbc1ee41a89bb1c3db05b5578ed3cfcfd7cb"}, 579 + {file = "regex-2023.10.3-cp37-cp37m-win32.whl", hash = "sha256:ce615c92d90df8373d9e13acddd154152645c0dc060871abf6bd43809673d20a"}, 580 + {file = "regex-2023.10.3-cp37-cp37m-win_amd64.whl", hash = "sha256:0f649fa32fe734c4abdfd4edbb8381c74abf5f34bc0b3271ce687b23729299ed"}, 581 + {file = "regex-2023.10.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9b98b7681a9437262947f41c7fac567c7e1f6eddd94b0483596d320092004533"}, 582 + {file = "regex-2023.10.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:91dc1d531f80c862441d7b66c4505cd6ea9d312f01fb2f4654f40c6fdf5cc37a"}, 583 + {file = "regex-2023.10.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82fcc1f1cc3ff1ab8a57ba619b149b907072e750815c5ba63e7aa2e1163384a4"}, 584 + {file = "regex-2023.10.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7979b834ec7a33aafae34a90aad9f914c41fd6eaa8474e66953f3f6f7cbd4368"}, 585 + {file = "regex-2023.10.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ef71561f82a89af6cfcbee47f0fabfdb6e63788a9258e913955d89fdd96902ab"}, 586 + {file = "regex-2023.10.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd829712de97753367153ed84f2de752b86cd1f7a88b55a3a775eb52eafe8a94"}, 587 + {file = "regex-2023.10.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00e871d83a45eee2f8688d7e6849609c2ca2a04a6d48fba3dff4deef35d14f07"}, 588 + {file = "regex-2023.10.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:706e7b739fdd17cb89e1fbf712d9dc21311fc2333f6d435eac2d4ee81985098c"}, 589 + {file = "regex-2023.10.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cc3f1c053b73f20c7ad88b0d1d23be7e7b3901229ce89f5000a8399746a6e039"}, 590 + {file = "regex-2023.10.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6f85739e80d13644b981a88f529d79c5bdf646b460ba190bffcaf6d57b2a9863"}, 591 + {file = "regex-2023.10.3-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:741ba2f511cc9626b7561a440f87d658aabb3d6b744a86a3c025f866b4d19e7f"}, 592 + {file = "regex-2023.10.3-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:e77c90ab5997e85901da85131fd36acd0ed2221368199b65f0d11bca44549711"}, 593 + {file = "regex-2023.10.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:979c24cbefaf2420c4e377ecd1f165ea08cc3d1fbb44bdc51bccbbf7c66a2cb4"}, 594 + {file = "regex-2023.10.3-cp38-cp38-win32.whl", hash = "sha256:58837f9d221744d4c92d2cf7201c6acd19623b50c643b56992cbd2b745485d3d"}, 595 + {file = "regex-2023.10.3-cp38-cp38-win_amd64.whl", hash = "sha256:c55853684fe08d4897c37dfc5faeff70607a5f1806c8be148f1695be4a63414b"}, 596 + {file = "regex-2023.10.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2c54e23836650bdf2c18222c87f6f840d4943944146ca479858404fedeb9f9af"}, 597 + {file = "regex-2023.10.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:69c0771ca5653c7d4b65203cbfc5e66db9375f1078689459fe196fe08b7b4930"}, 598 + {file = "regex-2023.10.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ac965a998e1388e6ff2e9781f499ad1eaa41e962a40d11c7823c9952c77123e"}, 599 + {file = "regex-2023.10.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c0e8fae5b27caa34177bdfa5a960c46ff2f78ee2d45c6db15ae3f64ecadde14"}, 600 + {file = "regex-2023.10.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6c56c3d47da04f921b73ff9415fbaa939f684d47293f071aa9cbb13c94afc17d"}, 601 + {file = "regex-2023.10.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ef1e014eed78ab650bef9a6a9cbe50b052c0aebe553fb2881e0453717573f52"}, 602 + {file = "regex-2023.10.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d29338556a59423d9ff7b6eb0cb89ead2b0875e08fe522f3e068b955c3e7b59b"}, 603 + {file = "regex-2023.10.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9c6d0ced3c06d0f183b73d3c5920727268d2201aa0fe6d55c60d68c792ff3588"}, 604 + {file = "regex-2023.10.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:994645a46c6a740ee8ce8df7911d4aee458d9b1bc5639bc968226763d07f00fa"}, 605 + {file = "regex-2023.10.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:66e2fe786ef28da2b28e222c89502b2af984858091675044d93cb50e6f46d7af"}, 606 + {file = "regex-2023.10.3-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:11175910f62b2b8c055f2b089e0fedd694fe2be3941b3e2633653bc51064c528"}, 607 + {file = "regex-2023.10.3-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:06e9abc0e4c9ab4779c74ad99c3fc10d3967d03114449acc2c2762ad4472b8ca"}, 608 + {file = "regex-2023.10.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:fb02e4257376ae25c6dd95a5aec377f9b18c09be6ebdefa7ad209b9137b73d48"}, 609 + {file = "regex-2023.10.3-cp39-cp39-win32.whl", hash = "sha256:3b2c3502603fab52d7619b882c25a6850b766ebd1b18de3df23b2f939360e1bd"}, 610 + {file = "regex-2023.10.3-cp39-cp39-win_amd64.whl", hash = "sha256:adbccd17dcaff65704c856bd29951c58a1bd4b2b0f8ad6b826dbd543fe740988"}, 611 + {file = "regex-2023.10.3.tar.gz", hash = "sha256:3fef4f844d2290ee0ba57addcec17eec9e3df73f10a2748485dfd6a3a188cc0f"}, 612 + ] 613 + 614 + [[package]] 615 + name = "ruff" 616 + version = "0.1.3" 617 + description = "An extremely fast Python linter, written in Rust." 618 + optional = false 619 + python-versions = ">=3.7" 620 + files = [ 621 + {file = "ruff-0.1.3-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:b46d43d51f7061652eeadb426a9e3caa1e0002470229ab2fc19de8a7b0766901"}, 622 + {file = "ruff-0.1.3-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:b8afeb9abd26b4029c72adc9921b8363374f4e7edb78385ffaa80278313a15f9"}, 623 + {file = "ruff-0.1.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca3cf365bf32e9ba7e6db3f48a4d3e2c446cd19ebee04f05338bc3910114528b"}, 624 + {file = "ruff-0.1.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4874c165f96c14a00590dcc727a04dca0cfd110334c24b039458c06cf78a672e"}, 625 + {file = "ruff-0.1.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eec2dd31eed114e48ea42dbffc443e9b7221976554a504767ceaee3dd38edeb8"}, 626 + {file = "ruff-0.1.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:dc3ec4edb3b73f21b4aa51337e16674c752f1d76a4a543af56d7d04e97769613"}, 627 + {file = "ruff-0.1.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2e3de9ed2e39160800281848ff4670e1698037ca039bda7b9274f849258d26ce"}, 628 + {file = "ruff-0.1.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c595193881922cc0556a90f3af99b1c5681f0c552e7a2a189956141d8666fe8"}, 629 + {file = "ruff-0.1.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f75e670d529aa2288cd00fc0e9b9287603d95e1536d7a7e0cafe00f75e0dd9d"}, 630 + {file = "ruff-0.1.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:76dd49f6cd945d82d9d4a9a6622c54a994689d8d7b22fa1322983389b4892e20"}, 631 + {file = "ruff-0.1.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:918b454bc4f8874a616f0d725590277c42949431ceb303950e87fef7a7d94cb3"}, 632 + {file = "ruff-0.1.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d8859605e729cd5e53aa38275568dbbdb4fe882d2ea2714c5453b678dca83784"}, 633 + {file = "ruff-0.1.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:0b6c55f5ef8d9dd05b230bb6ab80bc4381ecb60ae56db0330f660ea240cb0d4a"}, 634 + {file = "ruff-0.1.3-py3-none-win32.whl", hash = "sha256:3e7afcbdcfbe3399c34e0f6370c30f6e529193c731b885316c5a09c9e4317eef"}, 635 + {file = "ruff-0.1.3-py3-none-win_amd64.whl", hash = "sha256:7a18df6638cec4a5bd75350639b2bb2a2366e01222825562c7346674bdceb7ea"}, 636 + {file = "ruff-0.1.3-py3-none-win_arm64.whl", hash = "sha256:12fd53696c83a194a2db7f9a46337ce06445fb9aa7d25ea6f293cf75b21aca9f"}, 637 + {file = "ruff-0.1.3.tar.gz", hash = "sha256:3ba6145369a151401d5db79f0a47d50e470384d0d89d0d6f7fab0b589ad07c34"}, 638 + ] 639 + 640 + [[package]] 641 + name = "six" 642 + version = "1.16.0" 643 + description = "Python 2 and 3 compatibility utilities" 644 + optional = false 645 + python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" 646 + files = [ 647 + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, 648 + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, 649 + ] 650 + 651 + [[package]] 652 + name = "sniffio" 653 + version = "1.3.0" 654 + description = "Sniff out which async library your code is running under" 655 + optional = false 656 + python-versions = ">=3.7" 657 + files = [ 658 + {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, 659 + {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, 660 + ] 661 + 662 + [[package]] 663 + name = "stack-data" 664 + version = "0.6.3" 665 + description = "Extract data from python stack frames and tracebacks for informative displays" 666 + optional = false 667 + python-versions = "*" 668 + files = [ 669 + {file = "stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695"}, 670 + {file = "stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9"}, 671 + ] 672 + 673 + [package.dependencies] 674 + asttokens = ">=2.1.0" 675 + executing = ">=1.2.0" 676 + pure-eval = "*" 677 + 678 + [package.extras] 679 + tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] 680 + 681 + [[package]] 682 + name = "tomli" 683 + version = "2.0.1" 684 + description = "A lil' TOML parser" 685 + optional = false 686 + python-versions = ">=3.7" 687 + files = [ 688 + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, 689 + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, 690 + ] 691 + 692 + [[package]] 693 + name = "traitlets" 694 + version = "5.12.0" 695 + description = "Traitlets Python configuration system" 696 + optional = false 697 + python-versions = ">=3.8" 698 + files = [ 699 + {file = "traitlets-5.12.0-py3-none-any.whl", hash = "sha256:81539f07f7aebcde2e4b5ab76727f53eabf18ad155c6ed7979a681411602fa47"}, 700 + {file = "traitlets-5.12.0.tar.gz", hash = "sha256:833273bf645d8ce31dcb613c56999e2e055b1ffe6d09168a164bcd91c36d5d35"}, 701 + ] 702 + 703 + [package.extras] 704 + docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] 705 + test = ["argcomplete (>=3.0.3)", "mypy (>=1.6.0)", "pre-commit", "pytest (>=7.0,<7.5)", "pytest-mock", "pytest-mypy-testing"] 706 + 707 + [[package]] 708 + name = "typer" 709 + version = "0.9.0" 710 + description = "Typer, build great CLIs. Easy to code. Based on Python type hints." 711 + optional = false 712 + python-versions = ">=3.6" 713 + files = [ 714 + {file = "typer-0.9.0-py3-none-any.whl", hash = "sha256:5d96d986a21493606a358cae4461bd8cdf83cbf33a5aa950ae629ca3b51467ee"}, 715 + {file = "typer-0.9.0.tar.gz", hash = "sha256:50922fd79aea2f4751a8e0408ff10d2662bd0c8bbfa84755a699f3bada2978b2"}, 716 + ] 717 + 718 + [package.dependencies] 719 + click = ">=7.1.1,<9.0.0" 720 + typing-extensions = ">=3.7.4.3" 721 + 722 + [package.extras] 723 + all = ["colorama (>=0.4.3,<0.5.0)", "rich (>=10.11.0,<14.0.0)", "shellingham (>=1.3.0,<2.0.0)"] 724 + dev = ["autoflake (>=1.3.1,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)", "pre-commit (>=2.17.0,<3.0.0)"] 725 + doc = ["cairosvg (>=2.5.2,<3.0.0)", "mdx-include (>=1.4.1,<2.0.0)", "mkdocs (>=1.1.2,<2.0.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "pillow (>=9.3.0,<10.0.0)"] 726 + test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6.0.0)", "mypy (==0.910)", "pytest (>=4.4.0,<8.0.0)", "pytest-cov (>=2.10.0,<5.0.0)", "pytest-sugar (>=0.9.4,<0.10.0)", "pytest-xdist (>=1.32.0,<4.0.0)", "rich (>=10.11.0,<14.0.0)", "shellingham (>=1.3.0,<2.0.0)"] 727 + 728 + [[package]] 729 + name = "typing-extensions" 730 + version = "4.8.0" 731 + description = "Backported and Experimental Type Hints for Python 3.8+" 732 + optional = false 733 + python-versions = ">=3.8" 734 + files = [ 735 + {file = "typing_extensions-4.8.0-py3-none-any.whl", hash = "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0"}, 736 + {file = "typing_extensions-4.8.0.tar.gz", hash = "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"}, 737 + ] 738 + 739 + [[package]] 740 + name = "wcwidth" 741 + version = "0.2.8" 742 + description = "Measures the displayed width of unicode strings in a terminal" 743 + optional = false 744 + python-versions = "*" 745 + files = [ 746 + {file = "wcwidth-0.2.8-py2.py3-none-any.whl", hash = "sha256:77f719e01648ed600dfa5402c347481c0992263b81a027344f3e1ba25493a704"}, 747 + {file = "wcwidth-0.2.8.tar.gz", hash = "sha256:8705c569999ffbb4f6a87c6d1b80f324bd6db952f5eb0b95bc07517f4c1813d4"}, 748 + ] 749 + 750 + [metadata] 751 + lock-version = "2.0" 752 + python-versions = "^3.9,<3.13" 753 + content-hash = "f069f3cd33f3543522b7c16755aefce0755a06999ec0b587fd58e7ccad980547"
+30
pyproject.toml
··· 1 + [tool.poetry] 2 + name = "not_my_ex" 3 + version = "0.0.1" 4 + description = "Tiny CLI to post simultaneously to Mastodon and Bluesky" 5 + authors = ["Eduardo Cuducos <4732915+cuducos@users.noreply.github.com>"] 6 + license = "GPL-3" 7 + readme = "README.md" 8 + 9 + [tool.poetry.dependencies] 10 + python = "^3.9,<3.13" 11 + backoff = "^2.2.1" 12 + eld = "^1.0.6" 13 + httpx = "^0.25.0" 14 + typer = "^0.9.0" 15 + 16 + [tool.poetry.group.dev.dependencies] 17 + ipdb = "^0.13.13" 18 + pytest = "^7.4.2" 19 + pytest-isort = "^3.1.0" 20 + pytest-ruff = "^0.1.1" 21 + 22 + [tool.pytest.ini_options] 23 + addopts = "--isort --ruff" 24 + 25 + [tool.isort] 26 + profile = "black" 27 + 28 + [build-system] 29 + requires = ["poetry-core"] 30 + build-backend = "poetry.core.masonry.api"
+27
tests/conftest.py
··· 1 + from base64 import b64decode 2 + from os import environ 3 + from pathlib import Path 4 + from tempfile import NamedTemporaryFile 5 + 6 + from pytest import fixture 7 + 8 + ONE_PIXEL_IMAGE = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NgAAIAAAUAAR4f7BQAAAAASUVORK5CYII=" 9 + SETTINGS = { 10 + "BSKY_EMAIL": "python@mailinator.com", 11 + "BSKY_PASSWORD": "fourty2", 12 + "MASTODON_TOKEN": "40two", 13 + } 14 + 15 + 16 + def pytest_configure(config): 17 + for key, value in SETTINGS.items(): 18 + environ[f"NOT_MY_EX_{key}"] = value 19 + return config 20 + 21 + 22 + @fixture 23 + def image(): 24 + with NamedTemporaryFile(suffix=".png") as tmp: 25 + content = b64decode(ONE_PIXEL_IMAGE) 26 + Path(tmp.name).write_bytes(content) 27 + yield (tmp.name, content)
+120
tests/test_bluesky.py
··· 1 + from unittest.mock import patch 2 + 3 + from pytest import raises 4 + 5 + from not_my_ex import settings 6 + from not_my_ex.bluesky import Bluesky, BlueskyCredentialsNotFoundError, BlueskyError 7 + from not_my_ex.posts import Media, Post 8 + 9 + 10 + def test_bsky_client_raises_error_when_not_set(): 11 + with patch.object(settings, "CLIENTS_AVAILABLE", new_callable=set): 12 + with raises(BlueskyCredentialsNotFoundError): 13 + Bluesky() 14 + 15 + 16 + def test_bsky_client_uses_the_correct_credentials(): 17 + with patch("not_my_ex.bluesky.post") as mock: 18 + Bluesky() 19 + mock.assert_called_once_with( 20 + f"{settings.BSKY_AGENT}/xrpc/com.atproto.server.createSession", 21 + json={ 22 + "identifier": settings.BSKY_EMAIL, 23 + "password": settings.BSKY_PASSWORD, 24 + }, 25 + ) 26 + 27 + 28 + def test_bsky_client_raises_error_for_invalid_credentials(): 29 + with patch("not_my_ex.bluesky.post") as mock: 30 + mock.return_value.status_code = 401 31 + mock.return_value.json.return_value = {"error": "SomeError", "message": "Oops"} 32 + with raises(BlueskyError): 33 + Bluesky() 34 + 35 + 36 + def test_bsky_client_gets_a_jwt_token_and_did(): 37 + with patch("not_my_ex.bluesky.post") as mock: 38 + mock.return_value.json.return_value = { 39 + "accessJwt": "a very long string", 40 + "did": "42", 41 + "handle": "cuducos", 42 + } 43 + bsky = Bluesky() 44 + assert bsky.token == "a very long string" 45 + assert bsky.did == "42" 46 + assert bsky.handle == "cuducos" 47 + 48 + 49 + def test_bsky_client_post(): 50 + with patch("not_my_ex.bluesky.post"): 51 + bsky = Bluesky() 52 + 53 + bsky.token = "fourty-two" 54 + bsky.did = "42" 55 + bsky.handle = "cuducos" 56 + post = Post("Hello") 57 + with patch("not_my_ex.bluesky.post") as mock: 58 + mock.return_value.status_code = 200 59 + mock.return_value.json.return_value = { 60 + "uri": "at://did:plc:42/app.bsky.feed.post/fOrTy2", 61 + "cid": "meh", 62 + } 63 + assert bsky.post(post) == "https://bsky.app/profile/cuducos/post/fOrTy2" 64 + 65 + 66 + def test_bsky_client_post_raises_error_from_server(): 67 + with patch("not_my_ex.bluesky.post"): 68 + bsky = Bluesky() 69 + 70 + post = Post("Hello") 71 + with patch("not_my_ex.bluesky.post") as mock: 72 + mock.return_value.status_code = 501 73 + mock.return_value.json.return_value = {"error": "SomeError", "message": "Oops"} 74 + with raises(BlueskyError): 75 + bsky.post(post) 76 + 77 + 78 + def test_bsky_client_post_data_includes_urls_in_facets(): 79 + with patch("not_my_ex.bluesky.post"): 80 + bsky = Bluesky() 81 + 82 + text = "โœจ example mentioning @atproto.com to share the URL ๐Ÿ‘จโ€โค๏ธโ€๐Ÿ‘จ https://en.wikipedia.org/wiki/CBOR." 83 + data = bsky.data(text, None) 84 + assert data["record"]["facets"] == [ 85 + { 86 + "index": {"byteStart": 74, "byteEnd": 108}, 87 + "features": [ 88 + { 89 + "$type": "app.bsky.richtext.facet#link", 90 + "uri": "https://en.wikipedia.org/wiki/CBOR", 91 + } 92 + ], 93 + } 94 + ] 95 + 96 + 97 + def test_bsky_client_post_data_includes_images_blobs(): 98 + with patch("not_my_ex.bluesky.post"): 99 + bsky = Bluesky() 100 + 101 + bsky.token = "token" 102 + bsky.did = "did" 103 + 104 + with patch("not_my_ex.bluesky.post") as mock: 105 + mock.return_value.status_code = 200 106 + mock.return_value.json.return_value = {"blob": "42"} 107 + data = bsky.data("hi", (Media(b"42", "image/png", "my alt text"),)) 108 + mock.assert_any_call( 109 + f"{settings.BSKY_AGENT}/xrpc/com.atproto.repo.uploadBlob", 110 + headers={ 111 + "Authorization": "Bearer token", 112 + "Content-type": "image/png", 113 + }, 114 + data=b"42", 115 + ) 116 + 117 + assert data["record"]["embed"] == { 118 + "$type": "app.bsky.embed.images", 119 + "images": [{"alt": "my alt text", "image": "42"}], 120 + }
+92
tests/test_mastodon.py
··· 1 + from unittest.mock import ANY, Mock, patch 2 + 3 + from pytest import raises 4 + 5 + from not_my_ex import settings 6 + from not_my_ex.mastodon import Mastodon, MastodonCredentialsNotFoundError, MastodonError 7 + from not_my_ex.posts import Media, Post 8 + 9 + 10 + def test_mastodon_client_raises_error_when_not_set(): 11 + with patch.object(settings, "CLIENTS_AVAILABLE", new_callable=set): 12 + with raises(MastodonCredentialsNotFoundError): 13 + Mastodon() 14 + 15 + 16 + def test_mastodon_client_post_raises_error_from_server(): 17 + with patch("not_my_ex.mastodon.post") as mock: 18 + mock.return_value.status_code = 401 19 + mock.return_value.json.return_value = {"error": "oops"} 20 + post = Post("Hello") 21 + with raises(MastodonError): 22 + Mastodon().post(post) 23 + 24 + 25 + def test_mastodon_client_post(): 26 + with patch("not_my_ex.mastodon.post") as mock: 27 + mock.return_value.status_code = 200 28 + mock.return_value.json.return_value = {"url": "https://tech.lgbt/@cuducos/42"} 29 + mastodon = Mastodon() 30 + post = Post("Hello") 31 + 32 + assert mastodon.post(post) == "https://tech.lgbt/@cuducos/42" 33 + mock.assert_called_once_with( 34 + f"{settings.MASTODON_INSTANCE}/api/v1/statuses", 35 + headers={"Authorization": "Bearer 40two"}, 36 + json={"status": post.text}, 37 + ) 38 + 39 + 40 + def test_mastodon_client_upload(): 41 + mastodon = Mastodon() 42 + media = Media(b"42", "image/png", "desc") 43 + 44 + with patch("not_my_ex.mastodon.post") as mock: 45 + mock.return_value.status_code = 200 46 + mock.return_value.json.return_value = {"id": 42} 47 + resp = mastodon.upload(media) 48 + 49 + assert resp == 42 50 + mock.assert_called_once_with( 51 + f"{settings.MASTODON_INSTANCE}/api/v2/media", 52 + headers={"Authorization": "Bearer 40two"}, 53 + data={"description": "desc"}, 54 + files={"file": ("image.png", ANY, "image/png")}, 55 + ) 56 + 57 + 58 + def test_mastodon_client_upload_with_post_processing(): 59 + mastodon = Mastodon() 60 + media = Media(b"42", "image/png", "desc") 61 + 62 + with patch("not_my_ex.mastodon.post") as post: 63 + post.return_value.status_code = 202 64 + post.return_value.json.return_value = {"id": 42} 65 + 66 + with patch("not_my_ex.mastodon.get") as get: 67 + processing, ok = Mock(), Mock() 68 + processing.status_code = 206 69 + ok.status_code = 200 70 + get.side_effect = (processing, processing, ok) 71 + 72 + assert mastodon.upload(media) == 42 73 + assert 3 == get.call_count 74 + 75 + 76 + def test_mastodon_client_post_with_media(): 77 + with patch.object(Mastodon, "upload") as upload: 78 + upload.return_value = 42 79 + with patch("not_my_ex.mastodon.post") as mock: 80 + mock.return_value.status_code = 200 81 + mock.return_value.json.return_value = { 82 + "url": "https://tech.lgbt/@cuducos/42" 83 + } 84 + mastodon = Mastodon() 85 + post = Post("Hello", (Media(b"42", "image/png", "my alt text"),)) 86 + 87 + assert mastodon.post(post) == "https://tech.lgbt/@cuducos/42" 88 + mock.assert_called_once_with( 89 + f"{settings.MASTODON_INSTANCE}/api/v1/statuses", 90 + headers={"Authorization": "Bearer 40two"}, 91 + json={"status": post.text, "media_ids": [42]}, 92 + )
+10
tests/test_media.py
··· 1 + from not_my_ex.posts import Media 2 + 3 + 4 + def test_media_from_img(image): 5 + path, content = image 6 + alt = "fourty-two" 7 + media = Media.from_img(path, alt=alt) 8 + assert content == media.content 9 + assert alt == media.alt 10 + assert "image/png" == media.mime
+21
tests/test_posts.py
··· 1 + from pytest import raises 2 + 3 + from not_my_ex.posts import Media, Post, PostTooLongError 4 + 5 + 6 + def test_post(): 7 + post = Post("forty-two") 8 + assert "forty-two" == post.text 9 + assert post.media is None 10 + assert "en" == post.lang 11 + 12 + 13 + def test_post_with_media(image): 14 + img, *_ = image 15 + post = Post("forty-two", media=(Media.from_img(img, "one pixel"),)) 16 + assert 1 == len(post.media) 17 + 18 + 19 + def test_post_raises_error_when_too_long(): 20 + with raises(PostTooLongError): 21 + Post("forty-two" * 42)