Skip to content

Commit

Permalink
Make flake8 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoPrevato committed Dec 28, 2023
1 parent 3dddf74 commit d36fb6c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
exclude = __pycache__,built,build,venv
exclude = __pycache__,built,build,venv,venv312,dist
ignore = E203, E266, W503
max-line-length = 88
max-complexity = 18
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.4] - 2023-12-28 :snowman_with_snow:
- Improve the library to deep-merge dictionaries of values instead of replacing
- Improves the library to deep-merge dictionaries of values instead of replacing
objects entirely (fix [#10](https://github.com/Neoteroi/essentials-configuration/issues/10)), by @StummeJ.
- Add Python 3.12 to the build matrix.
- Adds Python 3.12 to the build matrix, upgrades dev dependencies and fix tests
to support Python 3.12.

## [2.0.3] - 2023-04-15 :crown:
- Adopts `Rich`, through `rich-click` for the project CLI.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ check-flake8:

check-isort:
@echo "$(BOLD)Checking isort$(RESET)"
@isort --check-only . 2>&1
@isort --check-only config 2>&1


check-black:
Expand Down
6 changes: 3 additions & 3 deletions config/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def apply_key_value(obj: Mapping[str, Any], key: str, value: Any) -> Mapping[str
sub_property, abc.MutableSequence
):
raise ConfigurationOverrideError(
f"The key `{key}` cannot be used "
f"The key '{key}' cannot be used "
f"because it overrides another "
f"variable with shorter key! ({part}, {sub_property})"
)
Expand All @@ -67,7 +67,7 @@ def apply_key_value(obj: Mapping[str, Any], key: str, value: Any) -> Mapping[str
sub_property[index] = merger.merge(sub_property[index], value)
except IndexError:
raise ConfigurationOverrideError(
f"Invalid override for mutable sequence {key}; "
f"Invalid override for mutable sequence {key}, "
f"assignment index out of range"
)
else:
Expand All @@ -81,7 +81,7 @@ def apply_key_value(obj: Mapping[str, Any], key: str, value: Any) -> Mapping[str
sub_property[last_part] = value
except TypeError as type_error:
raise ConfigurationOverrideError(
f"Invalid assignment {key} -> {value}; {str(type_error)}"
f"Invalid assignment {key} -> {value}, {str(type_error)}"
)

return obj
Expand Down

0 comments on commit d36fb6c

Please sign in to comment.