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

Fix some missing stubs #1204

Merged
merged 6 commits into from
Jun 26, 2020
Merged

Fix some missing stubs #1204

merged 6 commits into from
Jun 26, 2020

Conversation

mdickinson
Copy link
Member

@mdickinson mdickinson commented Jun 10, 2020

This PR fixes some (but not all) missing type stubs

  • Add missing api.pyi imports for stubs already defined in has_traits.pyi and other modules
  • Add a couple of supporting tests for some of the more commonly used stubs
  • Remove misnamed base_trait_hander.pyi file.

Fixes #1201
Fixes some but not all of #1200.

@@ -19,8 +19,27 @@ from .traits import (
)

from .has_traits import (
ABCHasStrictTraits as ABCHasStrictTraits,
Copy link
Member Author

Choose a reason for hiding this comment

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

No, these aren't alphabetized; for ease of comparison, I'm using the same order as is currently in api.py.

@mdickinson
Copy link
Member Author

Apologies for the multiple commits; this is done now.

The aim is to bring already-defined stubs into api.pyi where appropriate. Defining new stubs will be a separate task (and not one I'm likely to tackle in the near future).

@mdickinson
Copy link
Member Author

@rahulporuri This should fix #1201. Do you have bandwidth to review?

@rahulporuri
Copy link
Contributor

@rahulporuri This should fix #1201. Do you have bandwidth to review?

I should be able to review this by lunch time today

Copy link
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

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

LGTM but for two nitpicky comments

traits-stubs/traits-stubs/api.pyi Show resolved Hide resolved
traits-stubs/traits-stubs/api.pyi Show resolved Hide resolved
@mdickinson mdickinson merged commit 47806c8 into master Jun 26, 2020
@mdickinson mdickinson deleted the fix/missing-stubs branch June 26, 2020 10:07
mdickinson added a commit that referenced this pull request Jul 21, 2020
* Add a couple of missing imports to api.pyi

* Remove mis-spelled stubs file

* Add missing api.pyi stubs for the has_traits module

* Add CTrait

* Add imports for BaseTraitHandler and TraitHandler

* Add constants

(cherry picked from commit 47806c8)
mdickinson added a commit that referenced this pull request Jul 21, 2020
* Fix end-year in copyright statement (#1198)

(cherry picked from commit 21e2a99)

* Fix trait-documenter extension tests for Sphinx 3.1 (#1206)

(cherry picked from commit aeaf72f)

* DOC/FIX: User manual mentioning a nonexisting feature in metadata filter (#1207)

* Fix user manual erroneously mentioning a nonexisting feature

* Fix grammar

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
(cherry picked from commit 3e78a41)

* Spelling and grammar. (#1210)

(cherry picked from commit 24c4d76)

* Fix description in README to match the one in the setup script (#1219)

(cherry picked from commit a5dc3f2)

* Fix some missing stubs (#1204)

* Add a couple of missing imports to api.pyi

* Remove mis-spelled stubs file

* Add missing api.pyi stubs for the has_traits module

* Add CTrait

* Add imports for BaseTraitHandler and TraitHandler

* Add constants

(cherry picked from commit 47806c8)

* Standardize copyright years (#1227)

* Standardize copyright years

* Use hard-coded year in conf.py, for ease of later search-and-replace. Also normalise punctuation.

* More punctuation OCD

* More consistency fixes

* Remove unused import

* Remove the _right_ unused import

* Yet one more consistency fix

(cherry picked from commit aa63531)

* Don't mutate global state at import time in a test module (#1222)

(cherry picked from commit 24345a1)

* Fix typo in optional_dependencies (#1235)

Fix a comment that mistakenly refers to traits.api, when it means traitsui.api.

(cherry picked from commit a48ede5)

* Update PyPI links and capitalization in README.rst (#1250)

* Update PyPI links and capitalization in README.rst

This PR:
- updates incorrect and inconsistent capitalization in the README
- adds a PyPI link for Sphinx
- adds a PyPI link for the Enthought Sphinx Theme (the previous link was to GitHub)

* Clarify that later versions  of Sphinx are fine

* Update README.rst

(cherry picked from commit 8d03955)

* Update changelog

Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com>
@mdickinson mdickinson added porting: backported to 6.1 This PR has been backported to the Traits 6.1.x release branch and removed porting: needs backport to 6.1 labels Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
porting: backported to 6.1 This PR has been backported to the Traits 6.1.x release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid stub module - traits.base_trait_hander
2 participants