Ignore:
Timestamp:
3 Dec 2011, 05:46:52 (13 years ago)
Author:
Henrik Bettermann
Message:

pyflakes

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/accommodation.py

    r7190 r7256  
    2121from datetime import datetime
    2222import grok
    23 from grok import index
    2423from zope.component.interfaces import IFactory
     24from zope.interface import implementedBy
    2525from waeup.sirp.interfaces import academic_sessions_vocab
    2626from waeup.sirp.students.interfaces import (
  • main/waeup.sirp/trunk/src/waeup/sirp/students/batching.py

    r7191 r7256  
    2626import grok
    2727import csv
    28 import copy
    2928from zope.interface import Interface
    3029from zope.schema import getFields
     
    3433    IBatchProcessor, FatalCSVError, IObjectConverter)
    3534from waeup.sirp.students.interfaces import (
    36     IStudent, IStudentStudyCourse, IStudentStudyCourseImport,
     35    IStudent, IStudentStudyCourseImport,
    3736    IStudentUpdateByRegNo, IStudentUpdateByMatricNo)
    3837from waeup.sirp.utils.batching import BatchProcessor
     
    5756    @property
    5857    def available_fields(self):
    59         result = []
    6058        return sorted(list(set(
    6159            ['student_id','reg_number','matric_number'] + getFields(
     
    187185    @property
    188186    def available_fields(self):
    189         result = []
    190187        return sorted(list(set(
    191188            ['student_id','reg_number','matric_number'] + getFields(
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py

    r7254 r7256  
    2121import grok
    2222from time import time
    23 from datetime import date, datetime
     23from datetime import datetime
    2424from zope.event import notify
    2525from zope.catalog.interfaces import ICatalog
     
    5858from waeup.sirp.authentication import get_principal_role_manager
    5959from waeup.sirp.hostels.hostel import NOT_OCCUPIED
    60 from waeup.sirp.utils.helpers import get_user_account, send_mail
     60from waeup.sirp.utils.helpers import send_mail
    6161
    6262def write_log_message(view, message):
     
    6767# Save function used for save methods in pages
    6868def msave(view, **data):
    69     form = view.request.form
    7069    changed_fields = view.applyData(view.context, **data)
    7170    # Turn list of lists into single list
     
    19981997    @grok.action('Register course list')
    19991998    def RegisterCourses(self, **data):
    2000         state = IWorkflowState(self.context.getStudent()).getState()
    20011999        IWorkflowInfo(self.context.getStudent()).fireTransition('register_courses')
    20022000        self.flash('Course list has been registered.')
  • main/waeup.sirp/trunk/src/waeup/sirp/students/container.py

    r7219 r7256  
    2020"""
    2121import grok
    22 import os
    2322from waeup.sirp.students.interfaces import (
    2423    IStudentsContainer, IStudent)
  • main/waeup.sirp/trunk/src/waeup/sirp/students/dynamicroles.py

    r7220 r7256  
    2323"""
    2424import grok
    25 from zope.securitypolicy.interfaces import (
    26     IPrincipalRoleManager, IPrincipalPermissionManager,)
    27 from zope.securitypolicy.principalrole import AnnotationPrincipalRoleManager
     25from zope.securitypolicy.interfaces import IPrincipalRoleManager
    2826from zope.securitypolicy.principalpermission import (
    2927    AnnotationPrincipalPermissionManager,)
    30 from zope.securitypolicy.settings import Allow, Deny, Unset
     28from zope.securitypolicy.principalrole import AnnotationPrincipalRoleManager
    3129from waeup.sirp.students.interfaces import IStudent
    3230
  • main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py

    r7240 r7256  
    1717##
    1818from datetime import datetime
    19 from zope.interface import Attribute, invariant, Interface
    20 from zope.interface.exceptions import Invalid
     19from zope.interface import Attribute, Interface
    2120from zope import schema
    2221from waeup.sirp.interfaces import (
  • main/waeup.sirp/trunk/src/waeup/sirp/students/payments.py

    r7191 r7256  
    2020"""
    2121import grok
    22 from grok import index
    2322from zope.component.interfaces import IFactory
    2423from zope.interface import implementedBy
     
    5150    def __init__(self):
    5251        super(StudentOnlinePayment, self).__init__()
    53         p_id = None
    5452        return
    5553
  • main/waeup.sirp/trunk/src/waeup/sirp/students/student.py

    r7212 r7256  
    2121import os
    2222import grok
    23 from grok import index
    2423from zope.component.interfaces import IFactory
    2524from zope.interface import implementedBy
     
    253252        """Create a browsable file-like object.
    254253        """
    255         ext = os.path.splitext(filename)[1].lower()
    256254        # call super method to ensure that any old files with
    257255        # different filename extension are deleted.
  • main/waeup.sirp/trunk/src/waeup/sirp/students/studycourse.py

    r7191 r7256  
    2121"""
    2222import grok
    23 from grok import index
    2423from zope.component.interfaces import IFactory
    25 from zope.securitypolicy.interfaces import IPrincipalRoleManager
     24from zope.interface import implementedBy
    2625from waeup.sirp.students.interfaces import (
    2726    IStudentStudyCourse, IStudentNavigation, IStudentStudyLevel)
  • main/waeup.sirp/trunk/src/waeup/sirp/students/studylevel.py

    r7191 r7256  
    2121"""
    2222import grok
    23 from grok import index
    24 from zope.component.interfaces import IFactory
    2523from waeup.sirp.students.interfaces import (
    2624    IStudentStudyLevel, IStudentNavigation, ICourseTicket)
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_batching.py

    r7193 r7256  
    3232    StudentProcessor, StudentStudyCourseProcessor)
    3333from waeup.sirp.students.student import Student
    34 from waeup.sirp.students.studycourse import StudentStudyCourse
    3534from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    3635from waeup.sirp.interfaces import IBatchProcessor
     
    151150
    152151    def test_delEntry(self):
    153         self.importer.delEntry(
    154             dict(student_id=self.student.student_id), self.app)
    155         assert self.student.student_id not in self.app['students'].keys()
    156 
    157     def test_delEntry(self):
    158152        assert self.student.student_id in self.app['students'].keys()
    159153        self.importer.delEntry(
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_container.py

    r7193 r7256  
    1919Tests for students containers.
    2020"""
    21 import unittest
    2221import tempfile
    2322import shutil
    2423from zope.interface.verify import verifyClass, verifyObject
    25 from zope.component.interfaces import IFactory
    2624from zope.component.hooks import setSite, clearSite
    2725from waeup.sirp.app import University
     
    3432    )
    3533from waeup.sirp.testing import (
    36     FunctionalLayer, FunctionalTestCase, get_all_loggers, remove_new_loggers,
    37     remove_logger)
     34    FunctionalLayer, FunctionalTestCase, remove_logger)
    3835
    3936class StudentsContainerTestCase(FunctionalTestCase):
  • main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py

    r7191 r7256  
    2020import grok
    2121from random import SystemRandom as r
    22 from datetime import date, datetime
     22from datetime import datetime
    2323from reportlab.pdfgen import canvas
    2424from reportlab.lib.units import cm
     
    2929from reportlab.platypus.tables import TableStyle
    3030from zope.formlib.form import setUpEditWidgets
    31 from waeup.sirp.interfaces import academic_sessions_vocab
    3231from waeup.sirp.students.interfaces import IStudentsUtils
    3332
     
    112111        d['booking_session'] = site_confoguration.accommodation_session
    113112        d['allowed_states'] = site_confoguration.accommodation_states
    114         session = str(d['booking_session'])
    115113        # Determine bed type
    116114        studycourse = student['studycourse']
Note: See TracChangeset for help on using the changeset viewer.