-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DE-870] Fix union type imports in exception models #43
Conversation
maciej-nedza
commented
Jun 17, 2024
•
edited
Loading
edited
- Fixed union type imports in exception models
✅ Linked to Task DE-870 · Regenerate and Release Python SDK with import UnionType in errors bugfix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Outside diff range and nitpick comments (3)
advancedbilling/exceptions/customer_error_response_exception.py (1)
Line range hint
24-24
: Use the modern Pythonsuper()
syntax without parameters.- super(CustomerErrorResponseException, self).__init__(reason, response) + super().__init__(reason, response)advancedbilling/exceptions/subscription_group_create_error_response_exception.py (1)
Line range hint
24-24
: Use the modern Pythonsuper()
syntax without parameters.- super(SubscriptionGroupCreateErrorResponseException, self).__init__(reason, response) + super().__init__(reason, response)advancedbilling/controllers/base_controller.py (1)
Line range hint
16-16
: Remove redundant inheritance fromobject
.- class BaseController(object): + class BaseController:
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- README.md (3 hunks)
- advancedbilling/controllers/base_controller.py (1 hunks)
- advancedbilling/exceptions/customer_error_response_exception.py (1 hunks)
- advancedbilling/exceptions/subscription_group_create_error_response_exception.py (1 hunks)
- pyproject.toml (1 hunks)
Files skipped from review due to trivial changes (1)
- pyproject.toml
Additional context used
Ruff
advancedbilling/exceptions/customer_error_response_exception.py
1-1: UTF-8 encoding declaration is unnecessary (UP009)
Remove unnecessary coding comment
24-24: Use
super()
instead ofsuper(__class__, self)
(UP008)Remove
__super__
parametersadvancedbilling/exceptions/subscription_group_create_error_response_exception.py
1-1: UTF-8 encoding declaration is unnecessary (UP009)
Remove unnecessary coding comment
24-24: Use
super()
instead ofsuper(__class__, self)
(UP008)Remove
__super__
parametersadvancedbilling/controllers/base_controller.py
1-1: UTF-8 encoding declaration is unnecessary (UP009)
Remove unnecessary coding comment
16-16: Class
BaseController
inherits fromobject
(UP004)Remove
object
inheritance
LanguageTool
README.md
[uncategorized] ~8-~8: If this is a compound adjective that modifies the following noun, use a hyphen. (EN_COMPOUND_ADJECTIVE_INTERNAL)
Context: ...d format, but XML is also provided as a backwards compatible option for Merchants who require it. #...
[uncategorized] ~101-~101: The Latin adjective/adverb “pro forma” is spelled as two words. (PRO_RATA)
Context: ...controllers/product-price-points.md) * [Proforma Invoices](https://www.github.com/maxio-...
Markdownlint
README.md
131-131: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
26-26: null (MD034, no-bare-urls)
Bare URL used
38-38: null (MD034, no-bare-urls)
Bare URL used
24-24: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
48-48: Expected: underscore; Actual: asterisk (MD049, emphasis-style)
Emphasis style
48-48: Expected: underscore; Actual: asterisk (MD049, emphasis-style)
Emphasis style
49-49: Expected: underscore; Actual: asterisk (MD049, emphasis-style)
Emphasis style
49-49: Expected: underscore; Actual: asterisk (MD049, emphasis-style)
Emphasis style
Additional comments not posted (4)
advancedbilling/controllers/base_controller.py (1)
33-33
: The version number has been correctly updated.README.md (3)
34-34
: The pip install command has been correctly updated to reflect the new version number.
38-38
: The package link has been correctly updated to reflect the new version number.Tools
Markdownlint
38-38: null (MD034, no-bare-urls)
Bare URL used
42-42
: The documentation link has been correctly updated to reflect the new version number.
advancedbilling/exceptions/subscription_group_create_error_response_exception.py
Show resolved
Hide resolved
WalkthroughThe changes encompass a minor version update of the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range and nitpick comments (2)
advancedbilling/exceptions/customer_error_response_exception.py (2)
Line range hint
1-1
: Remove the unnecessary UTF-8 encoding declaration, as Python files are UTF-8 encoded by default.- # -*- coding: utf-8 -*-
Line range hint
24-24
: Usesuper()
without arguments for simplicity and clarity.- super(CustomerErrorResponseException, self).__init__(reason, response) + super().__init__(reason, response)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (8)
- README.md (3 hunks)
- advancedbilling/controllers/base_controller.py (1 hunks)
- advancedbilling/exceptions/customer_error_response_exception.py (1 hunks)
- advancedbilling/exceptions/subscription_group_create_error_response_exception.py (1 hunks)
- pyproject.toml (1 hunks)
- tests/test_customers.py (1 hunks)
- tests/test_invoices.py (1 hunks)
- tests/test_subscriptions.py (2 hunks)
Files not reviewed due to errors (2)
- advancedbilling/exceptions/subscription_group_create_error_response_exception.py (no review received)
- advancedbilling/controllers/base_controller.py (no review received)
Files skipped from review as they are similar to previous changes (1)
- pyproject.toml
Additional context used
Ruff
advancedbilling/exceptions/customer_error_response_exception.py
1-1: UTF-8 encoding declaration is unnecessary (UP009)
Remove unnecessary coding comment
24-24: Use
super()
instead ofsuper(__class__, self)
(UP008)Remove
__super__
parametersadvancedbilling/exceptions/subscription_group_create_error_response_exception.py
1-1: UTF-8 encoding declaration is unnecessary (UP009)
Remove unnecessary coding comment
24-24: Use
super()
instead ofsuper(__class__, self)
(UP008)Remove
__super__
parametersadvancedbilling/controllers/base_controller.py
1-1: UTF-8 encoding declaration is unnecessary (UP009)
Remove unnecessary coding comment
16-16: Class
BaseController
inherits fromobject
(UP004)Remove
object
inheritancetests/test_subscriptions.py
106-106: Replace unpacked list comprehension with a generator expression (UP027)
Replace with generator expression
LanguageTool
README.md
[uncategorized] ~8-~8: If this is a compound adjective that modifies the following noun, use a hyphen. (EN_COMPOUND_ADJECTIVE_INTERNAL)
Context: ...d format, but XML is also provided as a backwards compatible option for Merchants who require it. #...
[uncategorized] ~101-~101: The Latin adjective/adverb “pro forma” is spelled as two words. (PRO_RATA)
Context: ...controllers/product-price-points.md) * [Proforma Invoices](https://www.github.com/maxio-...
Markdownlint
README.md
131-131: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
26-26: null (MD034, no-bare-urls)
Bare URL used
38-38: null (MD034, no-bare-urls)
Bare URL used
24-24: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading
48-48: Expected: underscore; Actual: asterisk (MD049, emphasis-style)
Emphasis style
48-48: Expected: underscore; Actual: asterisk (MD049, emphasis-style)
Emphasis style
49-49: Expected: underscore; Actual: asterisk (MD049, emphasis-style)
Emphasis style
49-49: Expected: underscore; Actual: asterisk (MD049, emphasis-style)
Emphasis style
Additional comments not posted (11)
tests/test_customers.py (1)
10-22
: The test methodtest_invalid_customer_creation_throws_422_error
is well-structured and effectively checks for the correct error response when an invalid customer creation is attempted.README.md (7)
34-34
: Updated version number reflects the new SDK version.
38-38
: Correctly updated package link.Tools
Markdownlint
38-38: null (MD034, no-bare-urls)
Bare URL used
42-42
: Documentation link correctly updated to the new version.
59-59
: Updated documentation link for Basic Authentication.
89-89
: Updated Basic Authentication link.
93-123
: All API controller links updated to reflect the new version.Tools
LanguageTool
[uncategorized] ~101-~101: The Latin adjective/adverb “pro forma” is spelled as two words. (PRO_RATA)
Context: ...controllers/product-price-points.md) * [Proforma Invoices](https://www.github.com/maxio-...
127-129
: Utility classes and HTTP request/response documentation links correctly updated.tests/test_subscriptions.py (2)
144-145
: Properly checks for the specific error code and message when a customer does not exist.
162-162
: Correctly asserts the response code for unauthorized access.tests/test_invoices.py (1)
247-251
: Correctly handles the error scenario when the end period is less than the start period.