Skip to content

Commit

Permalink
chore(deps): Update black requirement from ~=23.12 to ~=24.1 in /pack…
Browse files Browse the repository at this point in the history
…ages/@jsii/python-runtime (#4410)

Updates the requirements on [black](https://github.com/psf/black) to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/psf/black/releases">black's releases</a>.</em></p>
<blockquote>
<h2>24.1.1</h2>
<p>Bugfix release to fix a bug that made Black unusable on certain file systems
with strict limits on path length.</p>
<h3>Preview style</h3>
<ul>
<li>Consistently add trailing comma on typed parameters (<a href="https://redirect.github.com/psf/black/issues/4164">#4164</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>Shorten the length of the name of the cache file to fix crashes on file systems that
do not support long paths (<a href="https://redirect.github.com/psf/black/issues/4176">#4176</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/psf/black/blob/main/CHANGES.md">black's changelog</a>.</em></p>
<blockquote>
<h2>24.1.1</h2>
<p>Bugfix release to fix a bug that made Black unusable on certain file systems with strict
limits on path length.</p>
<h3>Preview style</h3>
<ul>
<li>Consistently add trailing comma on typed parameters (<a href="https://redirect.github.com/psf/black/issues/4164">#4164</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>Shorten the length of the name of the cache file to fix crashes on file systems that
do not support long paths (<a href="https://redirect.github.com/psf/black/issues/4176">#4176</a>)</li>
</ul>
<h2>24.1.0</h2>
<h3>Highlights</h3>
<p>This release introduces the new 2024 stable style (<a href="https://redirect.github.com/psf/black/issues/4106">#4106</a>), stabilizing the following
changes:</p>
<ul>
<li>Add parentheses around <code>if</code>-<code>else</code> expressions (<a href="https://redirect.github.com/psf/black/issues/2278">#2278</a>)</li>
<li>Dummy class and function implementations consisting only of <code>...</code> are formatted more
compactly (<a href="https://redirect.github.com/psf/black/issues/3796">#3796</a>)</li>
<li>If an assignment statement is too long, we now prefer splitting on the right-hand side
(<a href="https://redirect.github.com/psf/black/issues/3368">#3368</a>)</li>
<li>Hex codes in Unicode escape sequences are now standardized to lowercase (<a href="https://redirect.github.com/psf/black/issues/2916">#2916</a>)</li>
<li>Allow empty first lines at the beginning of most blocks (<a href="https://redirect.github.com/psf/black/issues/3967">#3967</a>, <a href="https://redirect.github.com/psf/black/issues/4061">#4061</a>)</li>
<li>Add parentheses around long type annotations (<a href="https://redirect.github.com/psf/black/issues/3899">#3899</a>)</li>
<li>Enforce newline after module docstrings (<a href="https://redirect.github.com/psf/black/issues/3932">#3932</a>, <a href="https://redirect.github.com/psf/black/issues/4028">#4028</a>)</li>
<li>Fix incorrect magic trailing comma handling in return types (<a href="https://redirect.github.com/psf/black/issues/3916">#3916</a>)</li>
<li>Remove blank lines before class docstrings (<a href="https://redirect.github.com/psf/black/issues/3692">#3692</a>)</li>
<li>Wrap multiple context managers in parentheses if combined in a single <code>with</code> statement
(<a href="https://redirect.github.com/psf/black/issues/3489">#3489</a>)</li>
<li>Fix bug in line length calculations for power operations (<a href="https://redirect.github.com/psf/black/issues/3942">#3942</a>)</li>
<li>Add trailing commas to collection literals even if there's a comment after the last
entry (<a href="https://redirect.github.com/psf/black/issues/3393">#3393</a>)</li>
<li>When using <code>--skip-magic-trailing-comma</code> or <code>-C</code>, trailing commas are stripped from
subscript expressions with more than 1 element (<a href="https://redirect.github.com/psf/black/issues/3209">#3209</a>)</li>
<li>Add extra blank lines in stubs in a few cases (<a href="https://redirect.github.com/psf/black/issues/3564">#3564</a>, <a href="https://redirect.github.com/psf/black/issues/3862">#3862</a>)</li>
<li>Accept raw strings as docstrings (<a href="https://redirect.github.com/psf/black/issues/3947">#3947</a>)</li>
<li>Split long lines in case blocks (<a href="https://redirect.github.com/psf/black/issues/4024">#4024</a>)</li>
<li>Stop removing spaces from walrus operators within subscripts (<a href="https://redirect.github.com/psf/black/issues/3823">#3823</a>)</li>
<li>Fix incorrect formatting of certain async statements (<a href="https://redirect.github.com/psf/black/issues/3609">#3609</a>)</li>
<li>Allow combining <code># fmt: skip</code> with other comments (<a href="https://redirect.github.com/psf/black/issues/3959">#3959</a>)</li>
</ul>
<p>There are already a few improvements in the <code>--preview</code> style, which are slated for the
2025 stable style. Try them out and
<a href="https://github.com/psf/black/issues">share your feedback</a>. In the past, the preview
style has included some features that we were not able to stabilize. This year, we're</p>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/psf/black/commit/e026c93888f91a47a9c9f4e029f3eb07d96375e6"><code>e026c93</code></a> Prepare release 24.1.1 (<a href="https://redirect.github.com/psf/black/issues/4186">#4186</a>)</li>
<li><a href="https://github.com/psf/black/commit/79fc1158a98281dac798feb14b8fddb4051e4a42"><code>79fc115</code></a> chore: ignore node_modules (produced by a pre-commit check) (<a href="https://redirect.github.com/psf/black/issues/4184">#4184</a>)</li>
<li><a href="https://github.com/psf/black/commit/8bf04549ffd276a1bad6eb110e66e6557ee630d9"><code>8bf0454</code></a> Consistently add trailing comma on typed parameters (<a href="https://redirect.github.com/psf/black/issues/4164">#4164</a>)</li>
<li><a href="https://github.com/psf/black/commit/1607e9ab20ad550cf940482d0d361ca31fc03189"><code>1607e9a</code></a> Fix missing space in option description (<a href="https://redirect.github.com/psf/black/issues/4182">#4182</a>)</li>
<li><a href="https://github.com/psf/black/commit/ed770ba4dd50c419148a0fca2b43937a7447e1f9"><code>ed770ba</code></a> Fix cache file length (<a href="https://redirect.github.com/psf/black/issues/4176">#4176</a>)</li>
<li><a href="https://github.com/psf/black/commit/659c29a41c7c686687aef21f57b95bcfa236b03b"><code>659c29a</code></a> New changelog</li>
<li><a href="https://github.com/psf/black/commit/0e6e46b9eb45f5a22062fe84c2c2ff46bd0d738e"><code>0e6e46b</code></a> Prepare release 24.1.0 (<a href="https://redirect.github.com/psf/black/issues/4170">#4170</a>)</li>
<li><a href="https://github.com/psf/black/commit/4f47cac1925a2232892ceae438e2c62f81517714"><code>4f47cac</code></a> Add --unstable flag (<a href="https://redirect.github.com/psf/black/issues/4096">#4096</a>)</li>
<li><a href="https://github.com/psf/black/commit/bccec8adfbed2bbc24c0859e8758d5e7809d42b7"><code>bccec8a</code></a> Show warning on invalid toml configuration (<a href="https://redirect.github.com/psf/black/issues/4165">#4165</a>)</li>
<li><a href="https://github.com/psf/black/commit/7d789469ed947022f183962b823f5862511272ac"><code>7d78946</code></a> Describe 2024 module docstring more accurately (<a href="https://redirect.github.com/psf/black/issues/4168">#4168</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/psf/black/compare/23.12.0...24.1.1">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
  • Loading branch information
dependabot[bot] authored Feb 19, 2024
1 parent 6aa1408 commit 77042dc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 50 deletions.
2 changes: 1 addition & 1 deletion packages/@jsii/python-runtime/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black~=23.12
black~=24.1
mypy==1.8.0
pip~=24.0
pytest~=8.0
Expand Down
51 changes: 17 additions & 34 deletions packages/@jsii/python-runtime/src/jsii/_kernel/providers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,73 +45,56 @@ class BaseProvider(metaclass=abc.ABCMeta):
# much more Pythonic.

@abc.abstractmethod
def load(self, request: LoadRequest) -> LoadResponse:
...
def load(self, request: LoadRequest) -> LoadResponse: ...

@abc.abstractmethod
def getScriptCommand(
self, request: GetScriptCommandRequest
) -> GetScriptCommandResponse:
...
) -> GetScriptCommandResponse: ...

@abc.abstractmethod
def invokeBinScript(self, request: InvokeScriptRequest) -> InvokeScriptResponse:
...
def invokeBinScript(self, request: InvokeScriptRequest) -> InvokeScriptResponse: ...

@abc.abstractmethod
def create(self, request: CreateRequest) -> CreateResponse:
...
def create(self, request: CreateRequest) -> CreateResponse: ...

@abc.abstractmethod
def get(self, request: GetRequest) -> GetResponse:
...
def get(self, request: GetRequest) -> GetResponse: ...

@abc.abstractmethod
def set(self, request: SetRequest) -> SetResponse:
...
def set(self, request: SetRequest) -> SetResponse: ...

@abc.abstractmethod
def sget(self, request: StaticGetRequest) -> GetResponse:
...
def sget(self, request: StaticGetRequest) -> GetResponse: ...

@abc.abstractmethod
def sset(self, request: StaticSetRequest) -> SetResponse:
...
def sset(self, request: StaticSetRequest) -> SetResponse: ...

@abc.abstractmethod
def invoke(self, request: InvokeRequest) -> Union[InvokeResponse, Callback]:
...
def invoke(self, request: InvokeRequest) -> Union[InvokeResponse, Callback]: ...

@abc.abstractmethod
def sinvoke(self, request: StaticInvokeRequest) -> InvokeResponse:
...
def sinvoke(self, request: StaticInvokeRequest) -> InvokeResponse: ...

@abc.abstractmethod
def complete(self, request: CompleteRequest) -> CompleteResponse:
...
def complete(self, request: CompleteRequest) -> CompleteResponse: ...

@abc.abstractmethod
def sync_complete(
self, request: CompleteRequest, response_type: Type[KernelResponse]
) -> Union[InvokeResponse, GetResponse]:
...
) -> Union[InvokeResponse, GetResponse]: ...

@abc.abstractmethod
def delete(self, request: DeleteRequest) -> DeleteResponse:
...
def delete(self, request: DeleteRequest) -> DeleteResponse: ...

@abc.abstractmethod
def begin(self, request: BeginRequest) -> BeginResponse:
...
def begin(self, request: BeginRequest) -> BeginResponse: ...

@abc.abstractmethod
def end(self, request: EndRequest) -> EndResponse:
...
def end(self, request: EndRequest) -> EndResponse: ...

@abc.abstractmethod
def callbacks(self, request: CallbacksRequest) -> CallbacksResponse:
...
def callbacks(self, request: CallbacksRequest) -> CallbacksResponse: ...

@abc.abstractmethod
def stats(self, request: Optional[StatsRequest] = None) -> StatsResponse:
...
def stats(self, request: Optional[StatsRequest] = None) -> StatsResponse: ...
15 changes: 5 additions & 10 deletions packages/@jsii/python-runtime/src/jsii/_kernel/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ class CreateRequest:


@attr.s(auto_attribs=True, frozen=True, slots=True)
class CreateResponse(ObjRef):
...
class CreateResponse(ObjRef): ...


@attr.s(auto_attribs=True, frozen=True, slots=True)
Expand All @@ -84,8 +83,7 @@ class DeleteRequest:


@attr.s(auto_attribs=True, frozen=True, slots=True)
class DeleteResponse:
...
class DeleteResponse: ...


@attr.s(auto_attribs=True, frozen=True, slots=True)
Expand Down Expand Up @@ -120,8 +118,7 @@ class SetRequest:


@attr.s(auto_attribs=True, frozen=True, slots=True)
class SetResponse:
...
class SetResponse: ...


@attr.s(auto_attribs=True, frozen=True, slots=True)
Expand Down Expand Up @@ -175,8 +172,7 @@ class Callback:


@attr.s(auto_attribs=True, frozen=True, slots=True)
class CallbacksRequest:
...
class CallbacksRequest: ...


@attr.s(auto_attribs=True, frozen=True, slots=True)
Expand Down Expand Up @@ -207,8 +203,7 @@ class NamingResponse:


@attr.s(auto_attribs=True, frozen=True, slots=True)
class StatsRequest:
...
class StatsRequest: ...


@attr.s(auto_attribs=True, frozen=True, slots=True)
Expand Down
3 changes: 1 addition & 2 deletions packages/@jsii/python-runtime/tests/test_compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,8 +1178,7 @@ def return_struct(self):

class IndirectlyImplementsStructReturningDelegate(
ImplementsStructReturningDelegate
):
...
): ...

delegate = IndirectlyImplementsStructReturningDelegate()
consumer = ConsumePureInterface(delegate)
Expand Down
6 changes: 3 additions & 3 deletions packages/@jsii/python-runtime/tests/test_invoke_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def silence_node_deprecation_warnings():
environ[var] = "1"

# silence this for the next decades
environ[
"JSII_SILENCE_WARNING_END_OF_LIFE_NODE_VERSION"
] = "14,16,18,20,22,24,26,28,30,32,34"
environ["JSII_SILENCE_WARNING_END_OF_LIFE_NODE_VERSION"] = (
"14,16,18,20,22,24,26,28,30,32,34"
)

# Execute the test
yield
Expand Down

0 comments on commit 77042dc

Please sign in to comment.