Skip to content

PyneCore v6.0.12 - Bug Fixes and Color Interpolation

Choose a tag to compare

@wallneradam wallneradam released this 26 Jun 12:13
· 81 commits to main since this release

πŸš€ New Features

Color Interpolation

  • Color gradient support: Added color.from_gradient() function for smooth color interpolation between two colors based on a value within a range
  • Enables advanced color transitions for indicators and visual elements

πŸ› Bug Fixes

Function Isolation

  • Inner function shadowing: Fixed critical issue where inner functions that shadow Python builtin names (e.g., filter, max, min) weren't being properly isolated
  • Now correctly tracks shadowed builtins per scope and isolates them appropriately
  • Prevents conflicts between user-defined functions and Python builtins

Persistent Variables

  • Annotated assignments: Fixed bug where persistent variable references weren't being transformed in type-annotated assignments
  • Example: alpha: float = length_2 now correctly transforms length_2 to its persistent form
  • Added comprehensive test coverage for this scenario

Type System

  • Generic type support: Enhanced is_na() function to support GenericAlias types like list[float]
  • Improves compatibility with modern Python type annotations

πŸ§ͺ Testing

  • Added new test cases for persistent variable transformation in annotated assignments
  • Improved test coverage for edge cases and regression prevention

πŸ“ˆ Impact

These fixes improve Pine Script compatibility and prevent subtle bugs in compiled code, especially when using common function names or complex type annotations.