From 5795aa649233f9dfc5867ef10d9b22c993b8d9fa Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 25 Oct 2024 21:58:00 +0200 Subject: [PATCH] Docs: Fix various sphinx warnings --- doc/api/resources/orders.rst | 4 ++-- doc/api/resources/scheduled_exports.rst | 4 ++-- doc/api/resources/seats.rst | 2 +- doc/development/api/cookieconsent.rst | 1 + doc/development/api/general.rst | 10 ++++++++++ doc/development/api/import.rst | 1 + doc/development/api/invoice.rst | 2 -- doc/development/api/placeholder.rst | 3 +++ doc/plugins/kulturpass.rst | 2 +- doc/plugins/presale-saml.rst | 2 +- src/pretix/base/models/items.py | 3 +-- src/pretix/base/signals.py | 2 +- 12 files changed, 24 insertions(+), 12 deletions(-) diff --git a/doc/api/resources/orders.rst b/doc/api/resources/orders.rst index f204e260e3..ac5c8a3114 100644 --- a/doc/api/resources/orders.rst +++ b/doc/api/resources/orders.rst @@ -977,8 +977,8 @@ Creating orders * ``internal_reference`` * ``vat_id`` * ``vat_id_validated`` (optional) – If you need support for reverse charge (rarely the case), you need to check - yourself if the passed VAT ID is a valid EU VAT ID. In that case, set this to ``true``. Only valid VAT IDs will - trigger reverse charge taxation. Don't forget to set ``is_business`` as well! + yourself if the passed VAT ID is a valid EU VAT ID. In that case, set this to ``true``. Only valid VAT IDs will + trigger reverse charge taxation. Don't forget to set ``is_business`` as well! * ``positions`` diff --git a/doc/api/resources/scheduled_exports.rst b/doc/api/resources/scheduled_exports.rst index aaeae7dde8..59007773b5 100644 --- a/doc/api/resources/scheduled_exports.rst +++ b/doc/api/resources/scheduled_exports.rst @@ -313,7 +313,7 @@ Endpoints for event exports :statuscode 403: The requested organizer/event does not exist **or** you have no permission to delete this resource. Endpoints for organizer exports ---------------------------- +------------------------------- .. http:get:: /api/v1/organizers/(organizer)/scheduled_exports/ @@ -553,4 +553,4 @@ Endpoints for organizer exports :statuscode 403: The requested organizer does not exist **or** you have no permission to delete this resource. -.. _RFC 5545: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.5.3 \ No newline at end of file +.. _RFC 5545: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.5.3 diff --git a/doc/api/resources/seats.rst b/doc/api/resources/seats.rst index b9c6e60cc0..47dbf1aae9 100644 --- a/doc/api/resources/seats.rst +++ b/doc/api/resources/seats.rst @@ -1,4 +1,4 @@ -.. _`rest-reusablemedia`: +.. _`rest-seats`: Seats ===== diff --git a/doc/development/api/cookieconsent.rst b/doc/development/api/cookieconsent.rst index 64e67f5bab..75fb2a4e43 100644 --- a/doc/development/api/cookieconsent.rst +++ b/doc/development/api/cookieconsent.rst @@ -17,6 +17,7 @@ First, you need to declare that you are using non-essential cookies by respondin signal: .. automodule:: pretix.presale.signals + :no-index: :members: register_cookie_providers You are expected to return a list of ``CookieProvider`` objects instantiated from the following class: diff --git a/doc/development/api/general.rst b/doc/development/api/general.rst index 5b558ef967..e7dc24e24a 100644 --- a/doc/development/api/general.rst +++ b/doc/development/api/general.rst @@ -22,12 +22,14 @@ Order events There are multiple signals that will be sent out in the ordering cycle: .. automodule:: pretix.base.signals + :no-index: :members: validate_cart, validate_cart_addons, validate_order, order_valid_if_pending, order_fee_calculation, order_paid, order_placed, order_canceled, order_reactivated, order_expired, order_modified, order_changed, order_approved, order_denied, order_fee_type_name, allow_ticket_download, order_split, order_gracefully_delete, invoice_line_text Check-ins """"""""" .. automodule:: pretix.base.signals + :no-index: :members: checkin_created @@ -39,18 +41,21 @@ Frontend .. automodule:: pretix.presale.signals + :no-index: :members: order_info, order_info_top, order_meta_from_request, order_api_meta_from_request Request flow """""""""""" .. automodule:: pretix.presale.signals + :no-index: :members: process_request, process_response Vouchers """""""" .. automodule:: pretix.presale.signals + :no-index: :members: voucher_redeem_info Backend @@ -62,24 +67,28 @@ Backend item_formsets, order_search_filter_q, order_search_forms .. automodule:: pretix.base.signals + :no-index: :members: logentry_display, logentry_object_link, requiredaction_display, timeline_events, orderposition_blocked_display, customer_created, customer_signed_in Vouchers """""""" .. automodule:: pretix.control.signals + :no-index: :members: item_forms, voucher_form_class, voucher_form_html, voucher_form_validation Dashboards """""""""" .. automodule:: pretix.control.signals + :no-index: :members: event_dashboard_widgets, user_dashboard_widgets, event_dashboard_top Ticket designs """""""""""""" .. automodule:: pretix.base.signals + :no-index: :members: layout_text_variables, layout_image_variables .. automodule:: pretix.plugins.ticketoutputpdf.signals @@ -89,4 +98,5 @@ API --- .. automodule:: pretix.base.signals + :no-index: :members: validate_event_settings, api_event_settings_fields diff --git a/doc/development/api/import.rst b/doc/development/api/import.rst index 4a2388ac31..a0dd1f794f 100644 --- a/doc/development/api/import.rst +++ b/doc/development/api/import.rst @@ -60,6 +60,7 @@ that we'll provide in this plugin: Similar signals exist for other objects: .. automodule:: pretix.base.signals + :no-index: :members: voucher_import_columns diff --git a/doc/development/api/invoice.rst b/doc/development/api/invoice.rst index 7b62a3727f..69dcc222dc 100644 --- a/doc/development/api/invoice.rst +++ b/doc/development/api/invoice.rst @@ -84,8 +84,6 @@ convenient to you: .. automethod:: _register_fonts - .. automethod:: _register_event_fonts - .. automethod:: _on_first_page .. automethod:: _on_other_page diff --git a/doc/development/api/placeholder.rst b/doc/development/api/placeholder.rst index 281d244ee4..70ad9b74a7 100644 --- a/doc/development/api/placeholder.rst +++ b/doc/development/api/placeholder.rst @@ -86,7 +86,10 @@ Signals ------- .. automodule:: pretix.base.signals + :no-index: :members: register_text_placeholders + .. automodule:: pretix.base.signals + :no-index: :members: register_mail_placeholders diff --git a/doc/plugins/kulturpass.rst b/doc/plugins/kulturpass.rst index 2babe41800..2a08b8fd3a 100644 --- a/doc/plugins/kulturpass.rst +++ b/doc/plugins/kulturpass.rst @@ -1,5 +1,5 @@ KulturPass -========= +========== .. note:: diff --git a/doc/plugins/presale-saml.rst b/doc/plugins/presale-saml.rst index 41fb56b836..908eb827be 100644 --- a/doc/plugins/presale-saml.rst +++ b/doc/plugins/presale-saml.rst @@ -158,7 +158,7 @@ expects and - more importantly - supports. for a sample configuration in an academic context. Note, that you can have multiple attributes with the same ``friendlyName`` - but different ``name``s. This is often used in systems, where the same + but different ``name`` value. This is often used in systems, where the same information (for example a persons name) is saved in different fields - for example because one institution is returning SAML 1.0 and other institutions are returning SAML 2.0 style attributes. Typically, this only diff --git a/src/pretix/base/models/items.py b/src/pretix/base/models/items.py index 6b397588e3..47295b0d1d 100644 --- a/src/pretix/base/models/items.py +++ b/src/pretix/base/models/items.py @@ -1118,13 +1118,12 @@ class ItemVariation(models.Model): :param original_price: The item's "original" price. Will not be used for any calculations, will just be shown. :type original_price: decimal.Decimal :param require_approval: If set to ``True``, orders containing this variation can only be processed and paid after - approval by an administrator + approval by an administrator :type require_approval: bool :param all_sales_channels: A flag indicating that this variation is available on all channels and limit_sales_channels will be ignored. :type all_sales_channels: bool :param limit_sales_channels: A list of sales channel identifiers, that this variation is available for sale on. :type limit_sales_channels: list - """ item = models.ForeignKey( Item, diff --git a/src/pretix/base/signals.py b/src/pretix/base/signals.py index b6616943f8..f6f1c32295 100644 --- a/src/pretix/base/signals.py +++ b/src/pretix/base/signals.py @@ -367,7 +367,7 @@ validate_cart_addons = EventPluginSignal() Arguments: ``addons``, ``base_position``, ``iao`` This signal is sent when a user tries to select a combination of addons. In contrast to - ``validate_cart``, this is executed before the cart is actually modified. You are passed +``validate_cart``, this is executed before the cart is actually modified. You are passed an argument ``addons`` containing a dict of ``(item, variation or None) → count`` tuples as well as the ``ItemAddOn`` object as the argument ``iao`` and the base cart position as ``base_position``.