Skip to content

Commit f893664

Browse files
authored
Fix warnings. (#71)
1 parent 93be90d commit f893664

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
os: [ ubuntu-latest, windows-latest, macos-latest ]
1313
# The versions should contain (at least) the lowest requirement
1414
# and a version that is more up to date.
15-
toit-version: [ v2.0.0-alpha.144, latest ]
15+
toit-version: [ v2.0.0-alpha.161, latest ]
1616
include:
17-
- toit-version: v2.0.0-alpha.144
17+
- toit-version: v2.0.0-alpha.161
1818
version-name: old
1919
- toit-version: latest
2020
version-name: new

package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: cli
22
description: Tools, like an argument parser, to create command-line applications.
33
environment:
4-
sdk: ^2.0.0-alpha.144
4+
sdk: ^2.0.0-alpha.161
55
dependencies:
66
fs:
77
url: github.com/toitlang/pkg-fs

src/cache.toit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import host.file
1212
import host.directory
1313
import io
1414
import system
15-
import uuid
1615

1716
import .utils_
1817

src/cli.toit

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by an MIT-style license that can be
33
// found in the package's LICENSE file.
44
5-
import uuid
5+
import uuid show Uuid
66
import system
77

88
import .cache
@@ -816,7 +816,7 @@ class OptionPatterns extends Option:
816816
A Uuid option.
817817
*/
818818
class OptionUuid extends Option:
819-
default/uuid.Uuid?
819+
default/Uuid?
820820

821821
/**
822822
Creates a new Uuid option.
@@ -845,8 +845,8 @@ class OptionUuid extends Option:
845845

846846
type -> string: return "uuid"
847847

848-
parse str/string --for-help-example/bool=false -> uuid.Uuid:
849-
return uuid.parse str --on-error=:
848+
parse str/string --for-help-example/bool=false -> Uuid:
849+
return Uuid.parse str --on-error=:
850850
throw "Invalid value for option '$name': '$str'. Expected a UUID."
851851

852852

tests/options_test.toit

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
import cli
66
import expect show *
7-
import uuid
7+
import uuid show Uuid
88

99
main:
1010
test-string
@@ -131,14 +131,14 @@ test-uuid:
131131
expect-null option.default
132132
expect-equals "uuid" option.type
133133

134-
option = cli.OptionUuid "uuid" --default=uuid.NIL
135-
expect-equals uuid.NIL option.default
134+
option = cli.OptionUuid "uuid" --default=Uuid.NIL
135+
expect-equals Uuid.NIL option.default
136136

137137
value := option.parse "00000000-0000-0000-0000-000000000000"
138-
expect-equals uuid.NIL value
138+
expect-equals Uuid.NIL value
139139

140140
value = option.parse "00000000-0000-0000-0000-000000000001"
141-
expect-equals (uuid.parse "00000000-0000-0000-0000-000000000001") value
141+
expect-equals (Uuid.parse "00000000-0000-0000-0000-000000000001") value
142142

143143
expect-throw "Invalid value for option 'uuid': 'foo'. Expected a UUID.":
144144
option.parse "foo"

0 commit comments

Comments
 (0)