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

chore(pre_commit): ⬆ pre-commit auto update #503

Merged
merged 2 commits into from
Jan 11, 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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
- --py38-plus

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.1.11
hooks:
- id: ruff
exclude: ^docs/
Expand Down
3 changes: 2 additions & 1 deletion examples/hello_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import responder
from pydantic import BaseModel

import responder


class ItemModel(BaseModel):
hello: str
Expand Down
3 changes: 2 additions & 1 deletion examples/hello_fortune.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import subprocess

import responder
from pydantic import BaseModel

import responder

api = responder.API()


Expand Down
1 change: 0 additions & 1 deletion examples/hello_schema_doc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import time

from marshmallow import Schema, fields
from pydantic import BaseModel

import responder
Expand Down
2 changes: 1 addition & 1 deletion examples/response_validation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Optional

from marshmallow import Schema, fields
from pydantic import ConfigDict, BaseModel
from pydantic import BaseModel, ConfigDict
from sqlalchemy import Column, Float, Integer, String, create_engine
from sqlalchemy.orm import DeclarativeBase, sessionmaker

Expand Down
2 changes: 1 addition & 1 deletion responder/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import pydantic
import uvicorn
from sqlalchemy.orm import DeclarativeBase, Query
from starlette.middleware.exceptions import ExceptionMiddleware
from starlette.middleware.cors import CORSMiddleware
from starlette.middleware.errors import ServerErrorMiddleware
from starlette.middleware.exceptions import ExceptionMiddleware
from starlette.middleware.gzip import GZipMiddleware
from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware
from starlette.middleware.sessions import SessionMiddleware
Expand Down
4 changes: 1 addition & 3 deletions responder/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,7 @@ def __init__(self, req, *, formats):
self.media = None #: A Python object that will be content-negotiated and sent back to the client. Typically, in JSON formatting.
self.data = None
self._stream = None
self.headers = (
{}
) #: A Python dictionary of ``{key: value}``, representing the headers of the response.
self.headers = {} #: A Python dictionary of ``{key: value}``, representing the headers of the response.
self.formats = formats
self.cookies = SimpleCookie() #: The cookies set in the Response
self.session = (
Expand Down
3 changes: 1 addition & 2 deletions tests/test_responder.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import io
import random
import string

import pytest
import yaml
from marshmallow import Schema, fields
from pydantic import ConfigDict, BaseModel
from pydantic import BaseModel, ConfigDict
from sqlalchemy import Column, Float, Integer, String, create_engine
from sqlalchemy.orm import DeclarativeBase, sessionmaker
from starlette.middleware.base import BaseHTTPMiddleware
Expand Down
Loading