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

Bump dependencies #143

Merged
merged 1 commit into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-yaml

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.4.6
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
rev: v1.10.0
hooks:
- id: mypy
exclude: "migrations"
additional_dependencies: ["git+https://github.com/typeddjango/django-stubs.git"]
additional_dependencies:
["git+https://github.com/typeddjango/django-stubs.git#5.0.2"]
6 changes: 1 addition & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"python.formatting.provider": "black",
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"editor.formatOnSave": true,
"python.linting.mypyEnabled": true
"editor.formatOnSave": true
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2022 Weiliang Li
Copyright (c) 2020-2024 Weiliang Li

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 1 addition & 0 deletions manage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""

import os
import sys

Expand Down
1 change: 1 addition & 0 deletions mysite/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/asgi/
"""

import os

from django.conf import settings
Expand Down
1 change: 1 addition & 0 deletions mysite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""

import os
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions mysite/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""

from django.contrib import admin
from django.urls import path

Expand Down
1 change: 1 addition & 0 deletions mysite/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application
Expand Down
1,188 changes: 981 additions & 207 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion polls/adapters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


async def retrieve_object(model_class: Type[ModelT], id: int) -> ModelT:
instance = await model_class.objects.filter(pk=id).afirst()
instance = await model_class.objects.filter(pk=id).afirst() # type:ignore
if not instance:
raise HTTPException(status_code=404, detail="Object not found.")
return instance
Expand Down
1 change: 0 additions & 1 deletion polls/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand Down
1 change: 0 additions & 1 deletion polls/tests.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

# Create your tests here.
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ python = "^3.10"

# 3rd party
django = "^5.0"
fastapi = "^0.110.1"
fastapi = "^0.111.0"
pydantic = "^2.0.3"
uvicorn = "^0.29.0"
uvicorn = "^0.30.0"
uvloop = {version = "^0.19.0", markers = 'sys_platform != "win32"'}

# optional
psycopg2 = "^2.9.5"
psycopg2-binary = "^2.9.5"
# you don't need whitenoise if you mount the django APP with FastAPI
whitenoise = "^6.2.0"

[tool.poetry.group.dev.dependencies]
django-stubs = {extras = ["compatible-mypy"], version = "^4.2.3"}
django-stubs = {extras = ["compatible-mypy"], version = "^5.0"}
ipython = "^8.14.0"
mypy = "^1.7.0"
ruff = "^0.3.5"
mypy = "^1.10.0"
ruff = "^0.4.5"

[build-system]
build-backend = "poetry.core.masonry.api"
Expand Down
Loading