Skip to content

Commit

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

Bumps [black](https://github.com/psf/black) from 23.12.1 to 24.3.0.
- [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.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

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

* dependabot/pip/black 24.3.0

* dependabot/pip/black 24.3.0

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ben Rometsch <[email protected]>
  • Loading branch information
dependabot[bot] and dabeeeenster authored Mar 26, 2024
1 parent 069373f commit c187ef3
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 24.3.0
hooks:
- id: black
language_version: python3
Expand Down
14 changes: 7 additions & 7 deletions flagsmith/flagsmith.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ def _get_identity_flags_from_document(

def _get_environment_flags_from_api(self) -> Flags:
try:
json_response: typing.List[
typing.Mapping[str, JsonType]
] = self._get_json_response(url=self.environment_flags_url, method="GET")
json_response: typing.List[typing.Mapping[str, JsonType]] = (
self._get_json_response(url=self.environment_flags_url, method="GET")
)
return Flags.from_api_flags(
api_flags=json_response,
analytics_processor=self._analytics_processor,
Expand All @@ -344,10 +344,10 @@ def _get_identity_flags_from_api(
) -> Flags:
try:
data = generate_identities_data(identifier, traits)
json_response: typing.Dict[
str, typing.List[typing.Dict[str, JsonType]]
] = self._get_json_response(
url=self.identities_url, method="POST", body=data
json_response: typing.Dict[str, typing.List[typing.Dict[str, JsonType]]] = (
self._get_json_response(
url=self.identities_url, method="POST", body=data
)
)
return Flags.from_api_flags(
api_flags=json_response["flags"],
Expand Down
8 changes: 5 additions & 3 deletions flagsmith/utils/identities.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def generate_identities_data(
) -> Identity:
return {
"identifier": identifier,
"traits": [{"trait_key": k, "trait_value": v} for k, v in traits.items()]
if traits
else [],
"traits": (
[{"trait_key": k, "trait_value": v} for k, v in traits.items()]
if traits
else []
),
}
61 changes: 36 additions & 25 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 @@ -23,7 +23,7 @@ optional = true
[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
pytest-mock = "^3.6.1"
black = "^23.3.0"
black = ">=23.3,<25.0"
pre-commit = "^2.17.0"
responses = "^0.24.1"
flake8 = "^6.1.0"
Expand Down

0 comments on commit c187ef3

Please sign in to comment.