Skip to content

Commit

Permalink
Bump black from 23.12.1 to 24.1.1 (#370)
Browse files Browse the repository at this point in the history
* Bump black from 23.12.1 to 24.1.1

Bumps [black](https://github.com/psf/black) from 23.12.1 to 24.1.1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@23.12.1...24.1.1)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* black 2024

* format test

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: konstantin <[email protected]>
  • Loading branch information
dependabot[bot] and hf-kklein authored Jan 30, 2024
1 parent 9976e2d commit 0aa013f
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dev_requirements/requirements-formatting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile requirements-formatting.in
#
black==23.12.1
black==24.1.1
# via -r dev_requirements/requirements-formatting.in
click==8.1.7
# via black
Expand Down
1 change: 1 addition & 0 deletions src/maus/cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
the maus cli tool
"""

import json
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions src/maus/division_helper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
division helper is a module that allow to distinguish electricity ("Strom") and gas ("Gas")
"""

from enum import Enum
from typing import Optional

Expand Down
1 change: 1 addition & 0 deletions src/maus/edifact.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This module manages EDIFACT related stuff. It's basically a helper module to avoid stringly typed parameters.
"""

import datetime
import re
from enum import Enum
Expand Down
1 change: 1 addition & 0 deletions src/maus/mig_ahb_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
MAUS is the MIG AHB Utility stack.
This module contains methods to merge data from Message Implementation Guide and Anwendungshandbuch
"""

from itertools import groupby
from typing import List, Optional, Sequence, Set, Tuple

Expand Down
13 changes: 5 additions & 8 deletions src/maus/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
I.e. it allows to loop over an Anwendungshandbuch and "remember" which turns we took in the MIG structure (each turn is
a AhbLocationLayer) in order to arrive at a certain line of the AHB. This information is stored in an AhbLocation.
"""

import sys
from enum import Enum
from typing import Callable, List, Optional, Tuple, TypeVar, Union, overload
Expand Down Expand Up @@ -249,27 +250,23 @@ class _PseudoAhbLocation(AhbLocation):


@overload
def find_common_ancestor(location_x: _PseudoAhbLocation, location_y: _PseudoAhbLocation) -> _PseudoAhbLocation:
...
def find_common_ancestor(location_x: _PseudoAhbLocation, location_y: _PseudoAhbLocation) -> _PseudoAhbLocation: ...


@overload
def find_common_ancestor(
location_x: _PseudoAhbLocation, location_y: Union[AhbLocation, _PseudoAhbLocation]
) -> _PseudoAhbLocation:
...
) -> _PseudoAhbLocation: ...


@overload
def find_common_ancestor(
location_x: Union[AhbLocation, _PseudoAhbLocation], location_y: _PseudoAhbLocation
) -> _PseudoAhbLocation:
...
) -> _PseudoAhbLocation: ...


@overload
def find_common_ancestor(location_x: AhbLocation, location_y: AhbLocation) -> AhbLocation:
...
def find_common_ancestor(location_x: AhbLocation, location_y: AhbLocation) -> AhbLocation: ...


def find_common_ancestor(
Expand Down
1 change: 1 addition & 0 deletions src/maus/reader/ahb_location_xml.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
module that (de)serializes AhbLocations to/from XML
"""

from typing import List, Union

import attrs
Expand Down
1 change: 1 addition & 0 deletions src/maus/reader/etree_element_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This module contains (static) functions that process single lxml.etree Elements.
Each function is separately unit tested.
"""

import re
from typing import List, Literal, Optional

Expand Down
7 changes: 3 additions & 4 deletions src/maus/reader/flat_ahb_reader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A module that reads AHBs from a given CSV file
"""

import csv
import logging
import re
Expand Down Expand Up @@ -273,13 +274,11 @@ def to_flat_ahb(self) -> FlatAnwendungshandbuch:


@overload
def _replace_hardcoded_section_names(section_name: str) -> str:
...
def _replace_hardcoded_section_names(section_name: str) -> str: ...


@overload
def _replace_hardcoded_section_names(section_name: Literal[None]) -> Literal[None]:
...
def _replace_hardcoded_section_names(section_name: Literal[None]) -> Literal[None]: ...


def _replace_hardcoded_section_names(section_name: Optional[str]) -> Optional[str]:
Expand Down
7 changes: 3 additions & 4 deletions src/maus/reader/mig_ahb_name_helpers.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
"""
This module contains helper methods that compare strings, especially names from AHB and MIG.
"""

from typing import Literal, Optional, overload

from lxml import etree # type:ignore[import]


@overload
def make_name_comparable(orig_str: str) -> str:
...
def make_name_comparable(orig_str: str) -> str: ...


@overload
def make_name_comparable(orig_str: Literal[None]) -> Literal[None]:
...
def make_name_comparable(orig_str: Literal[None]) -> Literal[None]: ...


def make_name_comparable(orig_str: Optional[str]) -> Optional[str]:
Expand Down
1 change: 1 addition & 0 deletions src/maus/reader/mig_reader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Classes that allow to read XML files that contain structural information (Message Implementation Guide information)
"""

from abc import ABC, abstractmethod

from maus.models.edifact_components import EdifactStack
Expand Down
1 change: 1 addition & 0 deletions src/maus/reader/mig_xml_reader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
contains the MigXmlReader - a MIG Reader that is based on XML MIGs (and therefore requires lxml)
"""

import re
from pathlib import Path
from typing import List, Set, TypeVar, Union
Expand Down
1 change: 1 addition & 0 deletions src/maus/reader/tree_to_sgh.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A module to parse Hochfrequenz .tree files and return them as Segment Group Hierarchy
"""

from pathlib import Path
from typing import Union

Expand Down
1 change: 1 addition & 0 deletions src/maus/transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
This module contains methods that are relevant when transforming data between your edi-similar structure ("EdiSeed")
and the application domain ("non-edifact").
"""

import asyncio
from typing import Any, Awaitable, Dict, List, Mapping, Optional, Protocol, TypeVar

Expand Down
1 change: 1 addition & 0 deletions tests/unit_tests/example_data_11042.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
example AHB data for 11042 as of 2021-10-01
"""

from uuid import UUID

from maus.models.anwendungshandbuch import AhbLine, AhbMetaInformation, FlatAnwendungshandbuch
Expand Down
1 change: 1 addition & 0 deletions tests/unit_tests/test_maus_provider.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test the maus provider as a concept and the file based maus provider as an implementation.
"""

import json
from pathlib import Path

Expand Down

0 comments on commit 0aa013f

Please sign in to comment.