Skip to content

Commit

Permalink
Reformat with black (dj-stripe#928)
Browse files Browse the repository at this point in the history
Also

* changed isort config to match black (see https://black.readthedocs.io/en/stable/the_black_code_style.html?highlight=.isort.cfg#how-black-wraps-lines )
* changed editorconfig + isort to space instead of tabs
* updated most other files to replace tab with 4 space.
* set flake8 limit to 88 to match black default

Resolves dj-stripe#926
  • Loading branch information
therefromhere authored Aug 3, 2019
1 parent 23ab857 commit e01686f
Show file tree
Hide file tree
Showing 124 changed files with 24,326 additions and 22,719 deletions.
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ root = true
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = tab
indent_style = space
quote_type = double
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 88

[*.json]
insert_final_newline = false
16 changes: 8 additions & 8 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ Changes from API 2019-02-19:

- Special handling of the icon and logo fields:

- Renamed ``Account.business_logo`` to ``Account.branding_icon``
(note that in Stripe's API ``Account.business_logo`` was renamed to ``Account.settings.branding_icon``,
and ``Account.business_logo_large`` (which we didn't have a field for) was renamed to ``Account.settings.branding_logo``)
- Added deprecated property for ``Account.business_logo``
- Added ``Account.branding_logo`` as a ForeignKey
- Populate ``Account.branding_icon`` and ``.branding_logo`` from the new ``Account.settings.branding.icon`` and ``.logo``
- Renamed ``Account.business_logo`` to ``Account.branding_icon``
(note that in Stripe's API ``Account.business_logo`` was renamed to ``Account.settings.branding_icon``,
and ``Account.business_logo_large`` (which we didn't have a field for) was renamed to ``Account.settings.branding_logo``)
- Added deprecated property for ``Account.business_logo``
- Added ``Account.branding_logo`` as a ForeignKey
- Populate ``Account.branding_icon`` and ``.branding_logo`` from the new ``Account.settings.branding.icon`` and ``.logo``

Changes from API 2019-03-14:

Expand Down Expand Up @@ -566,9 +566,9 @@ BIG HUGE NOTE - DON'T OVERLOOK THIS
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. warning::
Subscription and InvoiceItem migration is not possible because old records don't have Stripe IDs (so we can't sync them). Our approach is to delete all local subscription and invoiceitem objects and re-sync them from Stripe.
Subscription and InvoiceItem migration is not possible because old records don't have Stripe IDs (so we can't sync them). Our approach is to delete all local subscription and invoiceitem objects and re-sync them from Stripe.

We 100% recommend you create a backup of your database before performing this upgrade.
We 100% recommend you create a backup of your database before performing this upgrade.


Other changes
Expand Down
31 changes: 18 additions & 13 deletions djstripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,24 @@


class DjstripeAppConfig(AppConfig):
"""
An AppConfig for dj-stripe which loads system checks
and event handlers once Django is ready.
"""
"""
An AppConfig for dj-stripe which loads system checks
and event handlers once Django is ready.
"""

name = "djstripe"
name = "djstripe"

def ready(self):
import stripe
from . import checks, event_handlers # noqa: Register the checks and event handlers
def ready(self):
import stripe
from . import ( # noqa: Register the checks and event handlers
checks,
event_handlers,
)

# Set app info
# https://stripe.com/docs/building-plugins#setappinfo
stripe.set_app_info(
"dj-stripe", version=__version__, url="https://github.com/dj-stripe/dj-stripe"
)
# Set app info
# https://stripe.com/docs/building-plugins#setappinfo
stripe.set_app_info(
"dj-stripe",
version=__version__,
url="https://github.com/dj-stripe/dj-stripe",
)
Loading

0 comments on commit e01686f

Please sign in to comment.