Skip to content

chore: Remove django lint-ignore raise inside except with no from - #254

Open
hoodmane wants to merge 1 commit into
mainfrom
hoodmane/remove-one-django-lint-ignore
Open

chore: Remove django lint-ignore raise inside except with no from#254
hoodmane wants to merge 1 commit into
mainfrom
hoodmane/remove-one-django-lint-ignore

Conversation

@hoodmane

Copy link
Copy Markdown
Contributor

And clean up some debug code that I noticed from the lints.

Comment thread packages/django-cf/django_cf/db/backends/d1/base.py
@ask-bonk

ask-bonk Bot commented Sep 10, 2026

Copy link
Copy Markdown

I'm Bonk, and I've done a quick review of your PR.

Removes obsolete Django exception wrappers and eager/lazy run_sync setup.

  1. P1 One inline review comment posted.

github run

from django.core.files.storage import Storage
from django.utils.deconstruct import deconstructible
from js import Uint8Array
from pyodide.ffi import run_sync

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There shouldn't be any case where from js import Uint8Array works but from pyodide.ffi import run_sync does not, so the guard before was pointless.

Comment on lines +10 to +16
try:
from pyodide.ffi import run_sync
except ImportError:

def run_sync(a):
raise RuntimeError("Code not running inside a worker!")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably pointless to guard it like this since the other file just assumes we're in Pyodide.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess we can just remove this guard. There was some host-side tests that were not running in workers before, but I cleaned them up.

And clean up some debug code that I noticed from the lints.
@hoodmane
hoodmane force-pushed the hoodmane/remove-one-django-lint-ignore branch from 96af9c3 to f1d26f6 Compare September 10, 2026 19:29

@ryanking13 ryanking13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

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.

2 participants