From f84f3d486f9e40512350bc91ae5230795237ff4c Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sun, 4 Nov 2018 17:20:26 -0800 Subject: [PATCH] Trim trailing white space throughout the project Many editors clean up trailing white space on save. By removing it all in one go, it helps keep future diffs cleaner by avoiding spurious white space changes on unrelated lines. --- CODE_OF_CONDUCT.md | 1 - LICENSE | 6 +++--- docs/api_widgets.rst | 2 +- docs/changelog.rst | 4 ++-- import_export/mixins.py | 2 +- import_export/widgets.py | 4 ++-- tests/core/tests/test_admin_integration.py | 4 ++-- tests/database.db | Bin 70656 -> 70652 bytes 8 files changed, 11 insertions(+), 12 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d1ebd1d..9420974 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -71,4 +71,3 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org - diff --git a/LICENSE b/LICENSE index b49930c..c8b4a8a 100644 --- a/LICENSE +++ b/LICENSE @@ -4,10 +4,10 @@ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. diff --git a/docs/api_widgets.rst b/docs/api_widgets.rst index f956ca3..94b69a5 100644 --- a/docs/api_widgets.rst +++ b/docs/api_widgets.rst @@ -28,7 +28,7 @@ Widgets .. autoclass:: import_export.widgets.DurationWidget :members: - + .. autoclass:: import_export.widgets.JSONWidget :members: diff --git a/docs/changelog.rst b/docs/changelog.rst index 7b7568f..012e83c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -17,7 +17,7 @@ Changelog - JSONWidget for jsonb fields (#803) -- Add ExportActionMixin (#809) +- Add ExportActionMixin (#809) - Add Import Export Permissioning #608 (#804) @@ -166,7 +166,7 @@ Changelog - Append rows to Result object via function call to allow overriding (#462) -- Add get_resource_kwargs to allow passing request to resource (#457) +- Add get_resource_kwargs to allow passing request to resource (#457) - Expose Django user to get_export_data() and export() (#447) diff --git a/import_export/mixins.py b/import_export/mixins.py index 5e44c19..abf3a32 100644 --- a/import_export/mixins.py +++ b/import_export/mixins.py @@ -64,7 +64,7 @@ class ExportViewMixin(object): class ExportViewFormMixin(ExportViewMixin, FormView): - def form_valid(self, form): + def form_valid(self, form): formats = self.get_export_formats() file_format = formats[ int(form.cleaned_data['file_format']) diff --git a/import_export/widgets.py b/import_export/widgets.py index 1de4714..99d1351 100644 --- a/import_export/widgets.py +++ b/import_export/widgets.py @@ -269,7 +269,7 @@ class SimpleArrayWidget(Widget): def render(self, value, obj=None): return self.separator.join(six.text_type(v) for v in value) - + class JSONWidget(Widget): """ Widget for a JSON object (especially required for jsonb fields in PostgreSQL database.) @@ -310,7 +310,7 @@ class ForeignKeyWidget(Widget): from import_export import fields, resources from import_export.widgets import ForeignKeyWidget - + class BookResource(resources.ModelResource): author = fields.Field( column_name='author', diff --git a/tests/core/tests/test_admin_integration.py b/tests/core/tests/test_admin_integration.py index 403e1b9..4b73640 100644 --- a/tests/core/tests/test_admin_integration.py +++ b/tests/core/tests/test_admin_integration.py @@ -64,7 +64,7 @@ class ImportExportAdminIntegrationTest(TestCase): response = self.client.post('/admin/core/book/process_import/', data, follow=True) self.assertEqual(response.status_code, 200) - self.assertContains(response, + self.assertContains(response, _('Import finished, with {} new and {} updated {}.').format( 1, 0, Book._meta.verbose_name_plural) ) @@ -101,7 +101,7 @@ class ImportExportAdminIntegrationTest(TestCase): response = self.client.post('/admin/core/book/process_import/', data, follow=True) self.assertEqual(response.status_code, 200) - self.assertContains(response, + self.assertContains(response, _('Import finished, with {} new and {} updated {}.').format( 1, 0, Book._meta.verbose_name_plural) ) diff --git a/tests/database.db b/tests/database.db index 73a74853370b43cf79b4dd79b64257a137d7fec2..a252d0b0830e9b1446514a5e95849e8862dc80d7 100644 GIT binary patch delta 22 ecmZoz!SZK0%Z7i>n_T`gZ}Rx3zxjVT;~W5n$qT9g delta 41 wcmeyfoTXs}%Z7i>Oq`sX|2h9>X5`$Yz{;|j$>*mw6DJo?=pXauU)4-A0A8UGr2qf`