Skip to content

Commit

Permalink
Fix some docstrings (#1814)
Browse files Browse the repository at this point in the history
* Fix broken indentation in docstrings

* Attach docstrings to `ZZ` and `QQ`
  • Loading branch information
lgoettgens authored Jun 30, 2024
1 parent 03e705a commit 7cf9a36
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/calcium/CalciumTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ end
################################################################################

qqbar_field_doc = raw"""
QQBarField <: Field
QQBarFieldElem <: FieldElem
QQBarField <: Field
QQBarFieldElem <: FieldElem
The algebraic closure $\overline{\mathbb Q}$ of the rationals $\mathbb Q$ and
its elements. This is a singleton type, meaning that there is a unique global
Expand Down
10 changes: 6 additions & 4 deletions src/flint/FlintTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const _err_dim_negative = ErrorException("Dimensions must be non-negative")
###############################################################################

zz_ring_doc = raw"""
ZZRing <: Ring
ZZRingElem <: RingElem
ZZRing <: Ring
ZZRingElem <: RingElem
The ring of integers $\mathbb Z$ and its elements.
For convenience, we predefine the global variable `const ZZ = ZZRing()`,
Expand All @@ -35,6 +35,7 @@ julia> ZZ(2)^100
struct ZZRing <: Ring
end

@doc zz_ring_doc
const ZZ = ZZRing()

integer_ring() = ZZRing()
Expand Down Expand Up @@ -142,8 +143,8 @@ end
###############################################################################

qq_field_doc = raw"""
QQField <: FracField{ZZRingElem}
QQFieldElem <: FracFieldElem{ZZRingElem}
QQField <: FracField{ZZRingElem}
QQFieldElem <: FracFieldElem{ZZRingElem}
The field of rationals $\mathbb Q$ and its elements.
For convenience, we predefine the global variable `const QQ = QQField()`.
Expand All @@ -163,6 +164,7 @@ julia> QQ(1//6) - QQ(1//7)
struct QQField <: FracField{ZZRingElem}
end

@doc qq_field_doc
const QQ = QQField()

rational_field() = QQ
Expand Down
2 changes: 1 addition & 1 deletion src/flint/fmpz_mod_mat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ end
#= Not implemented in Flint yet
@doc raw"""
lift(a::T) where {T <: Zmod_fmpz_mat}
lift(a::T) where {T <: Zmod_fmpz_mat}
Return a lift of the matrix $a$ to a matrix over $\mathbb{Z}$, i.e. where the
entries of the returned matrix are those of $a$ lifted to $\mathbb{Z}$.
Expand Down

0 comments on commit 7cf9a36

Please sign in to comment.