Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.11
rev: v0.14.13
hooks:
- id: ruff-check
- id: ruff-format
Expand All @@ -14,7 +14,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: no-commit-to-branch
args: [--pattern, '^release/.*']
args: [--pattern, "^release/.*"]
- id: detect-private-key

- repo: https://github.com/astral-sh/uv-pre-commit
Expand All @@ -26,10 +26,15 @@ repos:
rev: 7.3.0
hooks:
- id: flake8
additional_dependencies: [Flake8-pyproject, Flake8-AAA, wemake-python-styleguide==1.3.*]
additional_dependencies:
[
Flake8-pyproject==1.2.*,
Flake8-AAA==0.17.*,
wemake-python-styleguide==1.5.*,
]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.0
rev: v1.19.1
hooks:
- id: mypy
args: ["--config-file=pyproject.toml", "."]
Expand Down
37 changes: 19 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,36 @@ classifiers = [
]
dependencies = [
"httpx==0.28.*",
"python-box>=7.3.2",
"python-box==7.3.*",
]

[dependency-groups]
dev = [
"dependency-injector>=4.48.2",
"flake8-aaa>=0.17.2",
"flake8-pyproject>=1.2.3",
"dependency-injector==4.48.*",
"flake8==7.3.*", # force flake8 version to have same formatting everywhere, also update in pre-commit config
"flake8-aaa==0.17.*", # also update pre-commit config
"flake8-pyproject==1.2.*", # also update pre-commit config
"freezegun==1.5.*",
"ipdb==0.13.*",
"ipython==9.*",
"mypy==1.19.*",
"pre-commit==4.2.*",
"pyfakefs==5.10.*",
"pre-commit==4.5.*",
"pyfakefs==6.0.*",
"pytest==8.3.*",
"pytest-asyncio==1.2.*",
"pytest-cov==6.1.*",
"pytest-deadfixtures==2.2.*",
"pytest-mock==3.14.*",
"pytest-randomly==3.16.*",
"pytest-reportportal>=5.5.2",
"pytest-rerunfailures>=16.1",
"pytest-xdist==3.6.*",
"pytest-asyncio==1.3.*",
"pytest-cov==7.0.*",
"pytest-deadfixtures==3.1.*",
"pytest-mock==3.15.*",
"pytest-randomly==4.0.*",
"pytest-reportportal==5.6.*",
"pytest-rerunfailures==16.1.*",
"pytest-xdist==3.8.*",
"responses==0.25.*",
"respx==0.22.*",
"ruff==0.12.11", # force ruff version to have same formatting everywhere
"typing-extensions==4.13.*",
"wemake-python-styleguide==1.3.*",
"types-python-dateutil",
"ruff==0.14.13", # force ruff version to have same formatting everywhere
"typing-extensions==4.15.*",
"wemake-python-styleguide==1.5.*",
"types-python-dateutil==2.9.*",
]

[tool.hatch.build.targets.sdist]
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/account/test_async_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ async def test_account_rql_filter(async_mpt_ops, account_id):
"""Test filtering accounts using RQL asynchronously."""
selected_fields = ["-address"]
filtered_accounts = (
async_mpt_ops.accounts.accounts.filter(RQLQuery(id=account_id))
async_mpt_ops.accounts.accounts
.filter(RQLQuery(id=account_id))
.filter(RQLQuery(name="Test Api Client Vendor"))
.select(*selected_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/account/test_sync_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def test_account_rql_filter(mpt_ops, account_id):
"""Test filtering accounts using RQL synchronously."""
selected_fields = ["-address"]
filtered_accounts = (
mpt_ops.accounts.accounts.filter(RQLQuery(id=account_id))
mpt_ops.accounts.accounts
.filter(RQLQuery(id=account_id))
.filter(RQLQuery(name="Test Api Client Vendor"))
.select(*selected_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/api_tokens/test_async_api_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ async def test_filter_api_tokens(async_mpt_vendor, api_token_id):
"""Test filtering API tokens with specific criteria."""
select_fields = ["-description"]
filtered_api_tokens = (
async_mpt_vendor.accounts.api_tokens.filter(RQLQuery(id=api_token_id))
async_mpt_vendor.accounts.api_tokens
.filter(RQLQuery(id=api_token_id))
.filter(RQLQuery(name="E2E Seeded Token"))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/api_tokens/test_sync_api_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def test_filter_api_tokens(mpt_vendor, api_token_id):
"""Test filtering API tokens with specific criteria."""
select_fields = ["-name"]
filtered_api_tokens = (
mpt_vendor.accounts.api_tokens.filter(RQLQuery(id=api_token_id))
mpt_vendor.accounts.api_tokens
.filter(RQLQuery(id=api_token_id))
.filter(RQLQuery(name="E2E Seeded Token"))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/buyers/test_async_buyers.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ async def test_filter_buyers(async_mpt_ops, buyer_id):
"""Test filtering buyers using RQL asynchronously."""
select_fields = ["-address"]
async_filtered_buyers = (
async_mpt_ops.accounts.buyers.filter(RQLQuery(id=buyer_id))
async_mpt_ops.accounts.buyers
.filter(RQLQuery(id=buyer_id))
.filter(RQLQuery(name="E2E Seeded Buyer"))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/buyers/test_sync_buyers.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def test_filter_buyers(mpt_ops, buyer_id):
"""Test filtering buyers using RQL synchronously."""
select_fields = ["-address"]
filtered_buyers = (
mpt_ops.accounts.buyers.filter(RQLQuery(id=buyer_id))
mpt_ops.accounts.buyers
.filter(RQLQuery(id=buyer_id))
.filter(RQLQuery(name="E2E Seeded Buyer"))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/licensees/test_async_licensees.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ async def test_filter_licensees(async_mpt_client, licensee_id):
"""Test filtering licensees using RQL asynchronously."""
select_fields = ["-address"]
async_filtered_licensees = (
async_mpt_client.accounts.licensees.filter(RQLQuery(id=licensee_id))
async_mpt_client.accounts.licensees
.filter(RQLQuery(id=licensee_id))
.filter(RQLQuery(name="E2E Seeded Licensee"))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/licensees/test_sync_licensees.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def test_get_licensee_by_id_not_found(mpt_client, invalid_licensee_id):
def test_filter_licensees(mpt_client, licensee_id):
select_fields = ["-address"]
filtered_licensees = (
mpt_client.accounts.licensees.filter(RQLQuery(id=licensee_id))
mpt_client.accounts.licensees
.filter(RQLQuery(id=licensee_id))
.filter(RQLQuery(name="E2E Seeded Licensee"))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/modules/test_async_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ async def test_get_module_by_id_not_found(async_mpt_ops, invalid_module_id):
async def test_filter_modules(async_mpt_ops, module_id, module_name):
select_fields = ["-description"]
filtered_modules = (
async_mpt_ops.accounts.modules.filter(RQLQuery(id=module_id))
async_mpt_ops.accounts.modules
.filter(RQLQuery(id=module_id))
.filter(RQLQuery(name=module_name))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/modules/test_sync_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def test_get_module_by_id_not_found(mpt_ops, invalid_module_id):
def test_filter_modules(mpt_ops, module_id, module_name):
select_fields = ["-description"]
filtered_modules = (
mpt_ops.accounts.modules.filter(RQLQuery(id=module_id))
mpt_ops.accounts.modules
.filter(RQLQuery(id=module_id))
.filter(RQLQuery(name=module_name))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/sellers/test_async_sellers.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ async def test_get_seller_by_id_not_found(async_mpt_ops, invalid_seller_id):
async def test_filter_sellers(async_mpt_ops, seller_id):
select_fields = ["-address"]
async_filtered_sellers = (
async_mpt_ops.accounts.sellers.filter(RQLQuery(id=seller_id))
async_mpt_ops.accounts.sellers
.filter(RQLQuery(id=seller_id))
.filter(RQLQuery(name="E2E Seeded Seller"))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/sellers/test_sync_sellers.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def test_get_seller_by_id_not_found(mpt_ops, invalid_seller_id):
def test_filter_sellers(mpt_ops, seller_id):
select_fields = ["-address"]
filtered_sellers = (
mpt_ops.accounts.sellers.filter(RQLQuery(id=seller_id))
mpt_ops.accounts.sellers
.filter(RQLQuery(id=seller_id))
.filter(RQLQuery(name="E2E Seeded Seller"))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/user_groups/test_async_user_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ async def test_filter_user_groups(async_mpt_ops, user_group_id):
"""Test filtering user groups with specific criteria."""
select_fields = ["-name"]
filtered_user_groups = (
async_mpt_ops.accounts.user_groups.filter(RQLQuery(id=user_group_id))
async_mpt_ops.accounts.user_groups
.filter(RQLQuery(id=user_group_id))
.filter(RQLQuery(name="E2E Seeded User Group"))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/accounts/user_groups/test_sync_user_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def test_filter_user_groups(mpt_ops, user_group_id):
"""Test filtering user groups with specific criteria."""
select_fields = ["-name"]
filtered_user_groups = (
mpt_ops.accounts.user_groups.filter(RQLQuery(id=user_group_id))
mpt_ops.accounts.user_groups
.filter(RQLQuery(id=user_group_id))
.filter(RQLQuery(name="E2E Seeded User Group"))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/billing/credit_memo/test_async_credit_memo.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ async def test_filter_credit_memos(async_mpt_ops, credit_memo):
credit_memo_status = credit_memo.status
select_fields = ["-vendor"]
filtered_credit_memos = (
async_mpt_ops.billing.credit_memos.filter(RQLQuery(id=credit_memo_id))
async_mpt_ops.billing.credit_memos
.filter(RQLQuery(id=credit_memo_id))
.filter(RQLQuery(status=credit_memo_status))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/billing/credit_memo/test_sync_credit_memo.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def test_filter_credit_memos(mpt_ops, credit_memo):
credit_memo_status = credit_memo.status
select_fields = ["-vendor"]
filtered_credit_memos = (
mpt_ops.billing.credit_memos.filter(RQLQuery(id=credit_memo_id))
mpt_ops.billing.credit_memos
.filter(RQLQuery(id=credit_memo_id))
.filter(RQLQuery(status=credit_memo_status))
.select(*select_fields)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ async def test_filter_custom_ledger_attachments(
):
select_fields = ["-price"]
filtered_attachments = (
custom_ledger_attachments.filter(RQLQuery(id=custom_ledger_attachment_id))
custom_ledger_attachments
.filter(RQLQuery(id=custom_ledger_attachment_id))
.filter(RQLQuery(name="test_custom_ledger.xlsx"))
.select(*select_fields)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def test_list_custom_ledger_attachments(custom_ledger_attachments):
def test_filter_custom_ledger_attachments(custom_ledger_attachments, custom_ledger_attachment_id):
select_fields = ["-price"]
filtered_attachments = (
custom_ledger_attachments.filter(RQLQuery(id=custom_ledger_attachment_id))
custom_ledger_attachments
.filter(RQLQuery(id=custom_ledger_attachment_id))
.filter(RQLQuery(name="test_custom_ledger.xlsx"))
.select(*select_fields)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ async def test_list_custom_ledger_charges(custom_ledger_charges):
async def test_filter_custom_ledger_charges(custom_ledger_charges, custom_ledger_charge_id):
select_fields = ["-price"]
filtered_charges = (
custom_ledger_charges.filter(RQLQuery(id=custom_ledger_charge_id))
custom_ledger_charges
.filter(RQLQuery(id=custom_ledger_charge_id))
.filter(RQLQuery(description__value2="Description 2"))
.select(*select_fields)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def test_list_custom_ledger_charges(custom_ledger_charges):
def test_filter_custom_ledger_charges(custom_ledger_charges, custom_ledger_charge_id):
select_fields = ["-price"]
filtered_charges = (
custom_ledger_charges.filter(RQLQuery(id=custom_ledger_charge_id))
custom_ledger_charges
.filter(RQLQuery(id=custom_ledger_charge_id))
.filter(RQLQuery(description__value2="Description 2"))
.select(*select_fields)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ async def test_get_custom_ledger_by_id_not_found(async_mpt_ops, invalid_custom_l
async def test_filter_custom_ledgers(async_mpt_ops, custom_ledger_id):
select_fields = ["-price"]
filtered_custom_ledgers = (
async_mpt_ops.billing.custom_ledgers.filter(RQLQuery(id=custom_ledger_id))
async_mpt_ops.billing.custom_ledgers
.filter(RQLQuery(id=custom_ledger_id))
.filter(RQLQuery(name="E2E Seeded Custom Ledger"))
.select(*select_fields)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def test_get_custom_ledger_by_id_not_found(mpt_ops, invalid_custom_ledger_id):
def test_filter_custom_ledgers(mpt_ops, custom_ledger_id):
select_fields = ["-price"]
filtered_custom_ledgers = (
mpt_ops.billing.custom_ledgers.filter(RQLQuery(id=custom_ledger_id))
mpt_ops.billing.custom_ledgers
.filter(RQLQuery(id=custom_ledger_id))
.filter(RQLQuery(name="E2E Seeded Custom Ledger"))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/billing/invoice/test_async_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ async def test_filter_invoices(async_mpt_ops, invoice):
invoice_status = invoice.status
select_fields = ["-buyer"]
filtered_invoices = (
async_mpt_ops.billing.invoices.filter(RQLQuery(id=invoice_id))
async_mpt_ops.billing.invoices
.filter(RQLQuery(id=invoice_id))
.filter(RQLQuery(status=invoice_status))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/billing/invoice/test_sync_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def test_filter_invoices(mpt_ops, invoice):
invoice_status = invoice.status
select_fields = ["-buyer"]
filtered_invoices = (
mpt_ops.billing.invoices.filter(RQLQuery(id=invoice_id))
mpt_ops.billing.invoices
.filter(RQLQuery(id=invoice_id))
.filter(RQLQuery(status=invoice_status))
.select(*select_fields)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ async def test_list_journal_attachments(journal_attachments):
async def test_filter_journal_attachments(journal_attachments, journal_attachment_id):
select_fields = ["-description"]
filtered_attachments = (
journal_attachments.filter(RQLQuery(id=journal_attachment_id))
journal_attachments
.filter(RQLQuery(id=journal_attachment_id))
.filter(RQLQuery(name="E2E Seeded Billing Journal Attachment"))
.select(*select_fields)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def test_list_journal_attachments(journal_attachments):
def test_filter_journal_attachments(journal_attachments, journal_attachment_id):
select_fields = ["-description"]
filtered_attachments = (
journal_attachments.filter(RQLQuery(id=journal_attachment_id))
journal_attachments
.filter(RQLQuery(id=journal_attachment_id))
.filter(RQLQuery(name="E2E Seeded Billing Journal Attachment"))
.select(*select_fields)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ async def test_list_journal_charges(journal_charges):
async def test_filter_journal_charges(journal_charges, journal_charge_id):
select_fields = ["-period"]
filtered_charges = (
journal_charges.filter(RQLQuery(id=journal_charge_id))
journal_charges
.filter(RQLQuery(id=journal_charge_id))
.filter(RQLQuery(externalIds__invoice="INV12345"))
.select(*select_fields)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def test_list_journal_charges(journal_charges):
def test_filter_journal_charges(journal_charges, journal_charge_id):
select_fields = ["-period"]
filtered_charges = (
journal_charges.filter(RQLQuery(id=journal_charge_id))
journal_charges
.filter(RQLQuery(id=journal_charge_id))
.filter(RQLQuery(externalIds__invoice="INV12345"))
.select(*select_fields)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ async def test_list_journal_sellers(journal_sellers):
async def test_filter_journal_sellers(journal_sellers, seller_id):
select_fields = ["-period"]
filtered_sellers = (
journal_sellers.filter(RQLQuery(id=seller_id))
journal_sellers
.filter(RQLQuery(id=seller_id))
.filter(RQLQuery(name="E2E Seeded Seller"))
.select(*select_fields)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def test_list_journal_sellers(journal_sellers):
def test_filter_journal_sellers(journal_sellers, seller_id):
select_fields = ["-period"]
filtered_sellers = (
journal_sellers.filter(RQLQuery(id=seller_id))
journal_sellers
.filter(RQLQuery(id=seller_id))
.filter(RQLQuery(name="E2E Seeded Seller"))
.select(*select_fields)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/billing/journal/test_async_journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ async def test_get_billing_journal_by_id_not_found(async_mpt_vendor, invalid_bil
async def test_filter_billing_journals(async_mpt_vendor, billing_journal_id):
select_fields = ["-value"]
filtered_billing_journals = (
async_mpt_vendor.billing.journals.filter(RQLQuery(id=billing_journal_id))
async_mpt_vendor.billing.journals
.filter(RQLQuery(id=billing_journal_id))
.filter(RQLQuery(name="E2E Seeded Billing Journal"))
.select(*select_fields)
)
Expand Down
Loading