Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[flake8]
exclude = bin,lib
max-line-length = 88
extend-ignore = E203
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: python
python:
- "2.7"
#- "3.5"
- "3.9"
script:
- make test
after_success:
Expand Down
8 changes: 3 additions & 5 deletions polycules.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,16 @@ def migrate():
for filename in sorted(os.listdir(migrations_dir)):
if filename[-3:] != "sql":
continue
migration_number = int(filename[:3])
migration_number = int(filename.split("-", 1)[0])
if migration_number <= current_migration:
print("migration {} already applied".format(migration_number))
continue
with open(os.path.join(migrations_dir, filename), "rb") as f:
with open(os.path.join(migrations_dir, filename), "r") as f:
try:
db.cursor().executescript(f.read())
except Exception as e:
print("Got {} - maybe already applied?".format(e))
finally:
pass
if filename[:3] == "003":
if migration_number == 3:
hashify.migrate(db)


Expand Down
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ chardet==3.0.4
click==7.1.2
colorama==0.4.3
contextlib2==0.6.0
coverage==5.5
distlib==0.3.0
distro==1.4.0
flake8==3.9.2
Flask==1.1.2
html5lib==1.0.1
idna==2.8
Expand All @@ -21,12 +23,16 @@ jsonschema==3.2.0
lockfile==0.12.2
Markdown==3.2.2
MarkupSafe==1.1.1
mccabe==0.6.1
msgpack==0.6.2
nose==1.3.7
packaging==20.3
pathspec==0.8.0
pep517==0.8.2
progress==1.5
pycodestyle==2.7.0
pycparser==2.20
pyflakes==2.3.1
pyparsing==2.4.6
pyrsistent==0.16.0
pytoml==0.1.21
Expand Down