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

non action lambda: do not try to set constants from non scalar or list #2256

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

FredLL-Avaiga
Copy link
Member

resolves #2212

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

non action lambda: do not try to set constants from non scalar or list

Related Tickets & Documents

How to reproduce the issue

import numpy as np

import taipy.gui.builder as tgb
from taipy import Gui

rng = np.random.default_rng()
size = 1

with tgb.Page() as main_page:
    tgb.text(lambda size: rng.random(size).sum() > 0)
    with tgb.part(render=lambda size: rng.random(size).sum() > 0):
        tgb.text("Random sum is greater than 0")

if __name__ == "__main__":
    gui = Gui(main_page)
    gui.run(title="2212 [🐛 BUG] Issue using lambda when passing state variable to a method")

Checklist

  • Does this solution meet the acceptance criteria of the related issue?
  • Is the related issue checklist completed?
  • Does this PR adds unit tests for the developed code? If not, why?
  • End-to-End tests have been added or updated?
  • Was the documentation updated, or a dedicated issue for documentation created? (If applicable)
  • Is the release notes updated? (If applicable)

@FredLL-Avaiga FredLL-Avaiga added 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon 📝Release Notes Impacts the Release Notes or the Documentation in general Gui: Back-End labels Nov 18, 2024
@FredLL-Avaiga FredLL-Avaiga self-assigned this Nov 18, 2024
Copy link
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
19289 16774 87% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
taipy/gui/builder/_utils.py 90% 🟢
TOTAL 90% 🟢

updated for commit: 3c42924 by action🐍

Copy link
Member

@FabienLelaquais FabienLelaquais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😶

@FredLL-Avaiga FredLL-Avaiga merged commit e4c34f8 into develop Nov 18, 2024
128 checks passed
@FredLL-Avaiga FredLL-Avaiga deleted the bug/#2212-allow-generators-in-lambda branch November 18, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gui: Back-End 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon 📝Release Notes Impacts the Release Notes or the Documentation in general
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 BUG] Issue using lambda when passing state variable to a method
3 participants