Skip to content

Commit ae59a2c

Browse files
committed
Fixing the Codacy errors
1 parent 37ec5ae commit ae59a2c

File tree

6 files changed

+7
-12
lines changed

6 files changed

+7
-12
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
branches:
77
- master
88
- '[0-9][0-9][0-9][0-9].[0-9][0-9].*' # 2021.01.01
9-
- i1544_backend_dependencies
109

1110
env:
1211
IMAGE_TAG: latest
@@ -15,7 +14,7 @@ env:
1514
jobs:
1615
build:
1716
# to test a feature, change the repo name to your github id
18-
if: github.repository_owner == 'pushyamig'
17+
if: github.repository_owner == 'tl-its-umich-edu'
1918
runs-on: ubuntu-latest
2019
steps:
2120

dashboard/cron.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import logging
33
from collections import namedtuple
44
from typing import Any, Dict, List, Union
5+
from zoneinfo import ZoneInfo
56

67
import hjson
78
import pandas as pd
8-
from zoneinfo import ZoneInfo
99
import pangres
1010

1111
from django.conf import settings
@@ -504,16 +504,12 @@ def submission(self):
504504
df.to_sql(con=engine, name='submission', if_exists='append', index=False)
505505

506506
except Exception as e:
507-
logger.exception('Error running sql on table submission', e)
507+
logger.exception('Error running sql on table submission', str(e))
508508
raise
509509
status+=f"{str(df.shape[0])} submission: {query_params}\n"
510510

511511
# returns the row size of dataframe
512512
return status
513-
514-
515-
516-
return status
517513

518514
def weight_consideration(self):
519515
# load the assignment weight consider information with in a course. Some assignments don't have weight consideration

dashboard/graphql/view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from graphene_django.views import GraphQLView
22
from django.contrib.auth.mixins import LoginRequiredMixin
3+
from graphql_core_promise import PromiseExecutionContext
34
from dashboard.common.db_util import canvas_id_to_incremented_id
45
from dashboard.graphql.loaders import AssignmentsByCourseIdLoader, \
56
SubmissionsByAssignmentIdLoader, SubmissionByAssignmentIdAndUserIdLoader, \
@@ -8,7 +9,6 @@
89
AssignmentGroupByCourseIdAndIdLoader, AssignmentWeightConsiderationByCourseIdLoader, \
910
UserDefaultSelectionsByCourseIdAndUserLoader, UserDefaultSelectionByCourseIdAndUserAndViewTypeLoader, \
1011
AcademicTermByIdLoader
11-
from graphql_core_promise import PromiseExecutionContext
1212
from django.db.models import Q
1313
from dashboard.models import User
1414
from pinax.eventlog.models import log as eventlog

dashboard/management/commands/course.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from dashboard.models import Course, CourseViewOption, AcademicTerms
33
from dashboard.common.db_util import canvas_id_to_incremented_id
44
from datetime import datetime
5-
from zoneinfo import ZoneInfo
5+
from zoneinfo import ZoneInfo
66

77
class Command(BaseCommand):
88
def add_arguments(self, parser):

dashboard/management/commands/term.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from dashboard.models import AcademicTerms
33
from dashboard.common.db_util import canvas_id_to_incremented_id
44
from datetime import datetime
5-
from zoneinfo import ZoneInfo
5+
from zoneinfo import ZoneInfo
66

77
class Command(BaseCommand):
88
def add_arguments(self, parser):

dashboard/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from datetime import datetime, timedelta
1212
from typing import Optional, Union
1313

14-
from zoneinfo import ZoneInfo
14+
from zoneinfo import ZoneInfo
1515
from django.conf import settings
1616
from django.core.exceptions import ObjectDoesNotExist
1717
from django.db import models

0 commit comments

Comments
 (0)