Skip to content

Commit

Permalink
Fixing the Codacy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pushyamig committed Nov 17, 2023
1 parent 37ec5ae commit ae59a2c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- master
- '[0-9][0-9][0-9][0-9].[0-9][0-9].*' # 2021.01.01
- i1544_backend_dependencies

env:
IMAGE_TAG: latest
Expand All @@ -15,7 +14,7 @@ env:
jobs:
build:
# to test a feature, change the repo name to your github id
if: github.repository_owner == 'pushyamig'
if: github.repository_owner == 'tl-its-umich-edu'
runs-on: ubuntu-latest
steps:

Expand Down
8 changes: 2 additions & 6 deletions dashboard/cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import logging
from collections import namedtuple
from typing import Any, Dict, List, Union
from zoneinfo import ZoneInfo

import hjson
import pandas as pd
from zoneinfo import ZoneInfo
import pangres

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

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

# returns the row size of dataframe
return status



return status

def weight_consideration(self):
# load the assignment weight consider information with in a course. Some assignments don't have weight consideration
Expand Down
2 changes: 1 addition & 1 deletion dashboard/graphql/view.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from graphene_django.views import GraphQLView
from django.contrib.auth.mixins import LoginRequiredMixin
from graphql_core_promise import PromiseExecutionContext
from dashboard.common.db_util import canvas_id_to_incremented_id
from dashboard.graphql.loaders import AssignmentsByCourseIdLoader, \
SubmissionsByAssignmentIdLoader, SubmissionByAssignmentIdAndUserIdLoader, \
Expand All @@ -8,7 +9,6 @@
AssignmentGroupByCourseIdAndIdLoader, AssignmentWeightConsiderationByCourseIdLoader, \
UserDefaultSelectionsByCourseIdAndUserLoader, UserDefaultSelectionByCourseIdAndUserAndViewTypeLoader, \
AcademicTermByIdLoader
from graphql_core_promise import PromiseExecutionContext
from django.db.models import Q
from dashboard.models import User
from pinax.eventlog.models import log as eventlog
Expand Down
2 changes: 1 addition & 1 deletion dashboard/management/commands/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from dashboard.models import Course, CourseViewOption, AcademicTerms
from dashboard.common.db_util import canvas_id_to_incremented_id
from datetime import datetime
from zoneinfo import ZoneInfo
from zoneinfo import ZoneInfo

class Command(BaseCommand):
def add_arguments(self, parser):
Expand Down
2 changes: 1 addition & 1 deletion dashboard/management/commands/term.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from dashboard.models import AcademicTerms
from dashboard.common.db_util import canvas_id_to_incremented_id
from datetime import datetime
from zoneinfo import ZoneInfo
from zoneinfo import ZoneInfo

class Command(BaseCommand):
def add_arguments(self, parser):
Expand Down
2 changes: 1 addition & 1 deletion dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from datetime import datetime, timedelta
from typing import Optional, Union

from zoneinfo import ZoneInfo
from zoneinfo import ZoneInfo
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
Expand Down

0 comments on commit ae59a2c

Please sign in to comment.