Skip to content

compute_tags keeps empty tags #412

Description

@ahmershahdev

compute_tags() filters out empty tags before stripping whitespace, so whitespace-only values like " " become empty strings ("") instead of being removed.

For example, compute_tags(["wikipedia"], "a; ") returns {"", "a", "wikipedia"}.

This contradicts the docstring, which says empty values are removed. A scraper that passes the result to TagsMetadata (for example from --tags "a; b; ") gets ValueError: Missing value (empty not allowed).

Proposed fix: strip whitespace from each tag before filtering out empty values, and add a test case in tests/inputs/test_inputs.py to cover whitespace-only tags.

Activity

  1. added theissue type on Nov 23, 2026
  2. benoit74 commented on Nov 23, 2026

    @benoit74
    Collaborator

    This is indeed a bug which should be fixed

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions