Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0a623f0

Browse files
author
Joseph Damiba
committed
updating check-order so that no post can have order 5 since that is the order of the more post on the index page
1 parentd4d61f9 commit0a623f0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

‎check-order.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@
2828
order= []
2929

3030
forpostinsortedPostFamily:
31+
ifpost['order']==5:
32+
raiseException("Order Check Failed! Post {} cannot have order 5!".format(post['path']))
3133
order.append(post['order'])
3234

3335
iforder[0]!=1:
3436
raiseException("Order Check Failed! First post does not have order 1!")
3537

36-
defcheckSequential(l):
37-
returnall(i==j-1fori,jinzip(l,l[1:]))
38-
3938
defcheckConsecutive(l):
4039
returnsorted(l)==list(range(min(l),max(l)+1))
4140

@@ -46,7 +45,4 @@ def checkConsecutive(l):
4645
except:
4746
raiseException("Order Check Failed! Orders are not consecutive integers!!")
4847

49-
ifnotcheckSequential(order):
50-
raiseException("Order Check Failed! Orders are not sequential integers!!")
51-
5248
print("Order Checks Passed!")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp