From 8b74b80ccd7112dda807f7600ed998b19a8da287 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Sat, 31 Aug 2024 13:06:37 +0100 Subject: [PATCH] Update for recent gaplint --- .github/workflows/lint.yml | 2 +- gap/attributes/rms-translat.gi | 2 +- gap/elements/maxplusmat.gi | 13 ++----------- gap/main/lambda-rho.gi | 4 ++-- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 675dd6bb1..9fcbe8bf7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: "Install dependencies . . ." - run: sudo pip install gaplint==1.1.3 + run: sudo pip install gaplint==1.3.2 - name: "Run gaplint . . ." run: bash etc/gaplint.sh diff --git a/gap/attributes/rms-translat.gi b/gap/attributes/rms-translat.gi index 42d29980a..445d2d033 100644 --- a/gap/attributes/rms-translat.gi +++ b/gap/attributes/rms-translat.gi @@ -736,7 +736,7 @@ function(T) od; for a in group_gens do - fa := function(x) + fa := function(x) # gaplint: disable=W047 if x = 1 then return a; fi; diff --git a/gap/elements/maxplusmat.gi b/gap/elements/maxplusmat.gi index 58da95e61..b648b66b9 100644 --- a/gap/elements/maxplusmat.gi +++ b/gap/elements/maxplusmat.gi @@ -196,18 +196,9 @@ end); InstallMethod(UnweightedPrecedenceDigraph, "for a max-plus matrix", [IsMaxPlusMatrix], function(mat) - local adj; - # Auxiliary function used to compute the adjacency matrix of the precedence - # digraph - adj := function(i, j) - if mat[i][j] = -infinity then - return false; - else - return true; - fi; - end; # Generate and return digraph object - return Digraph([1 .. DimensionOfMatrixOverSemiring(mat)], adj); + return Digraph([1 .. DimensionOfMatrixOverSemiring(mat)], + {i, j} -> mat[i][j] <> -infinity); end); ## Method from lemma 19, page 36, of: diff --git a/gap/main/lambda-rho.gi b/gap/main/lambda-rho.gi index f613e2527..ef3ab5374 100644 --- a/gap/main/lambda-rho.gi +++ b/gap/main/lambda-rho.gi @@ -110,7 +110,7 @@ function(o, m, i) genpos := ReverseSchreierTreeOfSCC(o, m); inv := LambdaInverse(o!.parent); - trace := function(i) # gaplint: disable=W000 + trace := function(i) # gaplint: disable=W047 local x; if IsBound(mults[i]) then return mults[i][2]; @@ -366,7 +366,7 @@ function(o, m) genpos := SchreierTreeOfSCC(o, m); inv := x -> RhoInverse(o!.parent)(o[scc[1]], x); - trace := function(i) # gaplint: disable=W000 + trace := function(i) # gaplint: disable=W047 local x; if IsBound(mults[i]) then return mults[i][1];