Skip to content

Commit

Permalink
alembic: fix a syntax warning
Browse files Browse the repository at this point in the history
The SyntaxWarning appeared in every `alembic up/down..` call.

In [1]: print("%\%40%")
<>:1: SyntaxWarning: invalid escape sequence '\%'
<ipython-input-1-b80c71bbab44>:1: SyntaxWarning: invalid escape sequence '\%'
  print("%\%40%")
%\%40%

In [2]: print("%\\%40%")
%\%40%
  • Loading branch information
praiskup committed May 16, 2024
1 parent 32cbcee commit cfad84d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
def upgrade():
session = sa.orm.sessionmaker(bind=op.get_bind())()
rows = (session.query(CounterStat)
.filter(CounterStat.name.like("%\%40%"))
.filter(CounterStat.name.like("%\\%40%"))
.all())

for stat in rows:
Expand Down

0 comments on commit cfad84d

Please sign in to comment.