Skip to content

Change number field signature display from [r1, r2] to (r1, r2)#6841

Open
Copilot wants to merge 5 commits intomainfrom
copilot/fix-signature-display-number-fields
Open

Change number field signature display from [r1, r2] to (r1, r2)#6841
Copilot wants to merge 5 commits intomainfrom
copilot/fix-signature-display-number-fields

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

Number field signatures are currently displayed with square brackets but should use parentheses to match standard mathematical notation.

Changes

  • web_number_field.py: Added signature_display() method returning formatted string '(r1, r2)'. The existing signature() method remains unchanged, returning [r1, r2] list for internal use by is_real_quadratic(), unit_rank(), cnf(), and other methods that depend on list indexing.

  • number_field.py: Updated field page rendering (line 468) and search column formatting (line 853) to use signature_display().

  • test_numberfield.py: Added test_signature_display() to verify parentheses format on field detail pages.

Example

# Before
nf.signature()  # Returns [2, 1] - still works for internal code
# Display showed: [2, 1]

# After  
nf.signature()  # Returns [2, 1] - unchanged
nf.signature_display()  # Returns '(2, 1)' - used for display
# Display shows: (2, 1)

Note: Search URLs continue using [r1,r2] format for parser compatibility. Data downloads use list format for machine readability.

Original prompt

This section details on the original issue you should resolve

<issue_title>Signature display for number fields should be use brackets instead of square brackets</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 29, 2026 15:11
Co-authored-by: edgarcosta <322822+edgarcosta@users.noreply.github.com>
Co-authored-by: edgarcosta <322822+edgarcosta@users.noreply.github.com>
Co-authored-by: edgarcosta <322822+edgarcosta@users.noreply.github.com>
Co-authored-by: edgarcosta <322822+edgarcosta@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix signature display for number fields to use brackets Change number field signature display from [r1, r2] to (r1, r2) Jan 29, 2026
Copilot AI requested a review from edgarcosta January 29, 2026 15:19
@edgarcosta edgarcosta marked this pull request as ready for review January 29, 2026 17:02
@AndrewVSutherland
Copy link
Member

I think @jwj61 should review this before it is merged

@jwj61
Copy link
Member

jwj61 commented Jan 29, 2026

Will look at when tests pass

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.

Signature display for number fields should be use brackets instead of square brackets

4 participants