Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix static-lib check #79

Closed
Abuelodelanada opened this issue Feb 20, 2024 · 0 comments
Closed

fix static-lib check #79

Abuelodelanada opened this issue Feb 20, 2024 · 0 comments

Comments

@Abuelodelanada
Copy link
Contributor

Enhancement Proposal

Our tox -e static-lib check is failing, and that prevents us from merging simple PRs.
We have to fix all these warnings:

$ tox -e static-lib 
static-lib installed: anyio==4.3.0,certifi==2024.2.2,exceptiongroup==1.2.0,h11==0.14.0,httpcore==1.0.3,httpx==0.26.0,idna==3.6,lightkube==0.15.2,lightkube-models==1.29.0.7,nodeenv==1.8.0,ops==2.10.0,pyright==1.1.351,PyYAML==6.0.1,sniffio==1.3.0,typing_extensions==4.9.0,websocket-client==1.7.0
static-lib run-test-pre: PYTHONHASHSEED='797004744'
static-lib run-test: commands[0] | pyright --pythonversion 3.8 /home/ubuntu/repos/observability-libs/lib/charms/observability_libs
/home/ubuntu/repos/observability-libs/lib/charms/observability_libs/v0/kubernetes_compute_resources_patch.py
  /home/ubuntu/repos/observability-libs/lib/charms/observability_libs/v0/kubernetes_compute_resources_patch.py:367:16 - error: No overloads for "equals_canonically" match the provided arguments (reportCallIssue)
  /home/ubuntu/repos/observability-libs/lib/charms/observability_libs/v0/kubernetes_compute_resources_patch.py:367:35 - error: Argument of type "ResourceRequirements | None" cannot be assigned to parameter "first" of type "ResourceRequirements" in function "equals_canonically"
    Type "ResourceRequirements | None" cannot be assigned to type "ResourceRequirements"
      "None" is incompatible with "ResourceRequirements" (reportArgumentType)
  /home/ubuntu/repos/observability-libs/lib/charms/observability_libs/v0/kubernetes_compute_resources_patch.py:400:51 - error: No overloads for "equals_canonically" match the provided arguments (reportCallIssue)
  /home/ubuntu/repos/observability-libs/lib/charms/observability_libs/v0/kubernetes_compute_resources_patch.py:401:28 - error: Argument of type "ResourceRequirements | None" cannot be assigned to parameter "second" of type "ResourceRequirements" in function "equals_canonically"
    Type "ResourceRequirements | None" cannot be assigned to type "ResourceRequirements"
      "None" is incompatible with "ResourceRequirements" (reportArgumentType)
/home/ubuntu/repos/observability-libs/lib/charms/observability_libs/v0/metrics_endpoint_discovery.py
  /home/ubuntu/repos/observability-libs/lib/charms/observability_libs/v0/metrics_endpoint_discovery.py:218:22 - error: No overloads for "__new__" match the provided arguments (reportCallIssue)
  /home/ubuntu/repos/observability-libs/lib/charms/observability_libs/v0/metrics_endpoint_discovery.py:218:60 - error: Argument of type "List[ContainerPort] | None" cannot be assigned to parameter "__iterable" of type "Iterable[_T@filter]" in function "__new__"
    Type "List[ContainerPort] | None" cannot be assigned to type "Iterable[ContainerPort]"
      "None" is incompatible with protocol "Iterable[ContainerPort]"
        "__iter__" is not present (reportArgumentType)
6 errors, 0 warnings, 0 informations 
ERROR: InvocationError for command /home/ubuntu/repos/observability-libs/.tox/static-lib/bin/pyright --pythonversion 3.8 lib/charms/observability_libs (exited with code 1)
__________________________________________________________________ summary ___________________________________________________________________
ERROR:   static-lib: commands failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant