Skip to content

Commit b10e883

Browse files
vitaly-burovoyelprans
authored andcommitted
Fix python examples + typo
In examples functions should have an empty terminaton line.
1 parent 59e2878 commit b10e883

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

asyncpg/connection.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ async def copy_from_table(self, table_name, *, output,
423423
... 'mytable', columns=('foo', 'bar'),
424424
... output='file.csv', format='csv')
425425
... print(result)
426+
...
426427
>>> asyncio.get_event_loop().run_until_complete(run())
427428
'COPY 100'
428429
@@ -491,6 +492,7 @@ async def copy_from_query(self, query, *args, output,
491492
... 'SELECT foo, bar FROM mytable WHERE foo > $1', 10,
492493
... output='file.csv', format='csv')
493494
... print(result)
495+
...
494496
>>> asyncio.get_event_loop().run_until_complete(run())
495497
'COPY 10'
496498
@@ -556,7 +558,8 @@ async def copy_to_table(self, table_name, *, source,
556558
... con = await asyncpg.connect(user='postgres')
557559
... result = await con.copy_to_table(
558560
... 'mytable', source='datafile.tbl')
559-
.... print(result)
561+
... print(result)
562+
...
560563
>>> asyncio.get_event_loop().run_until_complete(run())
561564
'COPY 140000'
562565
@@ -621,7 +624,8 @@ async def copy_records_to_table(self, table_name, *, records,
621624
... 'mytable', records=[
622625
... (1, 'foo', 'bar'),
623626
... (2, 'ham', 'spam')])
624-
.... print(result)
627+
... print(result)
628+
...
625629
>>> asyncio.get_event_loop().run_until_complete(run())
626630
'COPY 2'
627631
@@ -861,6 +865,7 @@ async def set_type_codec(self, typename, *,
861865
... "SELECT '2 years 3 mons 1 day'::interval")
862866
... print(result)
863867
... print(datetime.datetime(2002, 1, 1) + result)
868+
...
864869
>>> asyncio.get_event_loop().run_until_complete(run())
865870
relativedelta(years=+2, months=+3, days=+1)
866871
2004-04-02 00:00:00
@@ -1399,6 +1404,7 @@ class of the returned connection object. Must be a subclass of
13991404
... con = await asyncpg.connect(user='postgres')
14001405
... types = await con.fetch('SELECT * FROM pg_type')
14011406
... print(types)
1407+
...
14021408
>>> asyncio.get_event_loop().run_until_complete(run())
14031409
[<Record typname='bool' typnamespace=11 ...
14041410

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class build_ext(_build_ext.build_ext):
3232
('cython-annotate', None,
3333
'Produce a colorized HTML version of the Cython source.'),
3434
('cython-directives=', None,
35-
'Cythion compiler directives'),
35+
'Cython compiler directives'),
3636
]
3737

3838
def initialize_options(self):

0 commit comments

Comments
 (0)