Skip to content

Commit

Permalink
fix pylint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgramminCat committed Jan 26, 2025
1 parent af9eb0b commit e991495
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
pip install pylint-flask
- name: Analysing the code with pylint
run: |
pylint --fail-under=9.80 --load-plugins pylint_flask --max-line-length=410 $(git ls-files '*.py' ':!static') --disable C0301,C0116,C0114,E0602,C0302,C0115,C0103,W0401,C0209,R0912,R1702,W0614,E1101,C0303
pylint --fail-under=9.80 --load-plugins pylint_flask --max-line-length=410 $(git ls-files '*.py' ':!static') --disable C0301,C0116,C0114,E0602,C0302,C0115,C0103,W0401,C0209,R0912,R1702,W0614,E1101,C0303,C0121
10 changes: 0 additions & 10 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,16 +336,6 @@ def index_page():

rv = sorted(rv, key=itemgetter('id'), reverse=True)

'''
# Random chance for a video to swap with another video within 5 positions of itself
for i in range(len(rv)):
if random.random() < 0.2: # 20% chance to swap
# Limit swap range to be within 5 positions
swap_index = random.randint(max(i - 5, 0), min(i + 5, len(rv) - 1))
if swap_index != i: # Avoid swapping with the same item
rv[i], rv[swap_index] = rv[swap_index], rv[i]
'''

grouped_by_date = defaultdict(lambda: defaultdict(list))

for video in rv:
Expand Down

0 comments on commit e991495

Please sign in to comment.