enthought / traits

Observable typed attributes for Python classes
Other
432 stars 85 forks source link

Integrate traits-stubs into the traits package #1714

Closed mdickinson closed 2 years ago

mdickinson commented 2 years ago

This PR (targeting Traits 7.0) integrates the separate traits-stubs package into the main traits package. This will remove the need to make a separate release of the traits-stubs package every time we release the traits package.

Notes:

Closes #1254

corranwebster commented 2 years ago
  • The stubs tests fail when run from an editable install, but are happy when run for a non-editable install

Do you know why?

mdickinson commented 2 years ago

Do you know why?

No, haven't entirely figured it out. I suspect the C extension of being a factor, though.

mdickinson commented 2 years ago

I'll do a bit of digging into the editable install failures before merging; if I can't figure out what's going on, I'll open an issue.

mdickinson commented 2 years ago

I'll do a bit of digging into the editable install failures before merging

The mypy complaints with the editable install all look legitimate, so the question now is: why is the editable install better at picking up the typing issues than the non-editable install.

Some of the problems being picked up are outside the direct stubs test files. Those should also eventually be fixed, but it may take us a while to get there.

I'll make a follow-up PR with the individual fixes needed.