Skip to content

Commit

Permalink
Fix typos and remove unused import.
Browse files Browse the repository at this point in the history
  • Loading branch information
florentx committed Apr 20, 2010
1 parent 9f6bc93 commit 3c821a0
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/api.rst
Expand Up @@ -186,7 +186,7 @@ different values for each request. In a nutshell: it does the right
thing, like it does for :class:`request` and :class:`session`.

.. data:: g

Just store on this whatever you want. For example a database
connection or the user that is currently logged in.

Expand Down
2 changes: 1 addition & 1 deletion docs/patterns/jquery.rst
Expand Up @@ -111,7 +111,7 @@ side.
Note that we are using the :meth:`~werkzeug.MultiDict.get` method here
which will never fail. If the key is missing a default value (here ``0``)
is returned. Furthermore it can convert values to a specific type (like
in our case `int`). This is especially handy for code that that is
in our case `int`). This is especially handy for code that is
triggered by a script (APIs, JavaScript etc.) because you don't need
special error reporting in that case.

Expand Down
5 changes: 2 additions & 3 deletions docs/patterns/packages.rst
Expand Up @@ -74,10 +74,9 @@ And this is what `views.py` would look like::
.. admonition:: Circular Imports

Every Python programmer hates them, and yet we just added some:
circular imports (That's when two module depend on each one. In this
circular imports (That's when two modules depend on each other. In this
case `views.py` depends on `__init__.py`). Be advised that this is a
bad idea in general but here it is actually fine. The reason for this
is
bad idea in general but here it is actually fine. The reason for this is
that we are not actually using the views in `__init__.py` and just
ensuring the module is imported and we are doing that at the bottom of
the file.
Expand Down
5 changes: 3 additions & 2 deletions examples/minitwit/minitwit.py
Expand Up @@ -125,7 +125,8 @@ def user_timeline(username):
if g.user:
followed = query_db('''select 1 from follower where
follower.who_id = ? and follower.whom_id = ?''',
[session['user_id'], profile_user['user_id']], one=True) is not None
[session['user_id'], profile_user['user_id']],
one=True) is not None
return render_template('timeline.html', messages=query_db('''
select message.*, user.* from message, user where
user.user_id = message.author_id and user.user_id = ?
Expand Down Expand Up @@ -230,7 +231,7 @@ def register():

@app.route('/logout')
def logout():
"""Logs the user out"""
"""Logs the user out."""
flash('You were logged out')
session.pop('user_id', None)
return redirect(url_for('public_timeline'))
Expand Down
9 changes: 4 additions & 5 deletions flask.py
Expand Up @@ -10,7 +10,6 @@
:license: BSD, see LICENSE for more details.
"""
from __future__ import with_statement
import re
import os
import sys

Expand Down Expand Up @@ -261,7 +260,7 @@ def _default_template_ctx_processor():


def _assert_have_json():
"""Helper function that fails if JSON is unavailable"""
"""Helper function that fails if JSON is unavailable."""
if not json_available:
raise RuntimeError('simplejson not installed')

Expand Down Expand Up @@ -517,7 +516,7 @@ def save_session(self, session, response):

def add_url_rule(self, rule, endpoint, view_func=None, **options):
"""Connects a URL rule. Works exactly like the :meth:`route`
decorator. If a view_func is provided it will be registered with the
decorator. If a view_func is provided it will be registered with the
endpoint.
Basically this example::
Expand All @@ -544,7 +543,7 @@ def index():
:param endpoint: the endpoint for the registered URL rule. Flask
itself assumes the name of the view function as
endpoint
:param view_func: the function to call when servicing a request to the
:param view_func: the function to call when serving a request to the
provided endpoint
:param options: the options to be forwarded to the underlying
:class:`~werkzeug.routing.Rule` object
Expand Down Expand Up @@ -798,7 +797,7 @@ def test_request_context(self, *args, **kwargs):
return self.request_context(create_environ(*args, **kwargs))

def __call__(self, environ, start_response):
"""Shortcut for :attr:`wsgi_app`"""
"""Shortcut for :attr:`wsgi_app`."""
return self.wsgi_app(environ, start_response)


Expand Down
6 changes: 4 additions & 2 deletions setup.py
Expand Up @@ -34,7 +34,8 @@ def hello():
* `website <http://flask.pocoo.org/>`_
* `documentation <http://flask.pocoo.org/docs/>`_
* `development version <http://github.com/mitsuhiko/flask/zipball/master#egg=Flask-dev>`_
* `development version
<http://github.com/mitsuhiko/flask/zipball/master#egg=Flask-dev>`_
"""
from setuptools import setup
Expand All @@ -47,7 +48,8 @@ def hello():
license='BSD',
author='Armin Ronacher',
author_email='armin.ronacher@active-4.com',
description='A microframework based on Werkzeug, Jinja2 and good intentions',
description='A microframework based on Werkzeug, Jinja2 '
'and good intentions',
long_description=__doc__,
py_modules=['flask'],
zip_safe=False,
Expand Down

0 comments on commit 3c821a0

Please sign in to comment.