Skip to content

Commit

Permalink
Bump pylint from 3.1.1 to 3.2.0 + fix minor linting issues (#303)
Browse files Browse the repository at this point in the history
* minor linting issues

* Bump pylint from 3.1.1 to 3.2.0 (#301)

Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](pylint-dev/pylint@v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: konstantin <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed May 17, 2024
1 parent 1ff4236 commit 9f380dd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dev_requirements/requirements-linting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# pip-compile-multi
#
astroid==3.1.0
astroid==3.2.1
# via pylint
dill==0.3.8
# via pylint
Expand All @@ -15,7 +15,7 @@ mccabe==0.7.0
# via pylint
platformdirs==4.2.0
# via pylint
pylint==3.1.1
pylint==3.2.0
# via -r dev_requirements/requirements-linting.in
tomlkit==0.12.5
# via pylint
3 changes: 1 addition & 2 deletions src/kohlrahbi/ahbtable/ahbcondtions.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ def parse_conditions_from_string(
# check whether condition was already collected:
existing_text = conditions_dict[edifact_format].get(match[0])
is_condition_key_collected_yet = existing_text is not None
if is_condition_key_collected_yet and existing_text is not None:
key_exits_but_shorter_text = len(text) > len(existing_text)
key_exits_but_shorter_text = existing_text is not None and len(text) > len(existing_text)
if not is_condition_key_collected_yet or key_exits_but_shorter_text:
conditions_dict[edifact_format][match[0]] = text
return conditions_dict
7 changes: 3 additions & 4 deletions src/kohlrahbi/ahbtable/ahbpackagetable.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ def provide_packages(self, edifact_format: EdifactFormat):
# check whether package was already collected:
existing_text = package_dict[edifact_format].get(package)
is_package_key_collected_yet = existing_text is not None
if is_package_key_collected_yet:
key_exits_but_shorter_text = len(package_conditions) > len(
existing_text # type: ignore[arg-type]
) # type: ignore[arg-type]
key_exits_but_shorter_text = existing_text is not None and len(package_conditions) > len(
existing_text
)
if not is_package_key_collected_yet or key_exits_but_shorter_text:
package_dict[edifact_format][package] = package_conditions

Expand Down
1 change: 1 addition & 0 deletions src/kohlrahbi/ahbtable/ahbtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def sanitize(self) -> None:
iterable_ahb_table = peekable(self.table.iterrows())
self.table.reset_index(drop=True, inplace=True)
for _, row in iterable_ahb_table:
# pylint: disable=unpacking-non-sequence # it is a tuple indeed
index_of_next_row, next_row = iterable_ahb_table.peek(
(
0,
Expand Down
2 changes: 1 addition & 1 deletion src/kohlrahbi/unfoldedahb/unfoldedahbtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def from_ahb_table(cls, ahb_table: AhbTable, pruefi: str):
)

if UnfoldedAhb._is_section_name(ahb_row=row):
_, next_row = iterable_ahb_table.peek()
_, next_row = iterable_ahb_table.peek() # pylint: disable=unpacking-non-sequence # it is a tuple indeed
ahb_expression = next_row[pruefi]

if _segment_group_pattern.match(next_row["Segment Gruppe"]):
Expand Down

0 comments on commit 9f380dd

Please sign in to comment.