Skip to content

[fix] Update types to fix mypy#13178

Merged
lukasmasuch merged 1 commit intodevelopfrom
12-01-_fix_update_types_to_fix_mypy
Dec 2, 2025
Merged

[fix] Update types to fix mypy#13178
lukasmasuch merged 1 commit intodevelopfrom
12-01-_fix_update_types_to_fix_mypy

Conversation

@sfc-gh-bnisco
Copy link
Copy Markdown
Collaborator

@sfc-gh-bnisco sfc-gh-bnisco commented Dec 2, 2025

Describe your changes

Fixed type checking issues.

Testing Plan

Covered by CI.


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Dec 2, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@sfc-gh-bnisco sfc-gh-bnisco added the change:bugfix PR contains bug fix implementation label Dec 2, 2025 — with Graphite App
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 2, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-13178/streamlit-1.51.0-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-13178.streamlit.app (☁️ Deploy here if not accessible)

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sfc-gh-bnisco sfc-gh-bnisco added impact:internal PR changes only affect internal code security-assessment-completed labels Dec 2, 2025 — with Graphite App
@sfc-gh-bnisco sfc-gh-bnisco marked this pull request as ready for review December 2, 2025 04:26
Copilot AI review requested due to automatic review settings December 2, 2025 04:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses mypy type checking issues by removing unnecessary type ignore comments and adding appropriate type casts. The changes improve type safety without affecting functionality.

Key Changes:

  • Removed obsolete # type: ignore comments that are no longer needed with updated pandas type stubs
  • Added cast("Any", column_name) to handle DataFrame column name type flexibility
  • Reformatted a list comprehension to single-line format for consistency

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/streamlit/elements/widgets/data_editor.py Removed type ignore comment from to_flat_index() call and added cast for DataFrame column indexing to handle non-string column names
lib/streamlit/elements/lib/pandas_styler_utils.py Removed type ignore comment from iloc assignment that is no longer needed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 2, 2025

📈 Frontend coverage change detected

The frontend unit test (vitest) coverage has increased by 0.0600%

  • Current PR: 89.2500% (51658 lines, 5552 missed)
  • Latest develop: 89.1900% (51658 lines, 5582 missed)

🎉 Great job on improving test coverage!

📊 View detailed coverage comparison

Copy link
Copy Markdown
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@lukasmasuch lukasmasuch merged commit 408a67e into develop Dec 2, 2025
60 of 61 checks passed
@lukasmasuch lukasmasuch deleted the 12-01-_fix_update_types_to_fix_mypy branch December 2, 2025 08:30
lukasmasuch pushed a commit that referenced this pull request Dec 3, 2025
## Describe your changes

Fixed type checking issues.

## Testing Plan

Covered by CI.

---

**Contribution License Agreement**

By submitting this pull request you agree that all contributions to this
project are made under the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:bugfix PR contains bug fix implementation impact:internal PR changes only affect internal code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants