Skip to content

Commit

Permalink
chore(deps): update black[jupyter] requirement from ~=23.12 to ~=24.3 (
Browse files Browse the repository at this point in the history
…#218)

Updates the requirements on [black[jupyter]](https://github.com/psf/black) to permit the latest version.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@23.12.0...24.3.0)

---
updated-dependencies:
- dependency-name: black[jupyter]
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Daniel Neilson <53624638+ddneilson@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored Mar 26, 2024
1 parent 8d9b7c6 commit fb3362d
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 44 deletions.
2 changes: 1 addition & 1 deletion requirements-testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pytest ~= 8.1
pytest-cov == 4.1.*
pytest-timeout == 2.3.*
pytest-xdist == 3.5.*
black[jupyter] ~= 23.12
black[jupyter] ~= 24.3
rich == 13.7.*
types-python-dateutil ~= 2.9
mypy ~= 1.9
Expand Down
6 changes: 3 additions & 3 deletions src/deadline_worker_agent/session_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class LoggingAllowList(TypedDict, total=False):
"res_log_body": {
"credentials": {
"accessKeyId": True, # Not a secret
"expiration": True
"expiration": True,
# exclude: secretAccessKey & sessionToken
}
},
Expand All @@ -61,7 +61,7 @@ class LoggingAllowList(TypedDict, total=False):
"res_log_body": {
"credentials": {
"accessKeyId": True, # Not a secret
"expiration": True
"expiration": True,
# exclude: secretAccessKey & sessionToken
}
},
Expand Down Expand Up @@ -183,7 +183,7 @@ class LoggingAllowList(TypedDict, total=False):
"ARN": True,
"CreatedDate": True,
"Name": True,
"VersionId": True
"VersionId": True,
# excluding: SecretString/SecretBinary, for obvious reasons
# excluding VersionStages; seems unnecessary
},
Expand Down
18 changes: 9 additions & 9 deletions src/deadline_worker_agent/startup/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def __init__(
if parsed_cli_args.fleet_id is not None:
settings_kwargs["fleet_id"] = parsed_cli_args.fleet_id
if parsed_cli_args.cleanup_session_user_processes is not None:
settings_kwargs[
"cleanup_session_user_processes"
] = parsed_cli_args.cleanup_session_user_processes
settings_kwargs["cleanup_session_user_processes"] = (
parsed_cli_args.cleanup_session_user_processes
)
if parsed_cli_args.profile is not None:
settings_kwargs["profile"] = parsed_cli_args.profile
if parsed_cli_args.verbose is not None:
Expand All @@ -128,9 +128,9 @@ def __init__(
if parsed_cli_args.posix_job_user is not None:
settings_kwargs["posix_job_user"] = parsed_cli_args.posix_job_user
if parsed_cli_args.disallow_instance_profile is not None:
settings_kwargs[
"allow_instance_profile"
] = not parsed_cli_args.disallow_instance_profile
settings_kwargs["allow_instance_profile"] = (
not parsed_cli_args.disallow_instance_profile
)
if parsed_cli_args.logs_dir is not None:
settings_kwargs["worker_logs_dir"] = parsed_cli_args.logs_dir.absolute()
if parsed_cli_args.persistence_dir is not None:
Expand All @@ -140,9 +140,9 @@ def __init__(
if parsed_cli_args.host_metrics_logging is not None:
settings_kwargs["host_metrics_logging"] = parsed_cli_args.host_metrics_logging
if parsed_cli_args.host_metrics_logging_interval_seconds is not None:
settings_kwargs[
"host_metrics_logging_interval_seconds"
] = parsed_cli_args.host_metrics_logging_interval_seconds
settings_kwargs["host_metrics_logging_interval_seconds"] = (
parsed_cli_args.host_metrics_logging_interval_seconds
)
if parsed_cli_args.retain_session_dir is not None:
settings_kwargs["retain_session_dir"] = parsed_cli_args.retain_session_dir
if parsed_cli_args.structured_logs is not None:
Expand Down
6 changes: 3 additions & 3 deletions src/deadline_worker_agent/startup/config_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ def as_settings(
if self.logging.host_metrics_logging is not None:
output_settings["host_metrics_logging"] = self.logging.host_metrics_logging
if self.logging.host_metrics_logging_interval_seconds is not None:
output_settings[
"host_metrics_logging_interval_seconds"
] = self.logging.host_metrics_logging_interval_seconds
output_settings["host_metrics_logging_interval_seconds"] = (
self.logging.host_metrics_logging_interval_seconds
)
if self.logging.structured_logs is not None:
output_settings["structured_logs"] = self.logging.structured_logs
if self.os.shutdown_on_stop is not None:
Expand Down
3 changes: 1 addition & 2 deletions src/deadline_worker_agent/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@


class WorkerSessionCollection:
def __init__(self, *, worker: Worker) -> None:
...
def __init__(self, *, worker: Worker) -> None: ...

def __getitem__(self, session_id: str) -> Session:
raise NotImplementedError()
Expand Down
6 changes: 3 additions & 3 deletions test/unit/aws_credentials/test_queue_boto3_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,9 @@ def test_success(
mock_os_open.assert_called_once_with(
path=str(credentials_process_script_path),
flags=os.O_WRONLY | os.O_CREAT | os.O_TRUNC,
mode=(stat.S_IRWXU)
if os_user is None
else (stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP),
mode=(
(stat.S_IRWXU) if os_user is None else (stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP)
),
)
descriptor = mock_os_open.return_value
mock_builtins_open.assert_called_once_with(descriptor, mode="w", encoding="utf-8")
Expand Down
8 changes: 2 additions & 6 deletions test/unit/install/test_windows_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,9 +626,7 @@ def test_success(
"ResetPeriod": 1200,
"RebootMsg": None,
"Command": None,
"Actions": [
(mock_win32_service.SC_ACTION_RESTART, 2000 * 2**i) for i in range(8)
],
"Actions": [(mock_win32_service.SC_ACTION_RESTART, 2000 * 2**i) for i in range(8)],
},
)
mock_close_service_handle.assert_has_calls(
Expand Down Expand Up @@ -765,9 +763,7 @@ def when() -> None:
"ResetPeriod": 1200,
"RebootMsg": None,
"Command": None,
"Actions": [
(mock_win32_service.SC_ACTION_RESTART, 2000 * 2**i) for i in range(8)
],
"Actions": [(mock_win32_service.SC_ACTION_RESTART, 2000 * 2**i) for i in range(8)],
},
)
mock_close_service_handle.assert_has_calls(
Expand Down
20 changes: 12 additions & 8 deletions test/unit/scheduler/test_session_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,12 @@ def test(
)
def test_handle_job_entity_error_on_dequeue(
self,
queue_entry: EnvironmentQueueEntry
| TaskRunQueueEntry
| SyncInputJobAttachmentsQueueEntry
| SyncInputJobAttachmentsStepDependenciesQueueEntry,
queue_entry: (
EnvironmentQueueEntry
| TaskRunQueueEntry
| SyncInputJobAttachmentsQueueEntry
| SyncInputJobAttachmentsStepDependenciesQueueEntry
),
error_type: type[Exception],
session_queue: SessionActionQueue,
) -> None:
Expand Down Expand Up @@ -327,10 +329,12 @@ def test_handle_job_entity_error_on_dequeue(
)
def test_handle_unsupported_schema_on_dequeue(
self,
queue_entry: EnvironmentQueueEntry
| TaskRunQueueEntry
| SyncInputJobAttachmentsQueueEntry
| SyncInputJobAttachmentsStepDependenciesQueueEntry,
queue_entry: (
EnvironmentQueueEntry
| TaskRunQueueEntry
| SyncInputJobAttachmentsQueueEntry
| SyncInputJobAttachmentsStepDependenciesQueueEntry
),
session_queue: SessionActionQueue,
) -> None:
# GIVEN
Expand Down
6 changes: 3 additions & 3 deletions test/unit/startup/test_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ def test_load_file_exists(
"cloudwatch_log_stream": cloudwatch_log_stream,
}
if cloudwatch_log_stream_sequence_token:
json_load_result[
"cloudwatch_log_stream_sequence_token"
] = cloudwatch_log_stream_sequence_token
json_load_result["cloudwatch_log_stream_sequence_token"] = (
cloudwatch_log_stream_sequence_token
)
with config.worker_state_file.open("w") as fh:
json.dump(json_load_result, fh)

Expand Down
16 changes: 10 additions & 6 deletions test/unit/startup/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,22 @@ class FieldTestCaseParams(NamedTuple):
field_name="worker_logs_dir",
expected_type=Path,
expected_required=False,
expected_default=Path("/var/log/amazon/deadline")
if os.name == "posix"
else Path(os.path.expandvars(r"%PROGRAMDATA%/Amazon/Deadline/Logs")),
expected_default=(
Path("/var/log/amazon/deadline")
if os.name == "posix"
else Path(os.path.expandvars(r"%PROGRAMDATA%/Amazon/Deadline/Logs"))
),
expected_default_factory_return_value=None,
),
FieldTestCaseParams(
field_name="worker_persistence_dir",
expected_type=Path,
expected_required=False,
expected_default=Path("/var/lib/deadline")
if os.name == "posix"
else Path(os.path.expandvars(r"%PROGRAMDATA%/Amazon/Deadline/Cache")),
expected_default=(
Path("/var/lib/deadline")
if os.name == "posix"
else Path(os.path.expandvars(r"%PROGRAMDATA%/Amazon/Deadline/Cache"))
),
expected_default_factory_return_value=None,
),
FieldTestCaseParams(
Expand Down

0 comments on commit fb3362d

Please sign in to comment.