Skip to content
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

Lint for new version of gaplint #691

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions gap/cliques.gi
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ end);
################################################################################

InstallGlobalFunction(DigraphMaximalIndependentSet,
function(arg)
function(arg...)
if IsEmpty(arg) then
ErrorNoReturn("at least 1 argument is required,");
elif not IsDigraph(arg[1]) then
Expand All @@ -141,7 +141,7 @@ function(arg)
end);

InstallGlobalFunction(DigraphIndependentSet,
function(arg)
function(arg...)
if IsEmpty(arg) then
ErrorNoReturn("at least 1 argument is required,");
elif not IsDigraph(arg[1]) then
Expand All @@ -158,7 +158,7 @@ end);
# Independent sets orbit representatives

InstallGlobalFunction(DigraphIndependentSetsReps,
function(arg)
function(arg...)
if IsEmpty(arg) then
ErrorNoReturn("at least 1 argument is required,");
elif not IsDigraph(arg[1]) then
Expand All @@ -175,7 +175,7 @@ InstallMethod(DigraphIndependentSetsAttr, "for a digraph", [IsDigraph],
DigraphIndependentSets);

InstallGlobalFunction(DigraphIndependentSets,
function(arg)
function(arg...)
local D, out;
if IsEmpty(arg) then
ErrorNoReturn("at least 1 argument is required,");
Expand All @@ -202,7 +202,7 @@ InstallMethod(DigraphMaximalIndependentSetsRepsAttr, "for a digraph",
[IsDigraph], DigraphMaximalIndependentSetsReps);

InstallGlobalFunction(DigraphMaximalIndependentSetsReps,
function(arg)
function(arg...)
local out, D;
if IsEmpty(arg) then
ErrorNoReturn("at least 1 argument is required,");
Expand All @@ -229,7 +229,7 @@ InstallMethod(DigraphMaximalIndependentSetsAttr, "for a digraph", [IsDigraph],
DigraphMaximalIndependentSets);

InstallGlobalFunction(DigraphMaximalIndependentSets,
function(arg)
function(arg...)
local D, out;
if IsEmpty(arg) then
ErrorNoReturn("at least 1 argument is required,");
Expand All @@ -254,7 +254,7 @@ end);
# Cliques

InstallGlobalFunction(DigraphMaximalClique,
function(arg)
function(arg...)
if IsEmpty(arg) then
ErrorNoReturn("at least 1 argument is required,");
fi;
Expand All @@ -263,7 +263,7 @@ function(arg)
end);

InstallGlobalFunction(DigraphClique,
function(arg)
function(arg...)
if IsEmpty(arg) then
ErrorNoReturn("at least 1 argument is required,");
fi;
Expand All @@ -272,7 +272,7 @@ function(arg)
end);

InstallGlobalFunction(DIGRAPHS_Clique,
function(arg)
function(arg...)
local maximal, D, include, exclude, size, out, try, include_copy, v;

maximal := arg[1];
Expand Down Expand Up @@ -369,7 +369,7 @@ end);
# Cliques orbit representatives

InstallGlobalFunction(DigraphCliquesReps,
function(arg)
function(arg...)
local D, include, exclude, limit, size;

if IsEmpty(arg) then
Expand Down Expand Up @@ -412,7 +412,7 @@ InstallMethod(DigraphCliquesAttr, "for a digraph", [IsDigraph],
DigraphCliques);

InstallGlobalFunction(DigraphCliques,
function(arg)
function(arg...)
local D, include, exclude, limit, size, out;

if IsEmpty(arg) then
Expand Down Expand Up @@ -467,7 +467,7 @@ InstallMethod(DigraphMaximalCliquesRepsAttr, "for a digraph", [IsDigraph],
DigraphMaximalCliquesReps);

InstallGlobalFunction(DigraphMaximalCliquesReps,
function(arg)
function(arg...)
local D, include, exclude, limit, size, out;

if IsEmpty(arg) then
Expand Down Expand Up @@ -521,7 +521,7 @@ InstallMethod(DigraphMaximalCliquesAttr, "for a digraph", [IsDigraph],
DigraphMaximalCliques);

InstallGlobalFunction(DigraphMaximalCliques,
function(arg)
function(arg...)
local D, include, exclude, limit, size, cliques, sub, G, out, orbits, c;

if IsEmpty(arg) then
Expand Down Expand Up @@ -1041,7 +1041,7 @@ function(D, hook, param, lim, inc, exc, max, size, reps, inc_var, exc_var)
to_try := ListBlist(vtx, try);
fi;

if not G = fail then
if G <> fail then
to_try := List(Orbits(G, to_try), x -> x[1]);
fi;

Expand Down
4 changes: 2 additions & 2 deletions gap/digraph.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ function(filt, digraph, gps, homs)
local red, n, hom_table, reps, rep, top, doms, starts, degs, max, gens, img,
start, deg, x, queue, j, k, g, y, hom, edge, i, gen;

if not filt = IsPartialPermSemigroup then
if filt <> IsPartialPermSemigroup then
TryNextMethod();
elif not IsJoinSemilatticeDigraph(digraph) then
if IsMeetSemilatticeDigraph(digraph) then
Expand Down Expand Up @@ -1335,7 +1335,7 @@ function(filt, digraph, gps, homs)
# agrees with the composition we are currently considering.
if IsBound(img[start]) then
y := PermList(img{[start .. start + deg - 1]} - start + 1);
if not x = y then
if x <> y then
ErrorNoReturn("the homomorphisms given must form a commutative",
" diagram,");
fi;
Expand Down
8 changes: 2 additions & 6 deletions gap/display.gi
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ function(str)
od;
fi;
fi;
if x = (l - 1) then
return true;
else
return false;
fi;
return x = (l - 1);
end);

BindGlobal("DIGRAPHS_GraphvizColorsList", fail);
Expand Down Expand Up @@ -266,7 +262,7 @@ if not IsBound(Splash) then # This function is written by A. Egri-Nagy
["xpdf", "xdg-open", "open", "evince", "okular", "gv"]);

BindGlobal("Splash",
function(arg)
function(arg...)
local str, opt, path, dir, tdir, file, viewer, type, inn, filetype, out,
engine;

Expand Down
2 changes: 1 addition & 1 deletion gap/grahom.gi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
##

InstallGlobalFunction(GeneratorsOfEndomorphismMonoid,
function(arg)
function(arg...)
local D, limit, colours, G, gens, limit_arg, out;
if IsEmpty(arg) then
ErrorNoReturn("at least 1 argument expected, found 0,");
Expand Down
8 changes: 4 additions & 4 deletions gap/io.gi
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ end;
################################################################################

InstallGlobalFunction(IteratorFromDigraphFile,
function(arg)
function(arg...)
local filename, decoder, file, record;

if Length(arg) = 1 then
Expand Down Expand Up @@ -314,7 +314,7 @@ function(filename)
end);

InstallGlobalFunction(DigraphFile,
function(arg)
function(arg...)
local coder, mode, name, file;

# defaults
Expand Down Expand Up @@ -374,7 +374,7 @@ function(arg)
end);

InstallGlobalFunction(ReadDigraphs,
function(arg)
function(arg...)
local nr, decoder, name, file, i, next, out;

# defaults
Expand Down Expand Up @@ -455,7 +455,7 @@ function(arg)
end);

InstallGlobalFunction(WriteDigraphs,
function(arg)
function(arg...)
local name, digraphs, encoder, mode, splitname, compext, g6sum, s6sum, v, e,
dg6sum, ds6sum, file, D, i;

Expand Down
2 changes: 1 addition & 1 deletion gap/isomorph.gi
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ InstallMethod(BlissAutomorphismGroup,
"for a digraph, fail, and edge colouring",
[IsDigraph, IsBool, IsList],
function(digraph, vert_colours, edge_colours)
if not vert_colours = fail then
if vert_colours <> fail then
TryNextMethod();
fi;
return BLISS_DATA(digraph, vert_colours, edge_colours)[1];
Expand Down
12 changes: 6 additions & 6 deletions gap/oper.gi
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ end);
#############################################################################

InstallGlobalFunction(DIGRAPHS_CombinationOperProcessArgs,
function(arg)
function(arg...)
local copy, i;
arg := ShallowCopy(arg[1]);
if IsMutableDigraph(arg[1]) then
Expand All @@ -633,7 +633,7 @@ function(arg)
end);

InstallGlobalFunction(DigraphDisjointUnion,
function(arg)
function(arg...)
local D, offset, n, i, j;

# Allow the possibility of supplying arguments in a list.
Expand Down Expand Up @@ -668,7 +668,7 @@ function(arg)
end);

InstallGlobalFunction(DigraphJoin,
function(arg)
function(arg...)
local D, tot, offset, n, list, i, v;
# Allow the possibility of supplying arguments in a list.
if Length(arg) = 1 and IsList(arg[1]) then
Expand Down Expand Up @@ -708,7 +708,7 @@ function(arg)
end);

InstallGlobalFunction(DigraphEdgeUnion,
function(arg)
function(arg...)
local D, n, i, v;

# Allow the possibility of supplying arguments in a list.
Expand Down Expand Up @@ -748,7 +748,7 @@ function(arg)
end);

InstallGlobalFunction(DigraphCartesianProduct,
function(arg)
function(arg...)
local D, n, i, j, proj, m, labs;

# Allow the possibility of supplying arguments in a list.
Expand Down Expand Up @@ -794,7 +794,7 @@ function(arg)
end);

InstallGlobalFunction(DigraphDirectProduct,
function(arg)
function(arg...)
local D, n, i, j, proj, m, labs;

# Allow the possibility of supplying arguments in a list.
Expand Down
8 changes: 4 additions & 4 deletions gap/utils.gi
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function()
end);

InstallGlobalFunction(DigraphsTestStandard,
function(arg)
function(arg...)
local opts, dir;
if Length(arg) = 1 and IsRecord(arg[1]) then
opts := ShallowCopy(arg[1]);
Expand Down Expand Up @@ -164,7 +164,7 @@ function(arg)
end);

InstallGlobalFunction(DigraphsTestExtreme,
function(arg)
function(arg...)
local file, opts, dir;
file := Filename(DirectoriesPackageLibrary("digraphs", "digraphs-lib"),
"extreme.d6.gz");
Expand Down Expand Up @@ -212,7 +212,7 @@ function()
end);

InstallGlobalFunction(DigraphsTestManualExamples,
function(arg)
function(arg...)
local exlists, indices, omit, oldscr, passed, pad, total, l, sp, bad, s,
start_time, test, end_time, elapsed, pex, str, j, ex, i;

Expand Down Expand Up @@ -587,7 +587,7 @@ function(blist)
end);

InstallGlobalFunction(DError,
function(arg)
function(arg...)
local msg;
if not (IsString(arg[1]) or IsList(arg[1])) then
Error("expected a string or a list as the 1st argument");
Expand Down
Loading