Skip to content

Commit 42fec81

Browse files
rokpaddyroddy
andauthored
GH-19: [Python] Fix unresolved-global (#39)
* Add py.typed file to signify that the library is typed See the relevant PEP https://peps.python.org/pep-0561 * Prepare `pyarrow-stubs` for history merging MINOR: [Python] Prepare `pyarrow-stubs` for history merging Co-authored-by: ZhengYu, Xu <zen-xu@outlook.com> * Add `ty` configuration and suppress error codes * One line per rule * Add licence header from original repo for all `.pyi` files * Revert "Add licence header from original repo for all `.pyi` files" This reverts commit 1631f39. * Prepare for licence merging * Exclude `stubs` from `rat` test * Add Apache licence clause to `py.typed` * Reduce list * Add `ty` as a step in the action * Run in the correct directory * Remove `check` from `pip` * Fix `unresolved-reference` error * Revert "Fix `unresolved-reference` error" This reverts commit 7ee3d2f. * Fix unresolved-global --------- Co-authored-by: Patrick J. Roddy <patrickjamesroddy@gmail.com>
1 parent 745c6ab commit 42fec81

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python/pyarrow/tests/test_flight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ def test_client_wait_for_available():
11181118
server = None
11191119

11201120
def serve():
1121-
global server
1121+
nonlocal server
11221122
time.sleep(0.5)
11231123
server = FlightServerBase(location)
11241124
server.serve()

python/scripts/run_emscripten_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def end_headers(self):
114114

115115

116116
def run_server_thread(dist_dir, q):
117-
global _SERVER_ADDRESS
117+
global _SERVER_ADDRESS # type: ignore[unresolved-global]
118118
os.chdir(dist_dir)
119119
server = http.server.HTTPServer(("", 0), TemplateOverrider)
120120
q.put(server.server_address)

0 commit comments

Comments
 (0)