Skip to content

Commit 2d78733

Browse files
committed
apply suggestions
1 parent 575efa1 commit 2d78733

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

hub.go

+18-15
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,24 @@ var h = hub{
3838
connections: make(map[*connection]bool),
3939
}
4040

41-
const commands = "{\"Commands\": [" +
42-
"\"list\", " +
43-
"\"open < portName > < baud > [bufferAlgorithm: ({default}, timed, timedraw, timedbinary)]\", " +
44-
"\"send < portName > < cmd >\", " +
45-
"\"sendnobuf < portName > < cmd >\", " +
46-
"\"close < portName >\", " +
47-
"\"restart\", " +
48-
"\"exit\", " +
49-
"\"killupload\", " +
50-
"\"downloadtool < tool > < toolVersion: {latest} > < pack: {arduino} > < behaviour: {keep} >\", " +
51-
"\"log\", " +
52-
"\"memorystats\", " +
53-
"\"gc\", " +
54-
"\"hostname\", " +
55-
"\"version\"]} "
41+
const commands = `{
42+
"Commands": [
43+
"list",
44+
"open < portName > < baud > [bufferAlgorithm: ({default}, timed, timedraw, timedbinary)]",
45+
"send < portName > < cmd >",
46+
"sendnobuf < portName > < cmd >",
47+
"close < portName >",
48+
"restart",
49+
"exit",
50+
"killupload",
51+
"downloadtool < tool > < toolVersion: {latest} > < pack: {arduino} > < behaviour: {keep} >",
52+
"log",
53+
"memorystats",
54+
"gc",
55+
"hostname",
56+
"version"
57+
]
58+
}`
5659

5760
func (h *hub) unregisterConnection(c *connection) {
5861
if _, contains := h.connections[c]; !contains {

test/common.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ def running_on_ci():
44
"""
55
Returns whether the program is running on a CI environment
66
"""
7-
val = os.getenv("GITHUB_WORKFLOW")
8-
return val is not None
7+
return 'GITHUB_WORKFLOW' in os.environ

0 commit comments

Comments
 (0)