Skip to content

Modernize syntax for Python 3.11 - #985

Open
tdstein wants to merge 1 commit into
mainfrom
symphony/posit-dev_rsconnect-python_951-9c714638d1874e8a
Open

tdstein wants to merge 1 commit into
mainfrom
symphony/posit-dev_rsconnect-python_951-9c714638d1874e8a

Conversation

@tdstein

@tdstein tdstein commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

- Ruff's default target and legacy typing syntax
+ Python 3.11 target and pyupgrade rules

Apply Ruff's safe upgrades across the CLI and tests. Retain percent formatting, whose automatic conversion can change behavior, and the recursive JSON alias's runtime forward references.

Evidence

  • Before: Ruff did not enforce Python 3.11 pyupgrade rules.
  • After: just lint passes; the full suite passes on Python 3.11 and 3.13 (2,017 passed, 20 skipped each). Pyright remains advisory and reports errors.

Merge Danger

Door: two-way

Blast Radius: broad — the mechanical changes span the CLI and tests.

Closes #951

@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.2

QR code for preview link

🚀 View preview at
https://posit-dev.github.io/rsconnect-python/pr-preview/pr-985/

Built to branch gh-pages at 2026-11-16 19:48 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11289 10010 89% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/actions.py 63% 🟢
rsconnect/actions_content.py 67% 🟢
rsconnect/actions_environment.py 95% 🟢
rsconnect/actions_integration.py 87% 🟢
rsconnect/api.py 90% 🟢
rsconnect/bundle.py 90% 🟢
rsconnect/certificates.py 100% 🟢
rsconnect/connect_cloud.py 98% 🟢
rsconnect/device_login.py 89% 🟢
rsconnect/environment.py 94% 🟢
rsconnect/environment_node.py 100% 🟢
rsconnect/environment_r.py 93% 🟢
rsconnect/exception.py 100% 🟢
rsconnect/git_metadata.py 95% 🟢
rsconnect/http_support.py 91% 🟢
rsconnect/json_web_token.py 97% 🟢
rsconnect/log.py 76% 🟢
rsconnect/main.py 89% 🟢
rsconnect/metadata.py 92% 🟢
rsconnect/models.py 93% 🟢
rsconnect/oauth.py 87% 🟢
rsconnect/preflight.py 87% 🟢
rsconnect/preflight_node.py 91% 🟢
rsconnect/pyproject.py 100% 🟢
rsconnect/quickstart/quickstart.py 97% 🟢
rsconnect/snowflake.py 86% 🟢
rsconnect/subprocesses/inspect_environment.py 73% 🟢
rsconnect/timeouts.py 100% 🟢
rsconnect/validation.py 97% 🟢
rsconnect/version_check.py 93% 🟢
TOTAL 90% 🟢

updated for commit: 50dbb6c by action🐍

@tdstein
tdstein requested review from amol- and joshyam-k November 16, 2026 19:55

This branch has not been deployed

No deployments
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.

Modernize syntax for Python 3.11 (ruff UP)

1 participant