Add support for drawing with RGBA colors
Taking a look at the codebase before I say I'll be responsible, but looking at this
but looking at this
Something wrong?
If something is unclear, ask.
Just don't know anything about the code, coming up with questions as I go.
so far:
- what does the
bhprefix mean? Can't find an explanation, is it short for brushshe? - unrelated to this ticket, but a way that I'll often attempt to parse a repo is the tests. would you be opposed to me looking at throwing some testing up around this because it's something I enjoy (I'll make another ticket)
- Yes
- Yes, of course
Okay, another question (sorry just kinda starting to poke at this as I have time on break)
in paint_tools.py PaintTools.brush(), is there a reason that you have all of those functions defined inside of the method? I have preferences against that in cases where it's not particularly useful (reasons: shorter functions are more readable, and performance: don't have to allocate new functions every PaintTools.brush() call if you use a reusable function.
for prev_x, prev_y, and point_history, my gut feeling is that they'd work just as well as arguments and returns, or as instance properties.
not an urgent refactor or anything, but hsppy to produce a refactor PR to show what I mean. Relatively minor changes, as long as I haven't missed anything <3
Sorry, I'm kinda an old Python head, and I can get opinionated (let me know if I should zip it <3)
semi related to last comment: how would you feel about me wrapping this up in a proper python package, so it can be installed in a virtualenv?
You can create a package for installation in venv if the application can be run the same way as before (python Brushshe/main.py). Regarding paint_tools.py, do you mean nested functions? I used nested functions because they have no meaning outside the function they're nested in.
you're paying a performance cost every time you have to recreate those functions, and it really hampers readability. TBH it makes the readability bad enough that I'm inclined to find something else to work on after spending some time poking through the repo
I understand, so I support getting rid of nested functions. I've already done some refactoring—before that, the files were large and difficult to maintain. I tried to create a simple and understandable structure.
пн, 8 июн. 2026 г., 9:29 PM Dandelion Good @.***>:
pretty-weed left a comment (limafresh/Brushshe#68) https://github.com/limafresh/Brushshe/issues/68#issuecomment-4652154048
you're paying a performance cost every time you have to recreate those functions, and it really hampers readability. TBH it makes the readability bad enough that I'm inclined to find something else to work on after spending some time poking through the repo
— Reply to this email directly, view it on GitHub https://github.com/limafresh/Brushshe/issues/68?email_source=notifications&email_token=BJODFIHNNB63PEJ4XDQSRNT464AZBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRVGIYTKNBQGQ4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4652154048, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJODFIHJN6DSSCTXOJJSRE3464AZBAVCNFSM6AAAAACXFEQWFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DMNJSGE2TIMBUHA . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS https://github.com/notifications/mobile/ios/BJODFIC3CQT6ON23QCNVVEL464AZBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRVGIYTKNBQGQ4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG and Android https://github.com/notifications/mobile/android/BJODFIBABSTERPJF5VCCLGD464AZBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRVGIYTKNBQGQ4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA. Download it today! You are receiving this because you authored the thread.Message ID: @.***>
Cool thank you so much for understanding, I don't want to be a pain or tell you how to do your thing, just didn't like reading it myself.
I'll get you a refactor PR today
You can create a package for installation in venv if the application can be run the same way as before (
python Brushshe/main.py). Regarding paint_tools.py, do you mean nested functions? I used nested functions because they have no meaning outside the function they're nested in.
How do you feel about pushing folks to python -m Brushshe.main ? the module invocation would allow for relative imports in main.py, but I don't want to step on any toes
That's also a good option if it makes the code better.
I appreciate you. thank you for taking the time to hold my hand <3 I can give feedback on issues, I'd love to give feedback on repository owners and how responsive and kind they are ⭐ ⭐ 🌟 ⭐ ⭐
Thanks!
@pretty-weed Hello, sorry, but I had to revert to the old structure. There are serious reasons for this that I didn't consider at the time:
- Difficulties with packaging in PyInstaller (perhaps the most important one)
- Increased code complexity without significant advantages: now you need to test not only running the source code through Python and packaged OS builds, but also the Python package.
I took the rest of your suggestions into account: I left your corrections for messagebox and my removal of nested functions.