Skip to content

Commit ed7b56c

Browse files
committed
ignore missing coverage
1 parent 3f84313 commit ed7b56c

24 files changed

+47
-47
lines changed

src/py/reactpy/reactpy/_console/ast_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def rewrite_changed_nodes(
3737
):
3838
nodes_to_unparse.append(current_node)
3939
break
40-
else: # pragma: no cover
40+
else: # nocov
4141
msg = "Failed to change code"
4242
raise RuntimeError(msg)
4343

src/py/reactpy/reactpy/_console/rewrite_camel_case_props.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
@click.argument("paths", nargs=-1, type=click.Path(exists=True))
2424
def rewrite_camel_case_props(paths: list[str]) -> None:
2525
"""Rewrite camelCase props to snake_case"""
26-
if sys.version_info < (3, 9): # pragma: no cover
26+
if sys.version_info < (3, 9): # nocov
2727
msg = "This command requires Python>=3.9"
2828
raise RuntimeError(msg)
2929

src/py/reactpy/reactpy/_console/rewrite_keys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def rewrite_keys(paths: list[str]) -> None:
4545
just above its changes. As such it requires manual intervention to put those
4646
comments back in their original location.
4747
"""
48-
if sys.version_info < (3, 9): # pragma: no cover
48+
if sys.version_info < (3, 9): # nocov
4949
msg = "This command requires Python>=3.9"
5050
raise RuntimeError(msg)
5151

src/py/reactpy/reactpy/_option.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def __repr__(self) -> str:
119119
return f"Option({self._name}={self.current!r})"
120120

121121

122-
class DeprecatedOption(Option[_O]): # pragma: no cover
122+
class DeprecatedOption(Option[_O]): # nocov
123123
def __init__(self, message: str, *args: Any, **kwargs: Any) -> None:
124124
self._deprecation_message = message
125125
super().__init__(*args, **kwargs)

src/py/reactpy/reactpy/backend/_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async def serve_development_asgi(
5353
# Since we aren't using the uvicorn's `run()` API, we can't guarantee uvicorn's
5454
# order of operations. So we need to make sure `shutdown()` always has an initialized
5555
# list of `self.servers` to use.
56-
if not hasattr(server, "servers"): # pragma: no cover
56+
if not hasattr(server, "servers"): # nocov
5757
server.servers = []
5858
await asyncio.wait_for(server.shutdown(), timeout=3)
5959

src/py/reactpy/reactpy/backend/default.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def configure(
1616
app: Any, component: RootComponentConstructor, options: None = None
1717
) -> None:
1818
"""Configure the given app instance to display the given component"""
19-
if options is not None: # pragma: no cover
19+
if options is not None: # nocov
2020
msg = "Default implementation cannot be configured with options"
2121
raise ValueError(msg)
2222
return _default_implementation().configure(app, component)
@@ -27,7 +27,7 @@ def create_development_app() -> Any:
2727
return _default_implementation().create_development_app()
2828

2929

30-
def Options(*args: Any, **kwargs: Any) -> NoReturn: # pragma: no cover
30+
def Options(*args: Any, **kwargs: Any) -> NoReturn: # nocov
3131
"""Create configuration options"""
3232
msg = "Default implementation has no options."
3333
raise ValueError(msg)
@@ -57,7 +57,7 @@ def _default_implementation() -> BackendImplementation[Any]:
5757

5858
try:
5959
implementation = next(all_implementations())
60-
except StopIteration: # pragma: no cover
60+
except StopIteration: # nocov
6161
logger.debug("Backend implementation import failed", exc_info=exc_info())
6262
msg = "No built-in server implementation installed."
6363
raise RuntimeError(msg) from None

src/py/reactpy/reactpy/backend/flask.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def run_server() -> None:
111111
# the thread should eventually join
112112
thread.join(timeout=3)
113113
# just double check it happened
114-
if thread.is_alive(): # pragma: no cover
114+
if thread.is_alive(): # nocov
115115
msg = "Failed to shutdown server."
116116
raise RuntimeError(msg)
117117

@@ -129,7 +129,7 @@ def use_request() -> Request:
129129
def use_connection() -> Connection[_FlaskCarrier]:
130130
"""Get the current :class:`Connection`"""
131131
conn = _use_connection()
132-
if not isinstance(conn.carrier, _FlaskCarrier): # pragma: no cover
132+
if not isinstance(conn.carrier, _FlaskCarrier): # nocov
133133
msg = f"Connection has unexpected carrier {conn.carrier}. Are you running with a Flask server?"
134134
raise TypeError(msg)
135135
return conn
@@ -152,7 +152,7 @@ def _setup_common_routes(
152152
options: Options,
153153
) -> None:
154154
cors_options = options.cors
155-
if cors_options: # pragma: no cover
155+
if cors_options: # nocov
156156
cors_params = cors_options if isinstance(cors_options, dict) else {}
157157
CORS(api_blueprint, **cors_params)
158158

@@ -258,7 +258,7 @@ async def main() -> None:
258258
dispatch_thread_info = cast(_DispatcherThreadInfo, dispatch_thread_info_ref.current)
259259

260260
if dispatch_thread_info is None:
261-
raise RuntimeError("Failed to create dispatcher thread")
261+
raise RuntimeError("Failed to create dispatcher thread") # nocov
262262

263263
stop = ThreadEvent()
264264

@@ -274,7 +274,7 @@ def run_send() -> None:
274274
dispatch_thread_info.dispatch_loop.call_soon_threadsafe(
275275
dispatch_thread_info.async_recv_queue.put_nowait, value
276276
)
277-
finally: # pragma: no cover
277+
finally: # nocov
278278
dispatch_thread_info.dispatch_loop.call_soon_threadsafe(
279279
dispatch_thread_info.dispatch_future.cancel
280280
)

src/py/reactpy/reactpy/backend/hooks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
def use_connection() -> Connection[Any]:
1414
"""Get the current :class:`~reactpy.backend.types.Connection`."""
1515
conn = use_context(ConnectionContext)
16-
if conn is None:
16+
if conn is None: # nocov
1717
msg = "No backend established a connection."
18-
raise RuntimeError(msg) # pragma: no cover
18+
raise RuntimeError(msg)
1919
return conn
2020

2121

src/py/reactpy/reactpy/backend/sanic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def use_websocket() -> WebSocketConnection:
8080
def use_connection() -> Connection[_SanicCarrier]:
8181
"""Get the current :class:`Connection`"""
8282
conn = _use_connection()
83-
if not isinstance(conn.carrier, _SanicCarrier): # pragma: no cover
83+
if not isinstance(conn.carrier, _SanicCarrier): # nocov
8484
msg = f"Connection has unexpected carrier {conn.carrier}. Are you running with a Sanic server?"
8585
raise TypeError(msg)
8686
return conn
@@ -103,7 +103,7 @@ def _setup_common_routes(
103103
options: Options,
104104
) -> None:
105105
cors_options = options.cors
106-
if cors_options: # pragma: no cover
106+
if cors_options: # nocov
107107
cors_params = cors_options if isinstance(cors_options, dict) else {}
108108
CORS(api_blueprint, **cors_params)
109109

@@ -159,7 +159,7 @@ async def model_stream(
159159
) -> None:
160160
asgi_app = getattr(request.app, "_asgi_app", None)
161161
scope = asgi_app.transport.scope if asgi_app else {}
162-
if not scope: # pragma: no cover
162+
if not scope: # nocov
163163
logger.warning("No scope. Sanic may not be running with an ASGI server")
164164

165165
send, recv = _make_send_recv_callbacks(socket)

src/py/reactpy/reactpy/backend/starlette.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def use_websocket() -> WebSocket:
7676

7777
def use_connection() -> Connection[WebSocket]:
7878
conn = _use_connection()
79-
if not isinstance(conn.carrier, WebSocket): # pragma: no cover
79+
if not isinstance(conn.carrier, WebSocket): # nocov
8080
msg = f"Connection has unexpected carrier {conn.carrier}. Are you running with a Flask server?"
8181
raise TypeError(msg)
8282
return conn
@@ -95,7 +95,7 @@ class Options(CommonOptions):
9595

9696
def _setup_common_routes(options: Options, app: Starlette) -> None:
9797
cors_options = options.cors
98-
if cors_options: # pragma: no cover
98+
if cors_options: # nocov
9999
cors_params = (
100100
cors_options if isinstance(cors_options, dict) else {"allow_origins": ["*"]}
101101
)

0 commit comments

Comments
 (0)