BaySchoolCS2 / ProjectRepo

Whirpl - A network designed with small communities in mind
MIT License
1 stars 9 forks source link

Doc strings break things! #15

Closed michardy closed 9 years ago

michardy commented 9 years ago
Traceback (most recent call last):
  File "./run.py", line 3, in <module>
    from application import app
  File "/home/michael/Code/CS2/ProjectRepo/application/__init__.py", line 8, in <module>
    from application import login, home, signup
  File "/home/michael/Code/CS2/ProjectRepo/application/login.py", line 10
    '''
      ^
SyntaxError: invalid syntax

I can't find an error here (error on line 10 code ends on line 11):

from application import app
from collections import User
from flask import session, render_template, flash, redirect, url_for
from forms import LoginForm
from werkzeug.security import check_password_hash

@app.route('/login', methods=['POST', 'GET'])
'''
    when /login is accessed run login
'''
def login():
fhebert-perkins commented 9 years ago

Huh, maybe it has something to do with decorators?

michardy commented 9 years ago

It seems that you cannot have a doc string between a decorator and a function. As much as it pains you try a comment #

fhebert-perkins commented 9 years ago

Comments on self explanatory, repeating code is less important than functionality

fhebert-perkins commented 9 years ago

fixed as of d6de67aab1