Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler conversions #171

Merged
merged 22 commits into from
Aug 28, 2024
Merged

Compiler conversions #171

merged 22 commits into from
Aug 28, 2024

Conversation

aaronpowell
Copy link
Collaborator

@aaronpowell aaronpowell commented Aug 28, 2024

This pull request includes several changes across multiple files to improve exception handling, add new test cases, and update type conversion methods. The most important changes include adding exception handling for Python conversions, adding new test cases for collections and dictionaries, and updating type conversion methods to enhance functionality and reliability.

Exception Handling Improvements:

  • Updated multiple methods to throw exceptions directly when Python errors occur, improving error reporting and debugging. (src/CSnakes.Runtime/CPython/Dict.cs, src/CSnakes.Runtime/CPython/Import.cs, src/CSnakes.Runtime/CPython/List.cs, src/CSnakes.Runtime/CPython/Object.cs, src/CSnakes.Runtime/CPython/Tuple.cs, src/CSnakes.Runtime/CPython/Unicode.cs) [1] [2] [3] [4] [5] [6]

Test Case Additions:

  • Added new test cases to PyObjectTests for collections and dictionaries, ensuring the new conversion methods work as expected. (src/CSnakes.Runtime.Tests/Python/PyObjectTests.cs)

Type Conversion Enhancements:

  • Updated the PyObjectTypeConverter to improve type conversion methods, including adding new methods for converting to collections and dictionaries. (src/CSnakes.Runtime/PyObjectTypeConverter.Dictionary.cs, src/CSnakes.Runtime/PyObjectTypeConverter.List.cs, src/CSnakes.Runtime/PyObjectTypeConverter.Generator.cs, src/CSnakes.Runtime/PyObjectTypeConverter.BigInteger.cs) [1] [2] [3] [4] [5]

Code Formatting:

  • Improved code formatting for better readability and consistency, including adjusting indentation and line breaks. (src/CSnakes.Runtime.Tests/RuntimeTestBase.cs, src/CSnakes.Runtime.Tests/Python/PyObjectTests.cs) [1] [2]

Internal Method Updates:

  • Changed access modifiers for several methods in PyObjectTypeConverter to internal, allowing for better encapsulation and testing. (src/CSnakes.Runtime/PyObjectTypeConverter.Dictionary.cs, src/CSnakes.Runtime/PyObjectTypeConverter.Generator.cs, src/CSnakes.Runtime/PyObjectTypeConverter.BigInteger.cs) [1] [2] [3]

tonybaloney and others added 22 commits August 27, 2024 10:33
@tonybaloney tonybaloney merged commit 94227c9 into profile_app Aug 28, 2024
@tonybaloney tonybaloney deleted the compiler_conversions branch August 28, 2024 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants