Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump black from 23.12.1 to 24.3.0 #81

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading