Skip to content

Commit

Permalink
Small spacing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleconroy committed Dec 15, 2021
1 parent 5235b2c commit c6eeafa
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 16 deletions.
1 change: 1 addition & 0 deletions examples/python/src/authors/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import Optional



@dataclasses.dataclass()
class Author:
id: int
Expand Down
3 changes: 1 addition & 2 deletions examples/python/src/authors/query.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Code generated by sqlc. DO NOT EDIT.
from typing import AsyncIterator, Iterator, Optional

Expand All @@ -8,6 +7,7 @@
from authors import models



CREATE_AUTHOR = """-- name: create_author \\:one
INSERT INTO authors (
name, bio
Expand Down Expand Up @@ -108,4 +108,3 @@ async def list_authors(self) -> AsyncIterator[models.Author]:
name=row[1],
bio=row[2],
)

1 change: 1 addition & 0 deletions examples/python/src/booktest/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import List



class BookType(str, enum.Enum):
FICTION = "FICTION"
NONFICTION = "NONFICTION"
Expand Down
6 changes: 2 additions & 4 deletions examples/python/src/booktest/query.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

# Code generated by sqlc. DO NOT EDIT.
from typing import AsyncIterator, List, Optional
import dataclasses
import datetime
from typing import AsyncIterator, List, Optional

import sqlalchemy
import sqlalchemy.ext.asyncio

from booktest import models



BOOKS_BY_TAGS = """-- name: books_by_tags \\:many
SELECT
book_id,
Expand Down Expand Up @@ -109,7 +109,6 @@ class CreateBookParams:
"""



class AsyncQuerier:
def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection):
self._conn = conn
Expand Down Expand Up @@ -208,4 +207,3 @@ async def update_book_isbn(self, *, title: str, tags: List[str], book_id: int, i
"p3": book_id,
"p4": isbn,
})

1 change: 1 addition & 0 deletions examples/python/src/jets/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import dataclasses



@dataclasses.dataclass()
class Jet:
id: int
Expand Down
4 changes: 1 addition & 3 deletions examples/python/src/jets/query-building.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Code generated by sqlc. DO NOT EDIT.
from typing import AsyncIterator, Optional

Expand All @@ -8,6 +7,7 @@
from jets import models



COUNT_PILOTS = """-- name: count_pilots \\:one
SELECT COUNT(*) FROM pilots
"""
Expand All @@ -23,7 +23,6 @@
"""



class AsyncQuerier:
def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection):
self._conn = conn
Expand All @@ -44,4 +43,3 @@ async def list_pilots(self) -> AsyncIterator[models.Pilot]:
id=row[0],
name=row[1],
)

4 changes: 1 addition & 3 deletions examples/python/src/ondeck/city.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Code generated by sqlc. DO NOT EDIT.
from typing import AsyncIterator, Optional

Expand All @@ -8,6 +7,7 @@
from ondeck import models



CREATE_CITY = """-- name: create_city \\:one
INSERT INTO city (
name,
Expand Down Expand Up @@ -40,7 +40,6 @@
"""



class AsyncQuerier:
def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection):
self._conn = conn
Expand Down Expand Up @@ -73,4 +72,3 @@ async def list_cities(self) -> AsyncIterator[models.City]:

async def update_city_name(self, *, slug: str, name: str) -> None:
await self._conn.execute(sqlalchemy.text(UPDATE_CITY_NAME), {"p1": slug, "p2": name})

1 change: 1 addition & 0 deletions examples/python/src/ondeck/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import List, Optional



class Status(str, enum.Enum):
"""Venues can be either open or closed"""
OPEN = "op!en"
Expand Down
6 changes: 2 additions & 4 deletions examples/python/src/ondeck/venue.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

# Code generated by sqlc. DO NOT EDIT.
from typing import AsyncIterator, List, Optional
import dataclasses
from typing import AsyncIterator, List, Optional

import sqlalchemy
import sqlalchemy.ext.asyncio

from ondeck import models



CREATE_VENUE = """-- name: create_venue \\:one
INSERT INTO venue (
slug,
Expand Down Expand Up @@ -88,7 +88,6 @@ class VenueCountByCityRow:
count: int



class AsyncQuerier:
def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection):
self._conn = conn
Expand Down Expand Up @@ -156,4 +155,3 @@ async def venue_count_by_city(self) -> AsyncIterator[VenueCountByCityRow]:
city=row[0],
count=row[1],
)

0 comments on commit c6eeafa

Please sign in to comment.