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

Refactor delattrbehavior calls #225

Merged

Conversation

frmdstryr
Copy link
Contributor

Same thing for delattr

@sccolbert
Copy link
Member

sccolbert commented Jan 18, 2025 via email

@frmdstryr
Copy link
Contributor Author

Looks ok to me if I did this right..

In [23]: class A(Atom):
    ...:     y = 1
    ...:     def  _get_x(self):
    ...:         return self.y
    ...:     x = Property()
    ...: 

In [24]: A.x.set_delattr_mode(DelAttr.Property, None)

In [25]: a = A()

In [26]: a.x
Out[26]: 1

In [27]: del a.x
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[27], line 1
----> 1 del a.x

AttributeError: 'A' object has no attribute '_del_x'


@MatthieuDartiailh MatthieuDartiailh force-pushed the optimize-delattrbehavior-calls branch from a05834c to 735042e Compare January 20, 2025 10:10
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.67%. Comparing base (32bedfe) to head (735042e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #225   +/-   ##
=======================================
  Coverage   97.67%   97.67%           
=======================================
  Files          24       24           
  Lines        1074     1074           
  Branches      162      162           
=======================================
  Hits         1049     1049           
  Misses         12       12           
  Partials       13       13           

@MatthieuDartiailh MatthieuDartiailh merged commit 1f2a89a into nucleic:main Jan 20, 2025
18 checks passed
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