Changes between Initial Version and Version 2 of Ticket #28776


Ignore:
Timestamp:
Nov 6, 2017, 9:42:08 PM (7 years ago)
Author:
Tim Graham
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28776

    • Property Resolutionfixed
    • Property Status newclosed
    • Property Triage Stage UnreviewedReady for checkin
    • Property Summary Grammar a/an/anda/an/and typos in docs and comments
    • Property Type UncategorizedBug
  • Ticket #28776 – Description

    initial v2  
    1 {{{
    2 diff --git a/django/contrib/contenttypes/views.py b/django/contrib/contenttypes/views.py
    3 --- a/django/contrib/contenttypes/views.py
    4 +++ b/django/contrib/contenttypes/views.py
    5 @@ -50,7 +50,7 @@ def shortcut(request, content_type_id, object_id):
    6  
    7          opts = obj._meta
    8  
    9 -        # First, look for an many-to-many relationship to Site.
    10 +        # First, look for a many-to-many relationship to Site.
    11          for field in opts.many_to_many:
    12              if field.remote_field.model is Site:
    13                  try:
    14 diff --git a/django/contrib/staticfiles/finders.py b/django/contrib/staticfiles/finders.py
    15 --- a/django/contrib/staticfiles/finders.py
    16 +++ b/django/contrib/staticfiles/finders.py
    17 @@ -204,7 +204,7 @@ class BaseStorageFinder(BaseFinder):
    18              raise ImproperlyConfigured("The staticfiles storage finder %r "
    19                                         "doesn't have a storage class "
    20                                         "assigned." % self.__class__)
    21 -        # Make sure we have an storage instance here.
    22 +        # Make sure we have a storage instance here.
    23          if not isinstance(self.storage, (Storage, LazyObject)):
    24              self.storage = self.storage()
    25          super().__init__(*args, **kwargs)
    26 diff --git a/django/core/files/uploadedfile.py b/django/core/files/uploadedfile.py
    27 --- a/django/core/files/uploadedfile.py
    28 +++ b/django/core/files/uploadedfile.py
    29 @@ -15,7 +15,7 @@ __all__ = ('UploadedFile', 'TemporaryUploadedFile', 'InMemoryUploadedFile',
    30  
    31  class UploadedFile(File):
    32      """
    33 -    A abstract uploaded file (``TemporaryUploadedFile`` and
    34 +    An abstract uploaded file (``TemporaryUploadedFile`` and
    35      ``InMemoryUploadedFile`` are the built-in concrete subclasses).
    36  
    37      An ``UploadedFile`` object behaves somewhat like a file object and
    38 diff --git a/django/core/mail/backends/filebased.py b/django/core/mail/backends/filebased.py
    39 --- a/django/core/mail/backends/filebased.py
    40 +++ b/django/core/mail/backends/filebased.py
    41 @@ -21,7 +21,7 @@ class EmailBackend(ConsoleEmailBackend):
    42          if not isinstance(self.file_path, str):
    43              raise ImproperlyConfigured('Path for saving emails is invalid: %r' % self.file_path)
    44          self.file_path = os.path.abspath(self.file_path)
    45 -        # Make sure that self.file_path is an directory if it exists.
    46 +        # Make sure that self.file_path is a directory if it exists.
    47          if os.path.exists(self.file_path) and not os.path.isdir(self.file_path):
    48              raise ImproperlyConfigured(
    49                  'Path for saving email messages exists, but is not a directory: %s' % self.file_path
    50 diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py
    51 --- a/django/core/management/commands/loaddata.py
    52 +++ b/django/core/management/commands/loaddata.py
    53 @@ -72,7 +72,7 @@ class Command(BaseCommand):
    54              self.loaddata(fixture_labels)
    55  
    56          # Close the DB connection -- unless we're still in a transaction. This
    57 -        # is required as a workaround for an  edge case in MySQL: if the same
    58 +        # is required as a workaround for an edge case in MySQL: if the same
    59          # connection is used to create tables, load data, and query, the query
    60          # can return incorrect results. See Django #7572, MySQL #37735.
    61          if transaction.get_autocommit(self.using):
    62 diff --git a/django/db/models/fields/related_lookups.py b/django/db/models/fields/related_lookups.py
    63 --- a/django/db/models/fields/related_lookups.py
    64 +++ b/django/db/models/fields/related_lookups.py
    65 @@ -63,7 +63,7 @@ class RelatedIn(In):
    66          if isinstance(self.lhs, MultiColSource):
    67              # For multicolumn lookups we need to build a multicolumn where clause.
    68              # This clause is either a SubqueryConstraint (for values that need to be compiled to
    69 -            # SQL) or a OR-combined list of (col1 = val1 AND col2 = val2 AND ...) clauses.
    70 +            # SQL) or an OR-combined list of (col1 = val1 AND col2 = val2 AND ...) clauses.
    71              from django.db.models.sql.where import WhereNode, SubqueryConstraint, AND, OR
    72  
    73              root_constraint = WhereNode(connector=OR)
    74 diff --git a/django/http/response.py b/django/http/response.py
    75 --- a/django/http/response.py
    76 +++ b/django/http/response.py
    77 @@ -489,7 +489,7 @@ class JsonResponse(HttpResponse):
    78      :param data: Data to be dumped into json. By default only ``dict`` objects
    79        are allowed to be passed due to a security flaw before EcmaScript 5. See
    80        the ``safe`` parameter for more information.
    81 -    :param encoder: Should be an json encoder class. Defaults to
    82 +    :param encoder: Should be a json encoder class. Defaults to
    83        ``django.core.serializers.json.DjangoJSONEncoder``.
    84      :param safe: Controls if only ``dict`` objects may be serialized. Defaults
    85        to ``True``.
    86 diff --git a/django/shortcuts.py b/django/shortcuts.py
    87 --- a/django/shortcuts.py
    88 +++ b/django/shortcuts.py
    89 @@ -79,7 +79,7 @@ def get_object_or_404(klass, *args, **kwargs):
    90      klass may be a Model, Manager, or QuerySet object. All other passed
    91      arguments and keyword arguments are used in the get() query.
    92  
    93 -    Note: Like with get(), an MultipleObjectsReturned will be raised if more than one
    94 +    Note: Like with get(), a MultipleObjectsReturned will be raised if more than one
    95      object is found.
    96      """
    97      queryset = _get_queryset(klass)
    98 diff --git a/django/views/generic/edit.py b/django/views/generic/edit.py
    99 --- a/django/views/generic/edit.py
    100 +++ b/django/views/generic/edit.py
    101 @@ -159,7 +159,7 @@ class FormView(TemplateResponseMixin, BaseFormView):
    102  
    103  class BaseCreateView(ModelFormMixin, ProcessFormView):
    104      """
    105 -    Base view for creating an new object instance.
    106 +    Base view for creating a new object instance.
    107  
    108      Using this base class requires subclassing to provide a response mixin.
    109      """
    110 diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
    111 --- a/docs/ref/settings.txt
    112 +++ b/docs/ref/settings.txt
    113 @@ -1862,7 +1862,7 @@ __ https://github.com/django/django/blob/master/django/utils/log.py
    114  Default: ``'logging.config.dictConfig'``
    115  
    116  A path to a callable that will be used to configure logging in the
    117 -Django project. Points at a instance of Python's :ref:`dictConfig
    118 +Django project. Points at an instance of Python's :ref:`dictConfig
    119  <logging-config-dictschema>` configuration method by default.
    120  
    121  If you set :setting:`LOGGING_CONFIG` to ``None``, the logging
    122 diff --git a/docs/releases/1.1.txt b/docs/releases/1.1.txt
    123 --- a/docs/releases/1.1.txt
    124 +++ b/docs/releases/1.1.txt
    125 @@ -207,7 +207,7 @@ detail in :doc:`the ORM aggregation documentation </topics/db/aggregation>`.
    126  Query expressions
    127  ~~~~~~~~~~~~~~~~~
    128  
    129 -Queries can now refer to a another field on the query and can traverse
    130 +Queries can now refer to another field on the query and can traverse
    131  relationships to refer to fields on related models. This is implemented in the
    132  new :class:`~django.db.models.F` object; for full details, including examples,
    133  consult the :class:`F expressions documentation <django.db.models.F>`.
    134 diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py
    135 --- a/tests/admin_checks/tests.py
    136 +++ b/tests/admin_checks/tests.py
    137 @@ -354,7 +354,7 @@ class SystemChecksTestCase(SimpleTestCase):
    138      def test_generic_inline_model_admin_non_generic_model(self):
    139          """
    140          A model without a GenericForeignKey raises problems if it's included
    141 -        in an GenericInlineModelAdmin definition.
    142 +        in a GenericInlineModelAdmin definition.
    143          """
    144          class BookInline(GenericStackedInline):
    145              model = Book
    146 diff --git a/tests/auth_tests/test_checks.py b/tests/auth_tests/test_checks.py
    147 --- a/tests/auth_tests/test_checks.py
    148 +++ b/tests/auth_tests/test_checks.py
    149 @@ -58,7 +58,7 @@ class UserModelChecksTests(SimpleTestCase):
    150      def test_username_non_unique(self):
    151          """
    152          A non-unique USERNAME_FIELD should raise an error only if we use the
    153 -        default authentication backend. Otherwise, an warning should be raised.
    154 +        default authentication backend. Otherwise, a warning should be raised.
    155          """
    156          errors = checks.run_checks()
    157          self.assertEqual(errors, [
    158 diff --git a/tests/files/tests.py b/tests/files/tests.py
    159 --- a/tests/files/tests.py
    160 +++ b/tests/files/tests.py
    161 @@ -244,7 +244,7 @@ class DimensionClosingBug(unittest.TestCase):
    162          """
    163          # We need to inject a modified open() builtin into the images module
    164          # that checks if the file was closed properly if the function is
    165 -        # called with a filename instead of an file object.
    166 +        # called with a filename instead of a file object.
    167          # get_image_dimensions will call our catching_open instead of the
    168          # regular builtin one.
    169  
    170 diff --git a/tests/m2m_through_regress/models.py b/tests/m2m_through_regress/models.py
    171 --- a/tests/m2m_through_regress/models.py
    172 +++ b/tests/m2m_through_regress/models.py
    173 @@ -40,7 +40,7 @@ class Group(models.Model):
    174          return self.name
    175  
    176  
    177 -# A set of models that use an non-abstract inherited model as the 'through' model.
    178 +# A set of models that use a non-abstract inherited model as the 'through' model.
    179  class A(models.Model):
    180      a_text = models.CharField(max_length=20)
    181  
    182 diff --git a/tests/managers_regress/tests.py b/tests/managers_regress/tests.py
    183 --- a/tests/managers_regress/tests.py
    184 +++ b/tests/managers_regress/tests.py
    185 @@ -65,7 +65,7 @@ class ManagersRegressionTests(TestCase):
    186              AbstractBase3.objects.all()
    187  
    188      def test_custom_abstract_manager(self):
    189 -        # Accessing the manager on an abstract model with an custom
    190 +        # Accessing the manager on an abstract model with a custom
    191          # manager should raise an attribute error with an appropriate
    192          # message.
    193          msg = "Manager isn't available; AbstractBase2 is abstract"
    194 diff --git a/tests/many_to_one/tests.py b/tests/many_to_one/tests.py
    195 --- a/tests/many_to_one/tests.py
    196 +++ b/tests/many_to_one/tests.py
    197 @@ -570,12 +570,12 @@ class ManyToOneTests(TestCase):
    198          Third.objects.create(name='Third 1')
    199          Third.objects.create(name='Third 2')
    200          th = Third(name="testing")
    201 -        # The object isn't saved an thus the relation field is null - we won't even
    202 +        # The object isn't saved and thus the relation field is null - we won't even
    203          # execute a query in this case.
    204          with self.assertNumQueries(0):
    205              self.assertEqual(th.child_set.count(), 0)
    206          th.save()
    207 -        # Now the model is saved, so we will need to execute an query.
    208 +        # Now the model is saved, so we will need to execute a query.
    209          with self.assertNumQueries(1):
    210              self.assertEqual(th.child_set.count(), 0)
    211  
    212 @@ -591,7 +591,7 @@ class ManyToOneTests(TestCase):
    213  
    214          self.assertEqual(public_student.school, public_school)
    215  
    216 -        # Make sure the base manager is used so that an student can still access
    217 +        # Make sure the base manager is used so that a student can still access
    218          # its related school even if the default manager doesn't normally
    219          # allow it.
    220          self.assertEqual(private_student.school, private_school)
    221 diff --git a/tests/migrations/test_autodetector.py b/tests/migrations/test_autodetector.py
    222 --- a/tests/migrations/test_autodetector.py
    223 +++ b/tests/migrations/test_autodetector.py
    224 @@ -1146,7 +1146,7 @@ class AutodetectorTests(TestCase):
    225          # a CreateModel operation w/o any definition on the original model
    226          model_state_not_specified = ModelState("a", "model", [("id", models.AutoField(primary_key=True))])
    227          # Explicitly testing for None, since this was the issue in #23452 after
    228 -        # a AlterFooTogether operation with e.g. () as value
    229 +        # an AlterFooTogether operation with e.g. () as value
    230          model_state_none = ModelState("a", "model", [
    231              ("id", models.AutoField(primary_key=True))
    232          ], {
    233 diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
    234 --- a/tests/migrations/test_commands.py
    235 +++ b/tests/migrations/test_commands.py
    236 @@ -155,7 +155,7 @@ class MigrateTests(MigrationTestBase):
    237              # Fails because "migrations_tribble" does not exist but needs to in
    238              # order to make --fake-initial work.
    239              call_command("migrate", "migrations", fake_initial=True, verbosity=0)
    240 -        # Fake a apply
    241 +        # Fake an apply
    242          call_command("migrate", "migrations", fake=True, verbosity=0)
    243          call_command("migrate", "migrations", fake=True, verbosity=0, database="other")
    244          # Unmigrate everything
    245 diff --git a/tests/model_regress/tests.py b/tests/model_regress/tests.py
    246 --- a/tests/model_regress/tests.py
    247 +++ b/tests/model_regress/tests.py
    248 @@ -188,7 +188,7 @@ class ModelTests(TestCase):
    249  
    250      @skipUnlessDBFeature("supports_timezones")
    251      def test_timezones(self):
    252 -        # Saving an updating with timezone-aware datetime Python objects.
    253 +        # Saving and updating with timezone-aware datetime Python objects.
    254          # Regression test for #10443.
    255          # The idea is that all these creations and saving should work without
    256          # crashing. It's not rocket science.
    257 diff --git a/tests/proxy_models/models.py b/tests/proxy_models/models.py
    258 --- a/tests/proxy_models/models.py
    259 +++ b/tests/proxy_models/models.py
    260 @@ -69,7 +69,7 @@ class ManagerMixin(models.Model):
    261  
    262  class OtherPerson(Person, ManagerMixin):
    263      """
    264 -    A class with the default manager from Person, plus an secondary manager.
    265 +    A class with the default manager from Person, plus a secondary manager.
    266      """
    267      class Meta:
    268          proxy = True
    269 diff --git a/tests/requests/tests.py b/tests/requests/tests.py
    270 --- a/tests/requests/tests.py
    271 +++ b/tests/requests/tests.py
    272 @@ -235,7 +235,7 @@ class RequestsTests(SimpleTestCase):
    273          self.assertEqual(response.cookies['c']['expires'], '')
    274  
    275      def test_far_expiration(self):
    276 -        "Cookie will expire when an distant expiration time is provided"
    277 +        "Cookie will expire when a distant expiration time is provided"
    278          response = HttpResponse()
    279          response.set_cookie('datetime', expires=datetime(2028, 1, 1, 4, 5, 6))
    280          datetime_cookie = response.cookies['datetime']
    281 diff --git a/tests/staticfiles_tests/project/documents/cached/css/fonts/font.eot b/tests/staticfiles_tests/project/documents/cached/css/fonts/font.eot
    282 --- a/tests/staticfiles_tests/project/documents/cached/css/fonts/font.eot
    283 +++ b/tests/staticfiles_tests/project/documents/cached/css/fonts/font.eot
    284 @@ -1 +1 @@
    285 -not really a EOT ;)
    286 \ No newline at end of file
    287 +not really an EOT ;)
    288 \ No newline at end of file
    289 }}}
     1See attached patch.
Back to Top