Skip to content

Conversation

@bollwyvl
Copy link
Contributor

Thanks for this package, and congratulations on 0.17.6!

Noted on conda-forge/packageurl-python-feedstock#40, this minor typing nitpick to allowed_qualifiers should allow e.g. mypy to pass.

the current mypy findings...
 packageurl/validate.py:53: error: Incompatible types in assignment (expression has type "set[str]", variable has type "dict[Any, Any]")  [assignment]
 packageurl/validate.py:230: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:244: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:258: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:272: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:286: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:300: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:314: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:328: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:342: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:356: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:389: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:403: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:417: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:431: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:445: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:459: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:473: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:487: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:515: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:529: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:543: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:557: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:571: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:585: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:599: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:613: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:627: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:661: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:689: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:703: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:717: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]
 packageurl/validate.py:731: error: Incompatible types in assignment (expression has type "set[str]", base class "BasePurlType" defined the type as "dict[Any, Any]")  [assignment]

@bollwyvl bollwyvl marked this pull request as ready for review November 24, 2025 15:43
@TG1999
Copy link
Collaborator

TG1999 commented Nov 24, 2025

@bollwyvl thanks for the PR, CI is failing. Please check. Thanks!

@bollwyvl
Copy link
Contributor Author

Updated with legacy typing.Set.

@TG1999
Copy link
Collaborator

TG1999 commented Nov 24, 2025

CI fails, check please https://github.com/package-url/packageurl-python/actions/runs/19640491246/job/56242359760?pr=213. Thanks for a quick turnaround.

@bollwyvl
Copy link
Contributor Author

isorted 😊

TG1999
TG1999 previously approved these changes Nov 24, 2025
Copy link
Collaborator

@TG1999 TG1999 left a comment

Choose a reason for hiding this comment

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

LGTM!

@TG1999
Copy link
Collaborator

TG1999 commented Nov 24, 2025

@bollwyvl can you please add a changelog entry for same?

@bollwyvl
Copy link
Contributor Author

Added changelog entry.

Some observations as a drive-by contributor, it would be lovely if:

  • there was a pull request template
  • the --diff settings in the CI linters told the whole story
    • maybe go to the all-in-one ruff (vs black + isort) which is a good deal simpler to reason about
  • the mypy settings caught more things: files = src/packageurl/__init__.py isn't really finding the things a downstream would hit with the equivalent of mypy -p packageurl when used as a dependency

@TG1999 TG1999 merged commit a13141e into package-url:main Nov 24, 2025
19 checks passed
@TG1999
Copy link
Collaborator

TG1999 commented Nov 24, 2025

Added changelog entry.

Some observations as a drive-by contributor, it would be lovely if:

  • there was a pull request template

  • the --diff settings in the CI linters told the whole story

    • maybe go to the all-in-one ruff (vs black + isort) which is a good deal simpler to reason about
  • the mypy settings caught more things: files = src/packageurl/__init__.py isn't really finding the things a downstream would hit with the equivalent of mypy -p packageurl when used as a dependency

@bollwyvl sure, I am opening a follow-up issue on this.

@bollwyvl
Copy link
Contributor Author

Thanks!

@bollwyvl bollwyvl deleted the patch-1 branch November 24, 2025 17:21
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