Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix django-stubs-ext missing breaking a production setup #2110

Merged
merged 5 commits into from
Feb 26, 2024

Conversation

richardebeling
Copy link
Member

As django-stubs-ext is required so that from django_stubs_ext import StrOrPromise doesn't fail on production, but I also don't want to duplicate the dependency version number across two files.

Opinions? Is there a better way? Maybe by specifying dependencies in pyproject.toml or something?

Copy link
Member

@janno42 janno42 left a comment

Choose a reason for hiding this comment

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

fine for me

@niklasmohrin
Copy link
Member

Couldn't we just do

from typing import TYPE_CHECKING, Any

if TYPE_CHECKING:
    from django_stubs_ext import StrOrPromise
else:
    StrOrPromise = Any

@richardebeling richardebeling changed the title Make django-stubs a non-dev-requirement Fix django-stubs-ext missing breaking a production setup Feb 5, 2024
@richardebeling richardebeling merged commit 06bfc12 into e-valuation:main Feb 26, 2024
11 of 12 checks passed
@richardebeling richardebeling deleted the requirements branch February 26, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants