diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2013-08-10 20:00:12 +0100 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2013-08-10 20:00:12 +0100 |
| commit | 7970d97a708f0d2f4fbd654eaf785338ab04cc1e (patch) | |
| tree | 9838e4a22e20a85aa936ea06d46c80cf0e6b1262 /django | |
| parent | 3c3d308ea3e017868b6530df144dd1824471b6f2 (diff) | |
Docs tweaks (thanks timgraham)
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/backends/mysql/introspection.py | 6 | ||||
| -rw-r--r-- | django/db/migrations/autodetector.py | 2 | ||||
| -rw-r--r-- | django/db/migrations/graph.py | 8 | ||||
| -rw-r--r-- | django/test/runner.py | 2 | ||||
| -rw-r--r-- | django/utils/datastructures.py | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/django/db/backends/mysql/introspection.py b/django/db/backends/mysql/introspection.py index 0cad8d9b9d..d7a29057de 100644 --- a/django/db/backends/mysql/introspection.py +++ b/django/db/backends/mysql/introspection.py @@ -1,6 +1,6 @@ import re from .base import FIELD_TYPE -from django.utils.datastructures import SortedSet +from django.utils.datastructures import OrderedSet from django.db.backends import BaseDatabaseIntrospection, FieldInfo from django.utils.encoding import force_text @@ -142,7 +142,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): for constraint, column, ref_table, ref_column in cursor.fetchall(): if constraint not in constraints: constraints[constraint] = { - 'columns': SortedSet(), + 'columns': OrderedSet(), 'primary_key': False, 'unique': False, 'index': False, @@ -170,7 +170,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): for table, non_unique, index, colseq, column in [x[:5] for x in cursor.fetchall()]: if index not in constraints: constraints[index] = { - 'columns': SortedSet(), + 'columns': OrderedSet(), 'primary_key': False, 'unique': False, 'index': True, diff --git a/django/db/migrations/autodetector.py b/django/db/migrations/autodetector.py index 259ee0bd5b..ff5957fe7e 100644 --- a/django/db/migrations/autodetector.py +++ b/django/db/migrations/autodetector.py @@ -29,7 +29,7 @@ class MigrationAutodetector(object): """ Returns a dict of migration plans which will achieve the change from from_state to to_state. The dict has app labels - as kays and a list of migrations as values. + as keys and a list of migrations as values. The resulting migrations aren't specially named, but the names do matter for dependencies inside the set. diff --git a/django/db/migrations/graph.py b/django/db/migrations/graph.py index 3b6495689a..fcd83913c8 100644 --- a/django/db/migrations/graph.py +++ b/django/db/migrations/graph.py @@ -1,4 +1,4 @@ -from django.utils.datastructures import SortedSet +from django.utils.datastructures import OrderedSet from django.db.migrations.state import ProjectState @@ -13,7 +13,7 @@ class MigrationGraph(object): branch merges can be detected and resolved. Migrations files can be marked as replacing another set of migrations - - this is to support the "squash" feature. The graph handler isn't resposible + this is to support the "squash" feature. The graph handler isn't responsible for these; instead, the code to load them in here should examine the migration files and if the replaced migrations are all either unapplied or not present, it should ignore the replaced ones, load in just the @@ -109,8 +109,8 @@ class MigrationGraph(object): for n in children: results = _dfs(n, get_children, path) + results path.pop() - # Use SortedSet to ensure only one instance of each result - results = list(SortedSet(results)) + # Use OrderedSet to ensure only one instance of each result + results = list(OrderedSet(results)) # Populate DP cache cache[(start, get_children)] = results # Done! diff --git a/django/test/runner.py b/django/test/runner.py index c7881ada63..84fe2499f1 100644 --- a/django/test/runner.py +++ b/django/test/runner.py @@ -267,7 +267,7 @@ def setup_databases(verbosity, interactive, **kwargs): # Second pass -- actually create the databases. old_names = [] mirrors = [] - + for signature, (db_name, aliases) in dependency_ordered( test_databases.items(), dependencies): test_db_name = None diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py index d61b569112..a0ee3e06ef 100644 --- a/django/utils/datastructures.py +++ b/django/utils/datastructures.py @@ -237,7 +237,7 @@ class SortedDict(dict): super(SortedDict, self).clear() self.keyOrder = [] -class SortedSet(object): +class OrderedSet(object): """ A set which keeps the ordering of the inserted items. Currently backs onto OrderedDict. |
