File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1359,6 +1359,12 @@ def humanize_list(values: List[str], combine: str) -> str:
13591359 return f" { combine } " .join (values )
13601360
13611361
1362+ # Similar to typing.assert_never, but returns instead of raising (i.e. has no runtime effect).
1363+ # This is only to avoid "unreachable code", which pyright doesn't type-check.
1364+ def assert_never (arg : Never , / ) -> None :
1365+ pass
1366+
1367+
13621368# n.b. This must be imported and used as @ _overload_with_permissions (without the space)
13631369# this is used by the libcst parser and has no runtime purpose
13641370# it is merely a marker not unlike pytest.mark
@@ -1369,9 +1375,3 @@ def _overload_with_permissions(func: T) -> T:
13691375# this is used as a marker for functions or classes that were created by codemodding
13701376def _generated (func : T ) -> T :
13711377 return func
1372-
1373-
1374- # Similar to typing.assert_never, but returns instead of raising (i.e. has no runtime effect).
1375- # This is only to avoid "unreachable code", which pyright doesn't type-check.
1376- def assert_never (arg : Never , / ) -> None :
1377- pass
You can’t perform that action at this time.
0 commit comments