From 989b4cf9e02040e31274d9e1ef82613f73c71395 Mon Sep 17 00:00:00 2001 From: Jeffrey Davis Date: Tue, 27 Aug 2024 19:28:41 -0700 Subject: [PATCH 1/2] Fix warnings. --- PythonKit/NumpyConversion.swift | 2 +- Tests/PythonKitTests/PythonFunctionTests.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PythonKit/NumpyConversion.swift b/PythonKit/NumpyConversion.swift index c802694..e0c81a2 100644 --- a/PythonKit/NumpyConversion.swift +++ b/PythonKit/NumpyConversion.swift @@ -137,7 +137,7 @@ where Element : NumpyScalarCompatible { self.init(repeating: dummyPointer.move(), count: scalarCount) dummyPointer.deallocate() withUnsafeMutableBufferPointer { buffPtr in - buffPtr.baseAddress!.assign(from: ptr, count: scalarCount) + buffPtr.baseAddress!.update(from: ptr, count: scalarCount) } } } diff --git a/Tests/PythonKitTests/PythonFunctionTests.swift b/Tests/PythonKitTests/PythonFunctionTests.swift index db39d06..f11ad57 100644 --- a/Tests/PythonKitTests/PythonFunctionTests.swift +++ b/Tests/PythonKitTests/PythonFunctionTests.swift @@ -204,7 +204,7 @@ class PythonFunctionTests: XCTestCase { // Example of function with no named parameters, which can be stated // ergonomically using an underscore. The ignored input is a [PythonObject]. - let testFunction = PythonFunction { _ in + let _ = PythonFunction { _ in throw HelloWorldException("EXAMPLE ERROR MESSAGE", 2) }.pythonObject From df710260036bb36aaddad8273ebb0937c9f6f525 Mon Sep 17 00:00:00 2001 From: Jeffrey Davis Date: Tue, 27 Aug 2024 19:32:16 -0700 Subject: [PATCH 2/2] Add temp to git ignore. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9d88ee1..3d50865 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ # Temporary Items *.tmp *.tmp.* +temp # Virtual Environments /venv*/