-
Notifications
You must be signed in to change notification settings - Fork 161
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
When printing function bodies, avoid some redundant spaces #1498
When printing function bodies, avoid some redundant spaces #1498
Conversation
I like this. My only comment is if there are other changes we want to make at the same time. |
@ChrisJefferson I am not sure whether your comment is a question, or a statement (in the latter case, could you say what you have in mind?) |
This would be good to do. I should be able to push to this branch - may try. |
Are you aware that GAP has tools to change test files and manuals? For test files: see For manual examples: see |
Concerning the content of this pull request: All changes look sensible to me. |
@frankluebeck Yes, I am aware, I just couldn't be bothered to figure out how to pass those options to So this is not a difficult task, just one that takes time (which I rather want to spend on other things right now) |
@fingolfin looking at
Is it also possible to add a padding after |
99d6333
to
b089a9d
Compare
Codecov Report
@@ Coverage Diff @@
## master #1498 +/- ##
==========================================
+ Coverage 64.44% 64.54% +0.09%
==========================================
Files 1002 1002
Lines 326861 328423 +1562
Branches 13216 13485 +269
==========================================
+ Hits 210661 211990 +1329
- Misses 113334 113530 +196
- Partials 2866 2903 +37
|
@fingolfin rebased and pushed with tests updated and extended. Waiting for CI results. |
tst/testinstall/bound.tst
Outdated
@@ -38,4 +38,14 @@ f := ({} -> IsBound(BADVARNAME[BADLISTNAME]) );; | |||
^ | |||
gap> f(); | |||
Error, Variable: 'BADVARNAME' must have an assigned value | |||
|
|||
# Printing IsBound statements | |||
gap> Print(function(l,n) return IsBound(l[n]);end); |
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.
Use Display
instead of Print
to make the tests pass (I think).
@fingolfin thanks - pushed the fix to see the effect, will edit the branch later while rebasing |
That push seems to have helped. |
0761993
to
b8fce5b
Compare
@fingolfin rebased and squashed into one commit - waiting for CI results. |
@alex-konovalov looks good to me, but I can't approve this, as it's my PR ;-). Also, you really did by far the most work, and that commit is now authored by me. Perhaps change the commit author to yourself, and then merge? (I don't mind if it is merged as is, just want to make clear that I think Alex did by far most of it). Also: should this be mentioned in the released notes? Personally, I consider it not important enough, but it is user visible, so it is a border case... |
@fingolfin thanks, but idea was yours and the initial study and modification of the code too, I'd mention this in release notes, exactly by the mentioned reason. |
In particular, don't print 'if x then', but rather 'if x then' (note the extra space in the former), and similar after "local", and before "do". This resolves gap-system#473 Also, use consistent padding while printing IsBound statements, update test files and add new test for printing IsBound calls, as implemented by @alex-konovalov
b8fce5b
to
a3d26e8
Compare
In particular, don't print 'if x then', but rather 'if x then' (note the extra space in the former), and similar after "local", and before "do".
Resolves #473
This PR will fail lots of tests, because so many of them contain printed code, which now of course is "formatted wrong". It shouldn't be too hard to fix all that with some calls to
sed
orperl
, but I don't have the time to do that now, and perhaps somebody wants to step up and do it?