Skip to content

Commit 3bff397

Browse files
Linting after changes in gaplint
1 parent 31b6588 commit 3bff397

File tree

5 files changed

+20
-10
lines changed

5 files changed

+20
-10
lines changed

.gaplint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
disable:
22
- align-assignments
3-
duplicate-function-min-length: 4

gap/dot.gd

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
#! @Chapter
1212
#! @ChapterTitle An introduction to the DOT language and Graphviz.
1313
#! This chapter explains what the DOT and graphviz are,
14-
#! key basic concepts relating to them, and how this package interacts with them.
14+
#! key basic concepts relating to them, and how this package interacts with
15+
#! them.
1516

1617
#! @Section A Brief Introduction
1718
#! DOT is a language for descrbing to a computer how to display a visualization
@@ -63,7 +64,8 @@ DeclareOperation("GraphvizGraph", []);
6364
#! @GroupTitle Constructors for Digraphs
6465
#! @Arguments name
6566
#! @Returns a new graphviz digraph
66-
#! @Description Creates a new graphviz digraph optionally with the provided name.
67+
#! @Description Creates a new graphviz digraph optionally with the provided
68+
#! name.
6769
DeclareOperation("GraphvizDigraph", [IsObject]);
6870
DeclareOperation("GraphvizDigraph", []);
6971
#! @EndGroup
@@ -147,13 +149,15 @@ DeclareOperation("GraphvizTail", [IsGraphvizEdge]);
147149
#! @Arguments graph, name
148150
#! @Returns the modified graph.
149151
#! @Description Sets the name of a graphviz graph or digraph.
150-
DeclareOperation("GraphvizSetName", [IsGraphvizGraphDigraphOrContext, IsObject]);
152+
DeclareOperation("GraphvizSetName",
153+
[IsGraphvizGraphDigraphOrContext, IsObject]);
151154

152155
#! @Arguments graph, node
153156
#! @Returns the modified graph.
154157
#! @Description Adds a node to the graph.
155158
#! If a node with the same name is already present the operation fails.
156-
DeclareOperation("GraphvizAddNode", [IsGraphvizGraphDigraphOrContext, IsObject]);
159+
DeclareOperation("GraphvizAddNode",
160+
[IsGraphvizGraphDigraphOrContext, IsObject]);
157161

158162
#! @Arguments graph, edge
159163
#! @Returns the modified graph.
@@ -180,6 +184,9 @@ DeclareOperation("GraphvizAddContext",
180184
[IsGraphvizGraphDigraphOrContext, IsObject]);
181185
DeclareOperation("GraphvizAddContext", [IsGraphvizGraphDigraphOrContext]);
182186

187+
DeclareOperation("GraphvizAddComment",
188+
[IsGraphvizGraphDigraphOrContext, IsString]);
189+
183190
#! @Arguments graph, node
184191
#! @Returns the modified graph.
185192
#! @Description Removes the node from the graph.

gap/dot.gi

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ function(x, attrs)
254254
return x;
255255
end);
256256

257-
InstallMethod(GraphvizSetAttr, "for a graphviz node or edge, object, and object",
257+
InstallMethod(GraphvizSetAttr,
258+
"for a graphviz node or edge, object, and object",
258259
[IsGraphvizNodeOrEdge, IsObject, IsObject],
259260
function(x, name, value)
260261

@@ -342,7 +343,7 @@ end);
342343

343344
InstallMethod(GraphvizAddNode, "for a graphviz (di)graph or context and string",
344345
[IsGraphvizGraphDigraphOrContext, IsGraphvizNode],
345-
function(gv, name) # gaplint: disable=analyse-lvars
346+
function(gv, name) # gaplint: disable=unused-func-args
346347
ErrorNoReturn("it is not currently possible to add Graphviz node ",
347348
"objects directly to Graphviz graphs or digraphs, use ",
348349
"the node's name instead");
@@ -474,7 +475,8 @@ InstallMethod(GraphvizAddContext,
474475
[IsGraphvizGraphDigraphOrContext, IsObject],
475476
{g, o} -> GraphvizAddContext(g, String(o)));
476477

477-
InstallMethod(GraphvizRemoveNode, "for a graphviz (di)graph or context and node",
478+
InstallMethod(GraphvizRemoveNode,
479+
"for a graphviz (di)graph or context and node",
478480
[IsGraphvizGraphDigraphOrContext, IsGraphvizNode],
479481
{g, node} -> GraphvizRemoveNode(g, GraphvizName(node)));
480482

gap/gv.gd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ DeclareOperation("GV_StringifyContextHead", [IsGraphvizGraphDigraphOrContext]);
2727
DeclareOperation("GV_StringifyNode", [IsGraphvizNode]);
2828
DeclareOperation("GV_StringifyGraphAttrs", [IsGraphvizGraphDigraphOrContext]);
2929
DeclareOperation("GV_StringifyNodeEdgeAttrs", [GV_IsMap]);
30-
DeclareOperation("GV_StringifyGraph", [IsGraphvizGraphDigraphOrContext, IsBool]);
30+
DeclareOperation("GV_StringifyGraph",
31+
[IsGraphvizGraphDigraphOrContext, IsBool]);
3132

3233
DeclareOperation("GV_FindNode", [IsGraphvizGraphDigraphOrContext, IsObject]);
3334

gap/gv.gi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ else
7575
out := Concatenation(str{[1 .. len - 3]}, "ses");
7676
elif EndsWith(str, "fe") and not EndsWith(str, "ffe") then
7777
out := Concatenation(str{[1 .. len - 2]}, "ves");
78-
elif EndsWith(str, "lf") or EndsWith(str, "rf") or EndsWith(str, "loaf") then
78+
elif EndsWith(str, "lf") or EndsWith(str, "rf")
79+
or EndsWith(str, "loaf") then
7980
out := Concatenation(str{[1 .. len - 1]}, "ves");
8081
elif EndsWith(str, "y") and not str[len - 1] in "aeiouy" then
8182
out := Concatenation(str{[1 .. len - 1]}, "ies");

0 commit comments

Comments
 (0)