Skip to content

Convert is_uniformly_false() method calls to attribute access#71

Merged
shanest merged 2 commits into
remove-frozendictfrom
copilot/sub-pr-70
Jan 26, 2026
Merged

Convert is_uniformly_false() method calls to attribute access#71
shanest merged 2 commits into
remove-frozendictfrom
copilot/sub-pr-70

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 26, 2026

PR #70 added @cached_property to is_uniformly_false, changing it from a method to a property. However, 4 call sites still used method invocation syntax, causing TypeError: 'bool' object is not callable.

Changes

  • Removed () from all is_uniformly_false() invocations to access as property:
    • src/examples/learn_quant/scripts/generate_expressions.py
    • src/examples/modals/scripts/generate_expressions.py
    • src/examples/modals/util.py
    • src/examples/indefinites/scripts/generate_expressions.py
# Before
if meaning.is_uniformly_false():
    del expressions_by_meaning[meaning]

# After
if meaning.is_uniformly_false:
    del expressions_by_meaning[meaning]

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: shanest <351655+shanest@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on attribute invocation in cleaning PR Convert is_uniformly_false() method calls to attribute access Jan 26, 2026
Copilot AI requested a review from shanest January 26, 2026 18:48
Copy link
Copy Markdown
Collaborator

@shanest shanest left a comment

Choose a reason for hiding this comment

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

LGTM; thanks!

@shanest shanest marked this pull request as ready for review January 26, 2026 18:58
Copilot AI review requested due to automatic review settings January 26, 2026 18:58
@shanest shanest merged commit 89e9210 into remove-frozendict Jan 26, 2026
3 checks passed
@shanest shanest deleted the copilot/sub-pr-70 branch January 26, 2026 18:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes remaining call sites still invoking Meaning.is_uniformly_false as a method after it was converted to a @cached_property, preventing TypeError: 'bool' object is not callable.

Changes:

  • Updated is_uniformly_false() invocations to is_uniformly_false in 4 locations.
  • Ensured scripts/utilities correctly treat is_uniformly_false as a boolean attribute.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/examples/learn_quant/scripts/generate_expressions.py Switches is_uniformly_false() to property access during expression filtering.
src/examples/modals/scripts/generate_expressions.py Switches is_uniformly_false() to property access during expression filtering.
src/examples/modals/util.py Switches is_uniformly_false() to property access when skipping unusable meanings.
src/examples/indefinites/scripts/generate_expressions.py Switches is_uniformly_false() to property access during expression filtering.
Comments suppressed due to low confidence (2)

src/examples/learn_quant/scripts/generate_expressions.py:214

  • Variable creation_elapsed is not used.
        creation_elapsed = time() - creation_start

src/examples/learn_quant/scripts/generate_expressions.py:5

  • Module 'pathlib' is imported with both 'import' and 'import from'.
import pathlib

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants