Skip to content

Conversation

@marcoacierno
Copy link
Member

Fixes #3976

Summary

This PR moves Strawberry GraphQL types from pretix/__init__.py to api/pretix/types.py to improve code organization and separate API concerns from the Pretix HTTP client logic.

Changes

  • Moved all Strawberry GraphQL types and inputs to api/pretix/types.py
  • Updated imports in affected files
  • Added __all__ to pretix/__init__.py for backward compatibility
  • Reduced pretix/__init__.py from 686 to 497 lines

Testing

All imports have been updated and backward compatibility is maintained through re-exports.

Generated with Claude Code

- Move Strawberry GraphQL types (CreateOrderInput, CreateOrderErrors, etc.) from pretix/__init__.py to api/pretix/types.py
- Update imports in api/orders/mutations.py and test files
- Add __all__ export list to pretix/__init__.py for backward compatibility
- Reduce pretix/__init__.py from 686 to 497 lines (189 lines removed)
- Keep core Pretix API client functions in pretix/__init__.py

This separation improves code organization by moving GraphQL API types
to the api/ directory where they belong, while keeping the Pretix HTTP
client logic in the pretix/ package.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Marco Acierno <marcoacierno@users.noreply.github.com>
@vercel
Copy link

vercel bot commented Nov 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
pycon Ready Ready Preview Nov 18, 2025 1:12am

@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

❌ Patch coverage is 99.32886% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.52%. Comparing base (cf5a642) to head (7fb0e02).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4496   +/-   ##
=======================================
  Coverage   94.52%   94.52%           
=======================================
  Files         352      352           
  Lines       10127    10127           
  Branches      731      731           
=======================================
  Hits         9573     9573           
  Misses        461      461           
  Partials       93       93           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move API concerns out of pretix/__init__.py and cleanup the file

2 participants