Skip to content

refactor: clean up all code to best readability standards#20

Closed
kRxZykRxZy wants to merge 1 commit into
mainfrom
clean-up
Closed

refactor: clean up all code to best readability standards#20
kRxZykRxZy wants to merge 1 commit into
mainfrom
clean-up

Conversation

@kRxZykRxZy

Copy link
Copy Markdown
Collaborator

With a bit of help from OpenCode and github copilot, here is the changlog (its just fixes and cleanups etc and proper async execution)

  • fixed sql injection vulnerability in database.py (column whitelist)
  • fixed async bug in blockbits.py (get_response called without await)
  • fixed ZeroDivisionError in project_commands.py when views is 0
  • switched from requests.post to aiohttp in experimental_commands.py
  • fixed missing private/ prefix in remove_line_by_index call
  • replaced print() with logging across codebase
  • replaced type() == with isinstance() for type checks
  • renamed shadowed id variables to project_id/studio_id/topic_id
  • extracted _extract_project_id/_extract_id helper functions
  • add type hints and return annotations throughout
  • remove unused imports (scratchattach, time, traceback, etc.)
  • use dotenv for token loading instead of reading files
  • simplify nested logic in search/user commands
  • auto-format all files with ruff

- Fix SQL injection vulnerability in database.py (column whitelist)
- Fix async bug in blockbits.py (get_response called without await)
- Fix ZeroDivisionError in project_commands.py when views == 0
- Switch requests.post to aiohttp in experimental_commands.py
- Fix missing private/ prefix in remove_line_by_index call
- Replace print() with logging across codebase
- Replace type() == with isinstance() for type checks
- Rename shadowed id variables to project_id/studio_id/topic_id
- Extract _extract_project_id/_extract_id helper functions
- Add type hints and return annotations throughout
- Remove unused imports (scratchattach, time, traceback, etc.)
- Use dotenv for token loading instead of reading files
- Simplify nested logic in search/user commands
- Auto-format all files with ruff
@kRxZykRxZy

kRxZykRxZy commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator Author

why am i jonny garret in commits...

also, please dont instant merge, it can have vulnerabilites and errors, ill test it here and maybe you can do some testing if you want then maybe push to main soon.

@Fluffyscratch

Fluffyscratch commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Nice, I see plenty of interesting changes! I also see a few things I'd like to revert before merging, so I'm closing the pull request but keeping the branch open to contribute to it. Thanks for doing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants