Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jun 25, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

Summary by Sourcery

Fix query string parsing regression introduced in v2.18.2, unskip related integration tests, and update lint-staged config to include flake8 and black checks

Bug Fixes:

  • Restore correct parsing of query strings to prevent truncation of values containing unencoded '&'

CI:

  • Update lint-staged configuration to run flake8 and black checks for Python source and test files

Documentation:

  • Document the query string parsing fix in the CHANGELOG

Tests:

  • Remove skip/xfail decorators from tests previously disabled due to a werkzeug Transfer-Encoding header issue

@pull pull bot added the ⤵️ pull label Jun 25, 2025
@pull pull bot merged commit 11fbbdf into admariner:dev Jun 25, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented Jun 25, 2025

Reviewer's Guide

This PR fixes a regression in query string parsing within the pages module by simplifying input checks and preserving blank values, expands the lint-staged configuration to include pylint, flake8, and black on both source and test files, removes obsolete skip/xfail decorators addressing a now-resolved Werkzeug transfer-encoding bug across multiple tests, and updates the CHANGELOG with the new fix entry.

File-Level Changes

Change Details Files
Fix regression in query string parsing to handle unencoded '&' and blank values
  • Remove unquote and adjust input guard to startswith("?")
  • Strip leading '?' before parsing
  • Call parse_qs with keep_blank_values=True
  • Flatten single-element lists via dict comprehension
dash/_pages.py
Extend lint-staged configuration for Python files
  • Scope Python checks to dash/*.py and **/tests/**/*.py
  • Add flake8 and black (with --check) alongside pylint
  • Customize pylint flags for test files
.lintstagedrc.js
Remove obsolete skipif/xfail decorators for Werkzeug transfer-encoding bug
  • Delete @pytest.mark.skipif blocks referencing Werkzeug 2.1.0/2.1.1
  • Remove corresponding @pytest.mark.xfail decorators
components/dash-core-components/tests/integration/graph/test_graph_varia.py
components/dash-core-components/tests/integration/store/test_data_lifecycle.py
components/dash-core-components/tests/integration/calendar/test_date_picker_single.py
components/dash-core-components/tests/integration/tab/test_tabs_with_graphs.py
tests/async_tests/test_async_callbacks.py
tests/integration/callbacks/test_basic_callback.py
Update CHANGELOG with new regression fix entry CHANGELOG.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@giga-agent
Copy link

giga-agent bot commented Jun 25, 2025

Giga Summary

• Sync dev branch with upstream plotly:dev
• Impact: Updates the repository to the latest changes from upstream, including bug fixes and dependency updates.
• Changes:

  • Updated linting configuration for Python files.
  • Added and modified test cases to address specific issues and dependencies.
  • Fixed query string parsing regression and other bugs.
    • Focus:
  • Ensure compatibility with the latest upstream changes.
  • Verify that all test cases are correctly updated and passing.

Quality Assessment

• Improved query parsing, refined linting, and simplified tests.
• Dependency updates need validation testing.
• Recommend approval with validation testing for new dependencies.

Quality Score: 8/10 (Threshold: 7/10)

💬 Detailed comments have been added to specific code changes.

Copy link

@giga-agent giga-agent bot left a comment

Choose a reason for hiding this comment

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

Detailed code review comments

query_string = search[1:]

parsed_qs = parse_qs(query_string, keep_blank_values=True)

Copy link

Choose a reason for hiding this comment

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

Good change adding keep_blank_values=True to preserve empty parameters in query string parsing

// Python checks (run from root, using root venv)
"*.py": (filenames) => [
"dash/*.py": (filenames) => [
`${venvBin("python")} -m pylint --rcfile=.pylintrc ${filenames.join(
Copy link

Choose a reason for hiding this comment

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

Improved linting configuration by separating rules for source vs test files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant