Skip to content

feat: subscription refactor [frappe] PR#30963

Bot Dokos requested to merge ft-pr-30963 into develop

See https://github.com/frappe/erpnext/pull/30963

Date: 2023-08-07T08:33:47+05:30

  • feat: subscription refactor (#30963)



Diagnostics

Check python ast.........................................................Failed
- hook id: check-ast
- exit code: 1

erpnext/accounts/doctype/subscription/subscription.py: failed parsing with CPython 3.10.12:

    Traceback (most recent call last):
      File "/root/.cache/pre-commit/repo7uobz2zy/py_env-python3.10/lib/python3.10/site-packages/pre_commit_hooks/check_ast.py", line 20, in main
        ast.parse(f.read(), filename=filename)
      File "/usr/local/lib/python3.10/ast.py", line 50, in parse
        return compile(source, filename, mode, flags,
      File "erpnext/accounts/doctype/subscription/subscription.py", line 508
        			if not prorate:
        		^
    IndentationError: unexpected indent

erpnext/accounts/doctype/subscription/test_subscription.py: failed parsing with CPython 3.10.12:

    Traceback (most recent call last):
      File "/root/.cache/pre-commit/repo7uobz2zy/py_env-python3.10/lib/python3.10/site-packages/pre_commit_hooks/check_ast.py", line 20, in main
        ast.parse(f.read(), filename=filename)
      File "/usr/local/lib/python3.10/ast.py", line 50, in parse
        return compile(source, filename, mode, flags,
      File "erpnext/accounts/doctype/subscription/test_subscription.py", line 659
        			if current_invoice_end != subscription.current_invoice_end:
        		^
    IndentationError: unexpected indent

eslint...................................................................Failed
- hook id: eslint
- exit code: 1

erpnext/accounts/doctype/subscription/subscription.js
  58:3  error  Parsing error: Unexpected token }

✖ 1 problem (1 error, 0 warnings)

flake8...................................................................Failed
- hook id: flake8
- exit code: 1

erpnext/accounts/doctype/subscription/subscription.py:508:4: E999 IndentationError: unexpected indent
erpnext/accounts/doctype/subscription/test_subscription.py:659:4: E999 IndentationError: unexpected indent



Checkout instructions
# Checkout locally
git fetch upstream
git switch ft-pr-30963

# Make changes then rebase
git rebase -i upstream/develop --reapply-cherry-picks

# Fix or ignore conflicts
git checkout --theirs .
git rebase --continue

# Force-push changes
git push --force-with-lease

Merge request reports