Skip to content

Commit

Permalink
Followup / fixup: apply 'black' code formatting to a couple of missed…
Browse files Browse the repository at this point in the history
… docstrings

### Description
Follow-up / completion of #1220.  That change updated a number of docstrings within the codebase to use standardised `black` code formatting, but a couple of locations had been missed.

### Checklist

This pull request is:

- [x] A documentation / typographical error fix
	- Good to go, no issue or tests are needed

Closes: #1228
Pull-request: #1228
Pull-request-sha: f5696b9

Change-Id: I5d935b036d6f4e11eb5c229f9982db587d67ae24
  • Loading branch information
jayaddison authored and CaselIT committed Apr 26, 2023
1 parent 84462ee commit abd175b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
11 changes: 5 additions & 6 deletions alembic/op.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,7 @@ def create_primary_key(
from alembic import op
op.create_primary_key(
"pk_my_table", "my_table", ["id", "version"]
)
op.create_primary_key("pk_my_table", "my_table", ["id", "version"])
This internally generates a :class:`~sqlalchemy.schema.Table` object
containing the necessary columns, then generates a new
Expand Down Expand Up @@ -729,9 +727,10 @@ def create_table(
from sqlalchemy import Column, TIMESTAMP, func
# specify "DEFAULT NOW" along with the "timestamp" column
op.create_table('account',
Column('id', INTEGER, primary_key=True),
Column('timestamp', TIMESTAMP, server_default=func.now())
op.create_table(
"account",
Column("id", INTEGER, primary_key=True),
Column("timestamp", TIMESTAMP, server_default=func.now()),
)
The function also returns a newly created
Expand Down
11 changes: 5 additions & 6 deletions alembic/operations/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,7 @@ def create_primary_key(
from alembic import op
op.create_primary_key(
"pk_my_table", "my_table", ["id", "version"]
)
op.create_primary_key("pk_my_table", "my_table", ["id", "version"])
This internally generates a :class:`~sqlalchemy.schema.Table` object
containing the necessary columns, then generates a new
Expand Down Expand Up @@ -1214,9 +1212,10 @@ def create_table(
from sqlalchemy import Column, TIMESTAMP, func
# specify "DEFAULT NOW" along with the "timestamp" column
op.create_table('account',
Column('id', INTEGER, primary_key=True),
Column('timestamp', TIMESTAMP, server_default=func.now())
op.create_table(
"account",
Column("id", INTEGER, primary_key=True),
Column("timestamp", TIMESTAMP, server_default=func.now()),
)
The function also returns a newly created
Expand Down
6 changes: 6 additions & 0 deletions docs/build/unreleased/1220.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. change::
:tags: misc
:tickets: 1220

Update code snippets within docstrings to use ``black`` code formatting.
Pull request courtesy of James Addison.

0 comments on commit abd175b

Please sign in to comment.