Skip to content

Commit 3680fc6

Browse files
Merge pull request #16 from christopherpickering/dev
2 parents d856b2e + fbb2266 commit 3680fc6

File tree

6 files changed

+567
-560
lines changed

6 files changed

+567
-560
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ jobs:
3333

3434
- name: Build and publish package
3535
if: steps.semantic.outputs.new_release_published == 'true'
36-
uses: JRubics/poetry-publish@v1.13
36+
uses: JRubics/poetry-publish@v1.15
3737
with:
3838
pypi_token: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,15 @@ jobs:
5050
host node port: 9300
5151
node port: 9300
5252
discovery type: single-node
53+
- name: setup poetry
54+
uses: abatilo/actions-poetry@v2
55+
with:
56+
poetry-version: 1.2.2
57+
5358
- name: install deps
54-
run: python -m pip install tox poetry tox-poetry
59+
run: poetry install
5560
- name: test
56-
run: tox -e test
61+
run: poetry run tox -e test
5762
- name: upload cov
5863
uses: codecov/codecov-action@v3
5964
with:

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exclude: >
44
)
55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v4.3.0
7+
rev: v4.4.0
88
hooks:
99
- id: trailing-whitespace
1010
- id: end-of-file-fixer
@@ -21,7 +21,7 @@ repos:
2121
- --remove-duplicate-keys
2222
- --remove-unused-variables
2323
- repo: https://github.com/asottile/pyupgrade
24-
rev: v2.37.3
24+
rev: v3.2.3
2525
hooks:
2626
- id: pyupgrade
2727
args: [--py36-plus]
@@ -32,7 +32,7 @@ repos:
3232
exclude: docs*
3333
additional_dependencies: [toml]
3434
- repo: https://github.com/psf/black
35-
rev: 22.8.0
35+
rev: 22.10.0
3636
hooks:
3737
- id: black
3838
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks

flask_session/sessions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,9 @@ def __repr__(self):
647647

648648
from sqlalchemy import inspect
649649

650-
if not inspect(db.engine).has_table("Session"):
651-
self.db.create_all()
650+
with app.app_context():
651+
if not inspect(db.engine).has_table("Session"):
652+
self.db.create_all()
652653

653654
self.sql_session_model = Session
654655

0 commit comments

Comments
 (0)