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

DM-36116: Add docs for ellipsis workaround. #138

Merged
merged 2 commits into from Sep 7, 2022
Merged

Conversation

TallJimbo
Copy link
Member

@TallJimbo TallJimbo commented Sep 6, 2022

This replaces an outdated code comment with a module docstring, since it doesn't look possible to actually document the symbols exported by this module.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes: I don't think it's user-visibly distinct from DM-36108.

@codecov
Copy link

codecov bot commented Sep 6, 2022

Codecov Report

Merging #138 (78aade4) into main (e7fd1f4) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #138      +/-   ##
==========================================
+ Coverage   92.12%   92.13%   +0.01%     
==========================================
  Files          44       44              
  Lines        2729     2733       +4     
==========================================
+ Hits         2514     2518       +4     
  Misses        215      215              
Impacted Files Coverage Δ
python/lsst/utils/ellipsis.py 71.42% <100.00%> (+11.42%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

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

These changes look good but now I realize that types.EllipsisType does exist in python 3.10 -- shouldn't we be using it here if it is defined and only falling back to the existing code if it's an older python?

https://docs.python.org/3/library/types.html#types.EllipsisType and https://docs.python.org/3/library/constants.html#Ellipsis

behave as expected under ``is`` comparisons and type-narrowing expressions,
such as::

v: EllipseType | int
Copy link
Member

Choose a reason for hiding this comment

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

Typo here. EllipseType.

such as::

v: EllipseType | int
if v is not Ellipse:
Copy link
Member

Choose a reason for hiding this comment

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

Ellipse?

This replaces an outdated code comment with a module docstring, since
it doesn't look possible to actually document the symbols exported by
this module.
@TallJimbo TallJimbo merged commit 6f6f670 into main Sep 7, 2022
@TallJimbo TallJimbo deleted the tickets/DM-36116 branch September 7, 2022 01:52
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