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

feat: adds update support to content #120

Merged
merged 3 commits into from
Mar 22, 2024
Merged

feat: adds update support to content #120

merged 3 commits into from
Mar 22, 2024

Conversation

tdstein
Copy link
Collaborator

@tdstein tdstein commented Mar 20, 2024

Resolves #89

Here's a recording that demonstrates the type hinting behavior in VSCode.

Screen.Recording.2024-03-22.at.10.20.48.mov

Copy link

github-actions bot commented Mar 20, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
536 448 84% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/posit/connect/content.py 75% 🟢
TOTAL 75% 🟢

updated for commit: e2cdaef by action🐍

@tdstein tdstein marked this pull request as draft March 21, 2024 18:28
@tdstein tdstein marked this pull request as ready for review March 22, 2024 00:08
Copy link

@mmarchetti mmarchetti left a comment

Choose a reason for hiding this comment

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

This approach looks interesting to me. It preserves typchecking/hints to the extent possible while allowing for forward compatibility (I was assuming that's a design goal; if not then we can reconsider).

@tdstein
Copy link
Collaborator Author

tdstein commented Mar 22, 2024

This approach looks interesting to me. It preserves typchecking/hints to the extent possible while allowing for forward compatibility (I was assuming that's a design goal; if not then we can reconsider).

Thanks! Here's another behavioral artifact that I find interesting. You can define additional overload methods, and the language server will navigate those type hints correctly. So, the method signature effectively becomes the request schema for different API versions.

Screen.Recording.2024-03-22.at.12.49.17.mov

@tdstein tdstein merged commit 88ff112 into main Mar 22, 2024
9 checks passed
@tdstein tdstein deleted the tdstein/89 branch March 22, 2024 16:53
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.

Add .update() method to Content
3 participants