Skip to content

Clean websocket tokens before using#204

Merged
GrandMoff100 merged 1 commit intodevfrom
clean-tokens-2
Mar 27, 2025
Merged

Clean websocket tokens before using#204
GrandMoff100 merged 1 commit intodevfrom
clean-tokens-2

Conversation

@GrandMoff100
Copy link
Owner

No description provided.

Copy link

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 pull request ensures that the WebSocket token is cleaned before use to avoid potential issues with extraneous whitespace.

  • Clean token by applying strip()
  • A single-line change in the WebSocket initialization
Comments suppressed due to low confidence (1)

homeassistant_api/rawwebsocket.py:39

  • [nitpick] Removing leading and trailing spaces using strip() is a good practice, but verify that this operation does not remove any whitespace that might be significant. If token formatting requirements change, consider adding validation or further sanitization.
self.token = token.strip()

@codecov
Copy link

codecov bot commented Mar 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.24%. Comparing base (e3df3b1) to head (6e6240a).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #204   +/-   ##
=======================================
  Coverage   97.24%   97.24%           
=======================================
  Files          25       25           
  Lines        1343     1343           
=======================================
  Hits         1306     1306           
  Misses         37       37           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GrandMoff100 GrandMoff100 merged commit 4a5873b into dev Mar 27, 2025
7 checks passed
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.

2 participants