Skip to content

Commit

Permalink
Union instead of "|" for Python < 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
why-not-try-calmer committed Jan 9, 2024
1 parent 4ff97bd commit b335937
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions comptages/report/yearly_report_bike.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from decimal import Decimal
import os
from typing import Any

from string import ascii_uppercase
from typing import Any
from typing import Any, Union

from django.db.models import Sum, Avg, Count
from django.db.models.functions import Cast
Expand Down Expand Up @@ -258,7 +256,7 @@ def run(self):

section = Section.objects.get(id=self.section_id)

def render_section_dist(value: str | Decimal | None) -> str:
def render_section_dist(value: Union[str, Decimal, None]) -> str:
if value is None or value == "NA":
return "NA"
if isinstance(value, str):
Expand Down

1 comment on commit b335937

@spch-GL
Copy link
Contributor

@spch-GL spch-GL commented on b335937 Jan 9, 2024

Choose a reason for hiding this comment

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

Un rapport est bien produit mais il ne correspond pas à ce qui est attendu...
64540060_2021_r.xlsx

Peux-tu me fixer un rendez-vous à 14h00 ?

Please sign in to comment.