traits icon indicating copy to clipboard operation
traits copied to clipboard

Add a TypedReadOnly trait

Open itziakos opened this issue 5 years ago • 5 comments

This PR adds a Typed version of the ReadOnly trait.

itziakos avatar Jun 20 '19 16:06 itziakos

sorry @corranwebster and @mdickinson I thought that I had the PR ready but it looks I am still missing something

itziakos avatar Jun 20 '19 17:06 itziakos

@mdickinson and @corranwebster this pr is ready for review.

itziakos avatar Jun 22 '19 11:06 itziakos

Codecov Report

Merging #488 into master will increase coverage by 0.33%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #488      +/-   ##
==========================================
+ Coverage   65.15%   65.48%   +0.33%     
==========================================
  Files          44       44              
  Lines        7040     7061      +21     
  Branches     1413     1416       +3     
==========================================
+ Hits         4587     4624      +37     
+ Misses       2030     2014      -16     
  Partials      423      423
Impacted Files Coverage Δ
traits/api.py 86.2% <ø> (ø) :arrow_up:
traits/trait_types.py 63.98% <100%> (+0.58%) :arrow_up:
traits/has_traits.py 66.32% <0%> (+0.07%) :arrow_up:
traits/trait_handlers.py 63.4% <0%> (+0.33%) :arrow_up:
traits/etsconfig/etsconfig.py 63.58% <0%> (+6.17%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c602b70...94cd6bb. Read the comment docs.

codecov-io avatar Jun 22 '19 12:06 codecov-io

@itziakos Thank you! I'll look at this within the next couple of days.

mdickinson avatar Jun 24 '19 06:06 mdickinson

I'm OK with the behaviour of returning a default before a value is set - I think that might be a more pragmatically useful behaviour - but perhaps the name of the trait is wrong: should it be SetOnce or something like that?

corranwebster avatar Nov 29 '19 10:11 corranwebster