Skip to content

Commit c187ef3

Browse files
Bump black from 23.12.1 to 24.3.0 (#81)
* 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]>
1 parent 069373f commit c187ef3

File tree

5 files changed

+50
-37
lines changed

5 files changed

+50
-37
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
hooks:
1212
- id: isort
1313
- repo: https://github.com/psf/black
14-
rev: 23.7.0
14+
rev: 24.3.0
1515
hooks:
1616
- id: black
1717
language_version: python3

flagsmith/flagsmith.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,9 @@ def _get_identity_flags_from_document(
324324

325325
def _get_environment_flags_from_api(self) -> Flags:
326326
try:
327-
json_response: typing.List[
328-
typing.Mapping[str, JsonType]
329-
] = self._get_json_response(url=self.environment_flags_url, method="GET")
327+
json_response: typing.List[typing.Mapping[str, JsonType]] = (
328+
self._get_json_response(url=self.environment_flags_url, method="GET")
329+
)
330330
return Flags.from_api_flags(
331331
api_flags=json_response,
332332
analytics_processor=self._analytics_processor,
@@ -344,10 +344,10 @@ def _get_identity_flags_from_api(
344344
) -> Flags:
345345
try:
346346
data = generate_identities_data(identifier, traits)
347-
json_response: typing.Dict[
348-
str, typing.List[typing.Dict[str, JsonType]]
349-
] = self._get_json_response(
350-
url=self.identities_url, method="POST", body=data
347+
json_response: typing.Dict[str, typing.List[typing.Dict[str, JsonType]]] = (
348+
self._get_json_response(
349+
url=self.identities_url, method="POST", body=data
350+
)
351351
)
352352
return Flags.from_api_flags(
353353
api_flags=json_response["flags"],

flagsmith/utils/identities.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ def generate_identities_data(
1313
) -> Identity:
1414
return {
1515
"identifier": identifier,
16-
"traits": [{"trait_key": k, "trait_value": v} for k, v in traits.items()]
17-
if traits
18-
else [],
16+
"traits": (
17+
[{"trait_key": k, "trait_value": v} for k, v in traits.items()]
18+
if traits
19+
else []
20+
),
1921
}

poetry.lock

Lines changed: 36 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ optional = true
2323
[tool.poetry.group.dev.dependencies]
2424
pytest = "^7.4.0"
2525
pytest-mock = "^3.6.1"
26-
black = "^23.3.0"
26+
black = ">=23.3,<25.0"
2727
pre-commit = "^2.17.0"
2828
responses = "^0.24.1"
2929
flake8 = "^6.1.0"

0 commit comments

Comments
 (0)