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

Remove redundant types from docstrings #2941

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

xmo-odoo
Copy link
Contributor

@xmo-odoo xmo-odoo commented Apr 5, 2024

surely sphinx can get that from the actual types?

surely sphinx can get that from the actual types?
@codecov-commenter
Copy link

codecov-commenter commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.74%. Comparing base (7266e81) to head (1a34771).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2941   +/-   ##
=======================================
  Coverage   96.74%   96.74%           
=======================================
  Files         147      147           
  Lines       14978    14979    +1     
=======================================
+ Hits        14491    14492    +1     
  Misses        487      487           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

If sphinx can't link objects because it doesn't recognise them, maybe lying about the context being type checking will work.
Setting TYPE_CHECKING apparently triggers a circular import error in urllib3 which is not great.

Try an alternate option, checking if sphinx is imported. This is just to investigate if circular imports are an issue, as this would not be acceptable to release (there might be people using pygithub within sphinx for instance)
@xmo-odoo
Copy link
Contributor Author

xmo-odoo commented Apr 5, 2024

Crud, looks like trying to set TYPE_CHECKING does not work because it causes a circular import error in an other lib, and the alternate hack shows up as circular imports in pygithub.

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.

None yet

2 participants