Commit 235dbc2
committed
refactor(tests): remove global statement in notification tests
Removes the use of a `global` statement in
`tests/shared/test_notifications.py` to resolve a `PLW0603` linting
error reported by Ruff.
The `serv_sesh` global variable has been replaced with a mutable list
(`server_session_ref`) to share the server session object between the
`run_server` and `handle_call_tool` functions within the test. This
maintains the test's functionality while adhering to better coding
practices.1 parent 75af8a0 commit 235dbc2
File tree
1 file changed
+7
-3
lines changed1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
39 | | - | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| |||
0 commit comments