-
Notifications
You must be signed in to change notification settings - Fork 141
fix show
for AutomorphismGroup
#5165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix show
for AutomorphismGroup
#5165
Conversation
Print `Automorphism group of ...` only if the group knows that it is the *full* automorphism group of the group in question. Otherwise print `Group of automorphisms of ...`.
src/Groups/homomorphisms.jl
Outdated
end | ||
|
||
function Base.show(io::IO, ::MIME"text/plain", A::AutomorphismGroup{T}) where T <: Union{FinGenAbGroup, GAPGroup} | ||
io = pretty(io) | ||
println(io, "Automorphism group of", Indent()) | ||
if hasproperty(A, :is_known_to_be_full) && A.is_known_to_be_full |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasproperty
does not work as you want it here, as is_known_to_be_full
is a bitstype. Due to being a bitstype, it gets initialized in any case (with false
in this case), so any hasproperty
call will return true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Then everything is o.k. if I omit the hasproperty
call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really: "The initial contents of a plain data type is undefined."
Now this is fixed.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5165 +/- ##
=======================================
Coverage 84.88% 84.88%
=======================================
Files 710 710
Lines 95524 95519 -5
=======================================
- Hits 81082 81079 -3
+ Misses 14442 14440 -2
🚀 New features to boost your workflow:
|
"The initial contents of a plain data type is undefined."
Print
Automorphism group of ...
only if the group knows that it is the full automorphism group of the group in question. Otherwise printGroup of automorphisms of ...
.