Author: russellm
Date: 2009-12-01 18:30:00 -0600 (Tue, 01 Dec 2009)
New Revision: 11785

Modified:
   django/trunk/django/contrib/gis/db/backend/mysql/query.py
   django/trunk/django/contrib/gis/db/backend/oracle/query.py
   django/trunk/tests/regressiontests/bash_completion/__init__.py
   django/trunk/tests/regressiontests/bash_completion/management/__init__.py
   
django/trunk/tests/regressiontests/bash_completion/management/commands/__init__.py
   
django/trunk/tests/regressiontests/bash_completion/management/commands/test_command.py
   django/trunk/tests/regressiontests/bash_completion/models.py
Log:
Refs #11109 -- Touched some whitespace so Trac will display some files 
correctly.

Modified: django/trunk/django/contrib/gis/db/backend/mysql/query.py
===================================================================
--- django/trunk/django/contrib/gis/db/backend/mysql/query.py   2009-11-30 
10:45:30 UTC (rev 11784)
+++ django/trunk/django/contrib/gis/db/backend/mysql/query.py   2009-12-02 
00:30:00 UTC (rev 11785)
@@ -4,7 +4,7 @@
 
  Please note that MySQL only supports bounding box queries, also
  known as MBRs (Minimum Bounding Rectangles).  Moreover, spatial
- indices may only be used on MyISAM tables -- if you need 
+ indices may only be used on MyISAM tables -- if you need
  transactions, take a look at PostGIS.
 """
 from django.db import connection
@@ -38,7 +38,7 @@
 # Assacceptable lookup types for Oracle spatial.
 MYSQL_GIS_TERMS  = MYSQL_GIS_FUNCTIONS.keys()
 MYSQL_GIS_TERMS += MISC_TERMS
-MYSQL_GIS_TERMS = dict((term, None) for term in MYSQL_GIS_TERMS) # Making 
dictionary 
+MYSQL_GIS_TERMS = dict((term, None) for term in MYSQL_GIS_TERMS) # Making 
dictionary
 
 def get_geo_where_clause(table_alias, name, lookup_type, geo_annot):
     "Returns the SQL WHERE clause for use in MySQL spatial SQL construction."
@@ -49,7 +49,7 @@
     lookup_info = MYSQL_GIS_FUNCTIONS.get(lookup_type, False)
     if lookup_info:
         return "%s(%s, %%s)" % (lookup_info, geo_col)
-    
+
     # Handling 'isnull' lookup type
     # TODO: Is this needed because MySQL cannot handle NULL
     # geometries in its spatial indices.

Modified: django/trunk/django/contrib/gis/db/backend/oracle/query.py
===================================================================
--- django/trunk/django/contrib/gis/db/backend/oracle/query.py  2009-11-30 
10:45:30 UTC (rev 11784)
+++ django/trunk/django/contrib/gis/db/backend/oracle/query.py  2009-12-02 
00:30:00 UTC (rev 11785)
@@ -3,8 +3,8 @@
  routine for Oracle Spatial.
 
  Please note that WKT support is broken on the XE version, and thus
- this backend will not work on such platforms.  Specifically, XE lacks 
- support for an internal JVM, and Java libraries are required to use 
+ this backend will not work on such platforms.  Specifically, XE lacks
+ support for an internal JVM, and Java libraries are required to use
  the WKT constructors.
 """
 import re
@@ -31,10 +31,10 @@
 UNION = 'SDO_GEOM.SDO_UNION'
 UNIONAGG = 'SDO_AGGR_UNION'
 
-# We want to get SDO Geometries as WKT because it is much easier to 
-# instantiate GEOS proxies from WKT than SDO_GEOMETRY(...) strings.  
-# However, this adversely affects performance (i.e., Java is called 
-# to convert to WKT on every query).  If someone wishes to write a 
+# We want to get SDO Geometries as WKT because it is much easier to
+# instantiate GEOS proxies from WKT than SDO_GEOMETRY(...) strings.
+# However, this adversely affects performance (i.e., Java is called
+# to convert to WKT on every query).  If someone wishes to write a
 # SDO_GEOMETRY(...) parser in Python, let me know =)
 GEOM_SELECT = 'SDO_UTIL.TO_WKTGEOMETRY(%s)'
 
@@ -50,7 +50,7 @@
 class SDODistance(SpatialFunction):
     "Class for Distance queries."
     def __init__(self, op, tolerance=0.05):
-        super(SDODistance, self).__init__(DISTANCE, end_subst=', %s) %%s %%s' 
% tolerance, 
+        super(SDODistance, self).__init__(DISTANCE, end_subst=', %s) %%s %%s' 
% tolerance,
                                           operator=op, result='%%s')
 
 class SDOGeomRelate(SpatialFunction):
@@ -59,7 +59,7 @@
         # SDO_GEOM.RELATE(...) has a peculiar argument order: column, mask, 
geom, tolerance.
         # Moreover, the runction result is the mask (e.g., 'DISJOINT' instead 
of 'TRUE').
         end_subst = "%s%s) %s '%s'" % (', %%s, ', tolerance, '=', mask)
-        beg_subst = "%%s(%%s, '%s'" % mask 
+        beg_subst = "%%s(%%s, '%s'" % mask
         super(SDOGeomRelate, self).__init__('SDO_GEOM.RELATE', 
beg_subst=beg_subst, end_subst=end_subst)
 
 class SDORelate(SpatialFunction):
@@ -81,7 +81,7 @@
     'distance_gte' : (SDODistance('>='), dtypes),
     'distance_lt' : (SDODistance('<'), dtypes),
     'distance_lte' : (SDODistance('<='), dtypes),
-    'dwithin' : (SDOOperation('SDO_WITHIN_DISTANCE', 
+    'dwithin' : (SDOOperation('SDO_WITHIN_DISTANCE',
                               beg_subst="%s(%s, %%s, 'distance=%%s'"), dtypes),
     }
 
@@ -118,7 +118,7 @@
     # See if a Oracle Geometry function matches the lookup type next
     lookup_info = ORACLE_GEOMETRY_FUNCTIONS.get(lookup_type, False)
     if lookup_info:
-        # Lookup types that are tuples take tuple arguments, e.g., 'relate' 
and 
+        # Lookup types that are tuples take tuple arguments, e.g., 'relate' and
         # 'dwithin' lookup types.
         if isinstance(lookup_info, tuple):
             # First element of tuple is lookup type, second element is the type
@@ -128,15 +128,15 @@
             # Ensuring that a tuple _value_ was passed in from the user
             if not isinstance(geo_annot.value, tuple):
                 raise TypeError('Tuple required for `%s` lookup type.' % 
lookup_type)
-            if len(geo_annot.value) != 2: 
+            if len(geo_annot.value) != 2:
                 raise ValueError('2-element tuple required for %s lookup 
type.' % lookup_type)
-            
+
             # Ensuring the argument type matches what we expect.
             if not isinstance(geo_annot.value[1], arg_type):
                 raise TypeError('Argument type should be %s, got %s instead.' 
% (arg_type, type(geo_annot.value[1])))
 
             if lookup_type == 'relate':
-                # The SDORelate class handles construction for these queries, 
+                # The SDORelate class handles construction for these queries,
                 # and verifies the mask argument.
                 return sdo_op(geo_annot.value[1]).as_sql(geo_col)
             else:
@@ -144,7 +144,7 @@
                 return sdo_op.as_sql(geo_col)
         else:
             # Lookup info is a SDOOperation instance, whose `as_sql` method 
returns
-            # the SQL necessary for the geometry function call. For example:  
+            # the SQL necessary for the geometry function call. For example:
             #  SDO_CONTAINS("geoapp_country"."poly", SDO_GEOMTRY('POINT(5 
23)', 4326)) = 'TRUE'
             return lookup_info.as_sql(geo_col)
     elif lookup_type == 'isnull':

Modified: django/trunk/tests/regressiontests/bash_completion/__init__.py
===================================================================
--- django/trunk/tests/regressiontests/bash_completion/__init__.py      
2009-11-30 10:45:30 UTC (rev 11784)
+++ django/trunk/tests/regressiontests/bash_completion/__init__.py      
2009-12-02 00:30:00 UTC (rev 11785)
@@ -0,0 +1 @@
+

Modified: 
django/trunk/tests/regressiontests/bash_completion/management/__init__.py
===================================================================
--- django/trunk/tests/regressiontests/bash_completion/management/__init__.py   
2009-11-30 10:45:30 UTC (rev 11784)
+++ django/trunk/tests/regressiontests/bash_completion/management/__init__.py   
2009-12-02 00:30:00 UTC (rev 11785)
@@ -0,0 +1 @@
+

Modified: 
django/trunk/tests/regressiontests/bash_completion/management/commands/__init__.py
===================================================================
--- 
django/trunk/tests/regressiontests/bash_completion/management/commands/__init__.py
  2009-11-30 10:45:30 UTC (rev 11784)
+++ 
django/trunk/tests/regressiontests/bash_completion/management/commands/__init__.py
  2009-12-02 00:30:00 UTC (rev 11785)
@@ -0,0 +1 @@
+

Modified: 
django/trunk/tests/regressiontests/bash_completion/management/commands/test_command.py
===================================================================
--- 
django/trunk/tests/regressiontests/bash_completion/management/commands/test_command.py
      2009-11-30 10:45:30 UTC (rev 11784)
+++ 
django/trunk/tests/regressiontests/bash_completion/management/commands/test_command.py
      2009-12-02 00:30:00 UTC (rev 11785)
@@ -3,6 +3,7 @@
 
 from django.core.management.base import BaseCommand
 
+
 class Command(BaseCommand):
     option_list = BaseCommand.option_list + (
         make_option("--list", action="store_true", dest="list",

Modified: django/trunk/tests/regressiontests/bash_completion/models.py
===================================================================
--- django/trunk/tests/regressiontests/bash_completion/models.py        
2009-11-30 10:45:30 UTC (rev 11784)
+++ django/trunk/tests/regressiontests/bash_completion/models.py        
2009-12-02 00:30:00 UTC (rev 11785)
@@ -0,0 +1 @@
+

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.


Reply via email to