hassan11196 / QRSMS-V1

Consider using identity comparison with singleton PTC-W0068
Bug risk
Major
3 years ago3 years old
Comparison to singleton None should be expr is None
116        # getting a particular sheet by name out of many sheets
117
118        student_batch = request.POST['batch']
119        if student_batch == None:120            student_batch = 2016
121        worksheet = wb["BATCH " + str(student_batch)]
122        print(worksheet)
Comparison to singleton None should be expr is not None
129        section = list()
130        instructor = list()
131        for col in worksheet['C']:
132            if(col.value != None):133                code.append(col.value)
134        for col in worksheet['D']:
135            if(col.value != None):
Comparison to singleton None should be expr is not None
132            if(col.value != None):
133                code.append(col.value)
134        for col in worksheet['D']:
135            if(col.value != None):136                title.append(col.value)
137        for col in worksheet['E']:
138            if(col.value != None):
Comparison to singleton None should be expr is not None
135            if(col.value != None):
136                title.append(col.value)
137        for col in worksheet['E']:
138            if(col.value != None):139                short.append(col.value)
140        for col in worksheet['G']:
141            if(col.value != None):
Comparison to singleton None should be expr is not None
138            if(col.value != None):
139                short.append(col.value)
140        for col in worksheet['G']:
141            if(col.value != None):142                crdthr.append(col.value)
143
144        for col in worksheet['I']: