Commit graph

13 commits

Author SHA1 Message Date
Reedy 333663f443 Add tox.ini for python linting
Base file from:
c4790b589b/tox.ini

Most failing rules disabled, rather than fixing now

Bug: T355090
Change-Id: Ie0f499809d84b94b95dddac9abd433c8f81e04ce
(cherry picked from commit 28f297f1f7)
2024-01-16 15:46:33 +00:00
Kosta Harlan ab98badbb6 catpcha.py: Use opts.output
Script fails on macOS Python 3.9.2 otherwise, with "name 'output' is not
defined".

Change-Id: Id3df19b4a4dedf69f860f1a41348770ac1207377
(cherry picked from commit d1bc02e2fb)
2024-01-16 14:03:09 +00:00
Reedy 12794e686c captcha(-old).py: Fix undefined variables and remove some unused ones
Change-Id: I13b46cceb68a0118274a1fe9d3547b193f62b53d
(cherry picked from commit 1a305a40ee)
2024-01-15 20:24:05 +00:00
Reedy 0ee15ce823 captcha(-old).py: Remove trailing semicolon
Change-Id: I7b6458fe24485c995c47c249d6572be37e39d1a1
2024-01-15 14:12:51 +00:00
Reedy 0414f33954 captcha(-old).py: Support Pillow 10
getsize() function was removed in version 10

Bug: T354099
Change-Id: I019a5a89de4340d73a938c907c0a6f5cc22a659c
(cherry picked from commit fbf8d90063)
2024-01-05 15:36:19 +00:00
Gergő Tisza 3953e838f8
Make badwordlist optional
Follows up I8e758023b38a4d450a0bf02b3bfc0b5033959be7.

Bug: T277936
Change-Id: I20f896f86875c9b11e8a998bca6e08f8c38554c1
2023-07-28 15:03:04 -07:00
Reedy db06ec876b FancyCaptcha: Deprecate and add alternative for blacklist parameter in generation
Bug: T277936
Change-Id: I8e758023b38a4d450a0bf02b3bfc0b5033959be7
2022-07-04 16:16:20 +00:00
Reedy 3b477b543d Update captch(-old)?.py shebang to python 3
Bug: T268468
Change-Id: I9e3918939365a3142772627a192b0d92be7d7000
2020-12-01 14:16:56 +00:00
Reedy b86cc888a5 Fix characters typo in captcha python scripts
Change-Id: I855a43d3bd331974c63b4eacf8178805db6de7c1
2020-10-28 19:45:02 +00:00
Reedy 69512c8046 Use floor division (//) when calculating chunks in python
Also remove int() casting from captcha-old.py which was added
in 66152162fe but diverges from
captcha.py

Most of the code should be the same in these two files should
be the same bar the actual image processing...

Bug: T263223
Follows-Up: If4f6bc9048aceacc41538c001255425e848fd8e9
Change-Id: I3062e64fc380022ca9fee793bc522f212eb873d3
2020-09-18 17:18:53 +00:00
Florian Schmidt 66152162fe Add threads parameter to captcha.py for multithread CAPTCHA generation
Bug: T157734
Change-Id: If4f6bc9048aceacc41538c001255425e848fd8e9
2017-06-12 17:11:58 +01:00
Reedy eea24979ed Make captcha python scripts python3 compatible
Remove trailing whitespace

Bug: T157888
Change-Id: I8b2da97c40f8748a1aad5509dddff638a7f3f945
2017-02-12 01:21:52 +00:00
Reedy 7c3d8dc62a Re-add old version of captcha.py without Tim's OCR improvements
Effectively reverts the following two commits:
6f286e52db
df4806c64c

Due to lack of apparent consensus to do T141490, yet...

To be used for cron job regeneration of captchas on a regular basis

Change-Id: Iaedf0d4903c0fd9a9cca3e648a2a9691f54c6af8
2016-11-04 18:49:19 +00:00