-
-
Notifications
You must be signed in to change notification settings - Fork 133
Switch to uv to manage dev dependencies
#797
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,3 +11,6 @@ trim_trailing_whitespace = true | |
|
|
||
| [*.{py, pyi}] | ||
| indent_size = 4 | ||
|
|
||
| [*.toml] | ||
| indent_size = 2 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,3 +12,4 @@ out/ | |
| pip-wheel-metadata/ | ||
| stubgen/ | ||
| build/ | ||
| dist/ | ||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,34 +1,116 @@ | ||||||||
| [project] | ||||||||
| name = "djangorestframework-stubs" | ||||||||
| version = "3.16.3" | ||||||||
| requires-python = ">=3.10" | ||||||||
| description = "PEP-484 stubs for django-rest-framework" | ||||||||
| readme = "README.md" | ||||||||
| license = "MIT" | ||||||||
| license-files = ["LICENSE.txt"] | ||||||||
| authors = [{ name = "Maksim Kurnikov", email = "[email protected]" }] | ||||||||
| maintainers = [ | ||||||||
| { name = "Marti Raudsepp", email = "[email protected]" }, | ||||||||
| { name = "Nikita Sobolev", email = "[email protected]" }, | ||||||||
| ] | ||||||||
| classifiers = [ | ||||||||
| "License :: OSI Approved :: MIT License", | ||||||||
| "Operating System :: OS Independent", | ||||||||
| "Programming Language :: Python :: 3.10", | ||||||||
| "Programming Language :: Python :: 3.11", | ||||||||
| "Programming Language :: Python :: 3.12", | ||||||||
| "Programming Language :: Python :: 3.13", | ||||||||
| "Typing :: Typed", | ||||||||
| "Framework :: Django", | ||||||||
| ] | ||||||||
| dependencies = [ | ||||||||
| "django-stubs>=5.2.5", | ||||||||
| "typing-extensions>=4.0", | ||||||||
| "requests>=2.0", | ||||||||
| "types-requests", | ||||||||
| "types-PyYAML", | ||||||||
| ] | ||||||||
|
|
||||||||
| [project.urls] | ||||||||
| Homepage = "https://github.com/typeddjango/djangorestframework-stubs" | ||||||||
| Funding = "https://github.com/sponsors/typeddjango" | ||||||||
| "Release notes" = "https://github.com/typeddjango/djangorestframework-stubs/releases" | ||||||||
|
|
||||||||
| [project.optional-dependencies] | ||||||||
| compatible-mypy = ["mypy>=1.13,<1.19", "django-stubs[compatible-mypy]"] | ||||||||
| coreapi = ["coreapi>=2.0.0"] | ||||||||
| markdown = ["types-Markdown>=0.1.5"] | ||||||||
|
|
||||||||
| [dependency-groups] | ||||||||
| dev = [ | ||||||||
| "wheel", | ||||||||
| "pre-commit==4.3.0", | ||||||||
| "pytest==8.4.2", | ||||||||
| "pytest-mypy-plugins==3.2.0", | ||||||||
| "djangorestframework==3.16.1", | ||||||||
| "types-pytz==2025.2.0.20250809", | ||||||||
| "types-requests==2.32.4.20250913", | ||||||||
| "types-urllib3==1.26.25.14", | ||||||||
| "types-Pygments==2.19.0.20250809", | ||||||||
| "types-pyyaml==6.0.12.20250915", | ||||||||
| "django-stubs[compatible-mypy] @ git+https://github.com/typeddjango/django-stubs", | ||||||||
| "django-stubs-ext @ git+https://github.com/typeddjango/django-stubs#subdirectory=ext", | ||||||||
| "djangorestframework-stubs[compatible-mypy,coreapi,markdown]", | ||||||||
| ] | ||||||||
|
|
||||||||
| [build-system] | ||||||||
| requires = ["uv_build>=0.8.19,<0.9.0"] | ||||||||
| build-backend = "uv_build" | ||||||||
UnknownPlatypus marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
|
|
||||||||
| [tool.uv.build-backend] | ||||||||
| module-name = ["rest_framework-stubs", "mypy_drf_plugin"] | ||||||||
| module-root = "" | ||||||||
|
|
||||||||
| [tool.pytest.ini_options] | ||||||||
| pythonpath = ["."] | ||||||||
| testpaths = ["tests"] | ||||||||
| addopts = [ | ||||||||
| "--tb=native", | ||||||||
| "-s", | ||||||||
| "-v", | ||||||||
| "--cache-clear", | ||||||||
| "--mypy-extension-hook=scripts.tests_extension_hook.django_plugin_hook", | ||||||||
| # Suppress errors from other packages due to https://github.com/typeddjango/pytest-mypy-plugins/issues/134 | ||||||||
| "--mypy-only-local-stub", | ||||||||
| "--mypy-ini-file=mypy.ini" | ||||||||
|
Comment on lines
+77
to
+78
|
||||||||
| "--mypy-only-local-stub", | |
| "--mypy-ini-file=mypy.ini" | |
| "--mypy-only-local-stub" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migrating mypy.ini turned out to be problematic. Maybe later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this previously, it made none of the tests pass. We need to approach this carefully then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated my code to use uv-build instead of hatch and 29 out of the 36 test cases are failing!
Seems like pytest is unable to find
disable_error_code = ["empty-body"]
enable_error_code = ["ignore-without-code"]when written in pyproject.toml
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--mypy-only-local-stubmoved topyproject.tomlpytest config.