PEP8
This commit is contained in:
parent
325455439a
commit
c75fa2f669
5 changed files with 19 additions and 17 deletions
|
@ -1,7 +1,7 @@
|
||||||
[](https://gitlicense.com/license/kianby/stacosys)
|
[](https://gitlicense.com/license/kianby/stacosys)
|
||||||
[](https://www.python.org/) [](https://flask.palletsprojects.com) [](https://docs.peewee-orm.com/)
|
[](https://www.python.org/) [](https://flask.palletsprojects.com) [](https://docs.peewee-orm.com/)
|
||||||
|
|
||||||
[](https://github.com/kianby/stacosys) [](https://coveralls.io/github/kianby/stacosys?branch=main) [](https://hub.docker.com/r/kianby/stacosys)
|
[](https://github.com/kianby/stacosys) [](https://coveralls.io/github/kianby/stacosys?branch=main) [](https://hub.docker.com/r/kianby/stacosys) [](https://github.com/psf/black)
|
||||||
|
|
||||||
## Stacosys
|
## Stacosys
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ cursor = connection.cursor()
|
||||||
|
|
||||||
# What script performs:
|
# What script performs:
|
||||||
# - first, remove site table: crash here if table doesn't exist (compatibility test without effort)
|
# - first, remove site table: crash here if table doesn't exist (compatibility test without effort)
|
||||||
# - remove site_id colum from comment table
|
# - remove site_id column from comment table
|
||||||
script = """
|
script = """
|
||||||
PRAGMA foreign_keys = OFF;
|
PRAGMA foreign_keys = OFF;
|
||||||
BEGIN TRANSACTION;
|
BEGIN TRANSACTION;
|
||||||
|
@ -25,8 +25,10 @@ CREATE TABLE comment (
|
||||||
author_gravatar varchar(255),
|
author_gravatar varchar(255),
|
||||||
content TEXT NOT NULL
|
content TEXT NOT NULL
|
||||||
);
|
);
|
||||||
INSERT INTO comment (id, url, notified, created, published, author_name, author_site, author_gravatar, content)
|
INSERT INTO comment (id, url, notified, created, published,
|
||||||
SELECT id, url, notified, created, published, author_name, author_site, author_gravatar, content
|
author_name, author_site, author_gravatar, content)
|
||||||
|
SELECT id, url, notified, created, published,
|
||||||
|
author_name, author_site, author_gravatar, content
|
||||||
FROM _comment_old;
|
FROM _comment_old;
|
||||||
DROP TABLE _comment_old;
|
DROP TABLE _comment_old;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 88
|
max-line-length = 88
|
||||||
extend-ignore = E203
|
extend-ignore = E203
|
||||||
exclude = */tests/*
|
|
||||||
spellcheck-targets=comments
|
spellcheck-targets=comments
|
||||||
|
|
|
@ -17,6 +17,7 @@ def init_test_db():
|
||||||
c3 = dao.create_comment("/site3", "Jack", "/jack.site", "", "comment 3")
|
c3 = dao.create_comment("/site3", "Jack", "/jack.site", "", "comment 3")
|
||||||
dao.publish_comment(c1)
|
dao.publish_comment(c1)
|
||||||
dao.publish_comment(c3)
|
dao.publish_comment(c3)
|
||||||
|
assert c2
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
Loading…
Add table
Reference in a new issue