Skip to content

fix(server): properly detect remote_server URL scheme instead of substring match#217

Merged
mdevolde merged 1 commit into
jxmorris12:masterfrom
mdevolde:fix/parse_url
Jul 3, 2026
Merged

fix(server): properly detect remote_server URL scheme instead of substring match#217
mdevolde merged 1 commit into
jxmorris12:masterfrom
mdevolde:fix/parse_url

Conversation

@mdevolde

@mdevolde mdevolde commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

fix(server): properly detect remote_server URL scheme instead of substring match

Why the pull request was made

To ensure a proper detection of server url, and ensure adding a scheme when it is necessary, and warn users if the scheme is unsecure.

Summary of changes

  • Improve the url parsing in language_tool_python._internals.utils.parse_url.
  • Refuse unsupported schemes in language_tool_python._internals.utils.parse_url.
  • Emit a warning in language_tool_python._internals.utils.parse_url if the unsecure http scheme is added.
  • Add related tests.

Screenshots (if appropriate):

Not applicable.

How has this been tested?

Applied local tests (including new ones).

Resources

Not applicable.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (changes to documentation only)
  • Refactor / code style update (non-breaking change that improves code structure or readability)
  • Tests / CI improvement (adding or updating tests or CI configuration only)
  • Chore / maintenance (non-breaking change that does not affect functionality, such as updating dependencies or fixing typos)
  • Other (please describe):

Checklist

  • Followed the project's contributing guidelines.
  • Updated any relevant tests.
  • Updated any relevant documentation.
  • Added comments to your code where necessary.
  • Formatted your code, run the linters, checked types and tests.
  • Added your changes to the CHANGELOG file, if applicable.

@mdevolde mdevolde requested a review from Copilot July 3, 2026 08:24
@mdevolde mdevolde self-assigned this Jul 3, 2026

This comment was marked as off-topic.

@codecov-commenter

codecov-commenter commented Jul 3, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (746b41d) to head (310e7f7).
⚠️ Report is 1 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #217   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines         1713      1740   +27     
=========================================
+ Hits          1713      1740   +27     

☔ View full report in Codecov by Harness.
📢 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.

@mdevolde mdevolde force-pushed the fix/parse_url branch 2 times, most recently from 13ba349 to 9486a47 Compare July 3, 2026 09:44
@mdevolde mdevolde merged commit 106a6f2 into jxmorris12:master Jul 3, 2026
12 checks passed
@mdevolde mdevolde deleted the fix/parse_url branch July 3, 2026 09:51
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.

3 participants