Skip to content

Commit a492972

Browse files
hrolfurgylfaHrólfur
authored andcommitted
Rename Sentinel to lower case in error messages
1 parent 2fb468f commit a492972

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

pyrefly/lib/alt/expr.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,7 +1834,7 @@ impl<'a, Ans: LookupAnswer> AnswersSolver<'a, Ans> {
18341834
errors,
18351835
arg.range(),
18361836
ErrorKind::InvalidSentinel,
1837-
"Expected first argument of Sentinel to be a string literal".to_owned(),
1837+
"Expected first argument of sentinel to be a string literal".to_owned(),
18381838
);
18391839
}
18401840
} else {
@@ -1873,7 +1873,7 @@ impl<'a, Ans: LookupAnswer> AnswersSolver<'a, Ans> {
18731873
errors,
18741874
kw.range,
18751875
ErrorKind::InvalidSentinel,
1876-
format!("Invalid type for Sentinel `repr` {got}"),
1876+
format!("Invalid type for sentinel `repr` {got}"),
18771877
);
18781878
}
18791879
}
@@ -1882,7 +1882,7 @@ impl<'a, Ans: LookupAnswer> AnswersSolver<'a, Ans> {
18821882
errors,
18831883
kw.range,
18841884
ErrorKind::InvalidSentinel,
1885-
format!("Unexpected keyword argument `{}` to Sentinel", id.id),
1885+
format!("Unexpected keyword argument `{}` to sentinel", id.id),
18861886
);
18871887
}
18881888
},
@@ -1891,7 +1891,7 @@ impl<'a, Ans: LookupAnswer> AnswersSolver<'a, Ans> {
18911891
errors,
18921892
kw.range,
18931893
ErrorKind::InvalidSentinel,
1894-
"Cannot pass unpacked keyword arguments to Sentinel".to_owned(),
1894+
"Cannot pass unpacked keyword arguments to sentinel".to_owned(),
18951895
);
18961896
}
18971897
}

pyrefly/lib/test/sentinel.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ testcase!(
5353
from typing_extensions import Sentinel
5454
5555
text = 5
56-
A = Sentinel("A", repr=text) # E: Invalid type for Sentinel `repr` Literal[5]
56+
A = Sentinel("A", repr=text) # E: Invalid type for sentinel `repr` Literal[5]
5757
"#,
5858
);
5959

@@ -62,7 +62,7 @@ testcase!(
6262
r#"
6363
from typing_extensions import Sentinel
6464
65-
A = Sentinel(name="A") # E: Sentinel requires a name as the first argument # E: Unexpected keyword argument `name` to Sentinel
65+
A = Sentinel(name="A") # E: Sentinel requires a name as the first argument # E: Unexpected keyword argument `name` to sentinel
6666
"#,
6767
);
6868

0 commit comments

Comments
 (0)