Skip to content

Commit

Permalink
pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
awallenfang committed Jan 19, 2025
1 parent 7c944aa commit c28098d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
pip install pylint
- name: Analysing the code with pylint
run: |
pylint --fail-under 9 $(git ls-files | grep -v migrations | grep .py | grep -v pylint.yml | grep -v .pylintrc | grep -v manage.py)
pylint --fail-under 9 $(git ls-files | grep -v migrations | grep .py$ | grep -v manage.py)
3 changes: 1 addition & 2 deletions hub/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ def wrap(request, *args, **kwargs):
user = User.objects.get(auth_user = request.user)
if user.selected_space is None:
raise PermissionDenied
else:
return function(request, *args, **kwargs)
return function(request, *args, **kwargs)
return wrap
10 changes: 5 additions & 5 deletions scripts/gen_sizing.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@
]

for i in range(10,105,10):
for format in formats_10:
sizing_file += format.format(size=i)
for class_format in formats_10:
sizing_file += class_format.format(size=i)

for i in range(26):
for format in formats_1:
sizing_file += format.format(size=i)
for class_format in formats_1:
sizing_file += class_format.format(size=i)

additional = \
""".overflow-scroll {
Expand All @@ -128,5 +128,5 @@

sizing_file += additional

with open("hub/static/hub/sizing.css", "w") as file:
with open("hub/static/hub/sizing.css", "w", encoding="utf8") as file:
file.write(re.sub(r'\s+', '', sizing_file))
2 changes: 1 addition & 1 deletion todos/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from datetime import date, datetime, timezone
from datetime import date
from django.db import models, transaction
from django.db.models import F
from django.utils.timezone import localtime, now
Expand Down
2 changes: 1 addition & 1 deletion todos/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def recurrency_rate_change(request, todo_id, rate):
todo.recurrent_state.save()
return render_recurrency_editor(request, todo_id)

def empty(request):
def empty(_request):
return HttpResponse("")

@login_required
Expand Down

0 comments on commit c28098d

Please sign in to comment.