Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ashm-dev
Copy link
Contributor

Describe your changes

  • Added encoding="utf-8" parameter to all .write_text() method calls in the codebase
  • Improved code formatting in the main_init function in cli.py

GitHub Issue Link (if applicable)

#11086

Testing Plan

  • Explanation of why no additional tests are needed
  • Unit Tests (JS and/or Python)
  • E2E Tests
  • Any manual testing needed?

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
Contributor

snyk-io bot commented Apr 13, 2025

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

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

Copy link
Collaborator

@sfc-gh-lwilby sfc-gh-lwilby left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this @ashm-dev!

@sfc-gh-lwilby sfc-gh-lwilby added security-assessment-completed Security assessment has been completed for PR change:bugfix PR contains bug fix implementation impact:users PR changes affect end users labels Apr 14, 2025
@sfc-gh-nbellante
Copy link
Contributor

I tried to see if we could make a custom rule for ruff to prevent this issue from coming back in the future but it seems ruff does not currently support custom rules. :(

@sfc-gh-nbellante sfc-gh-nbellante merged commit 7c603f8 into streamlit:develop Apr 14, 2025
35 of 36 checks passed
@ashm-dev ashm-dev deleted the fix-11086 branch April 15, 2025 03:55
@sfc-gh-lwilby
Copy link
Collaborator

I tried to see if we could make a custom rule for ruff to prevent this issue from coming back in the future but it seems ruff does not currently support custom rules. :(

I was wondering also if a linter rule might be too general and we might have cases where we don't want this behaviour.

Maybe there is a way to mock the environment in a test. @ashm-dev tagging you in case you have ideas on how we might add a test for this as well!

@ashm-dev
Copy link
Contributor Author

I tried to see if we could make a custom rule for ruff to prevent this issue from coming back in the future but it seems ruff does not currently support custom rules. :(

I was wondering also if a linter rule might be too general and we might have cases where we don't want this behaviour.

Maybe there is a way to mock the environment in a test. @ashm-dev tagging you in case you have ideas on how we might add a test for this as well!

Unfortunately, I don't have much experience in testing, and unfortunately I don't have any ideas yet)

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:users PR changes affect end users security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants