Skip to content

Commit

Permalink
chore(deps-dev): bump flake8-bugbear from 22.1.11 to 22.4.25 (#1156)
Browse files Browse the repository at this point in the history
* chore(deps-dev): bump flake8-bugbear from 22.1.11 to 22.4.25

Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 22.1.11 to 22.4.25.
- [Release notes](https://github.com/PyCQA/flake8-bugbear/releases)
- [Commits](PyCQA/flake8-bugbear@22.1.11...22.4.25)

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

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

* fix: change static_pk_value to optional and default of None

Flake correctly pointed out that using a dyanmic string will cause issues in an arg.

The arg was changed to `Optional[str] = None` instead and a check for `None` is now done,
if set to `None`, the old value is used: `idempotency<NAME>` is used, where name is from a env var

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Simon Thulbourn <[email protected]>
  • Loading branch information
dependabot[bot] and sthulb authored Apr 28, 2022
1 parent 4ff4f54 commit c92bde6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(
self,
table_name: str,
key_attr: str = "id",
static_pk_value: str = f"idempotency#{os.getenv(constants.LAMBDA_FUNCTION_NAME_ENV, '')}",
static_pk_value: Optional[str] = None,
sort_key_attr: Optional[str] = None,
expiry_attr: str = "expiration",
status_attr: str = "status",
Expand Down Expand Up @@ -76,6 +76,9 @@ def __init__(
if sort_key_attr == key_attr:
raise ValueError(f"key_attr [{key_attr}] and sort_key_attr [{sort_key_attr}] cannot be the same!")

if static_pk_value is None:
static_pk_value = f"idempotency#{os.getenv(constants.LAMBDA_FUNCTION_NAME_ENV, '')}"

self._table = None
self.table_name = table_name
self.key_attr = key_attr
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ bandit = "^1.7.1"
radon = "^5.1.0"
xenon = "^0.9.0"
flake8-eradicate = "^1.2.1"
flake8-bugbear = "^22.1.11"
flake8-bugbear = "^22.4.25"
mkdocs-git-revision-date-plugin = "^0.3.2"
mike = "^0.6.0"
mypy = "^0.950"
Expand Down

0 comments on commit c92bde6

Please sign in to comment.