Skip to content

Commit

Permalink
Bump black from 23.12.1 to 24.2.0 (#337)
Browse files Browse the repository at this point in the history
Bumps [black](https://github.com/psf/black) from 23.12.1 to 24.2.0.
<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.2.0</h2>
<h3>Stable style</h3>
<ul>
<li>Fixed a bug where comments where mistakenly removed along with
redundant parentheses
(<a
href="https://redirect.github.com/psf/black/issues/4218">#4218</a>)</li>
</ul>
<h3>Preview style</h3>
<ul>
<li>Move the <code>hug_parens_with_braces_and_square_brackets</code>
feature to the unstable style
due to an outstanding crash and proposed formatting tweaks (<a
href="https://redirect.github.com/psf/black/issues/4198">#4198</a>)</li>
<li>Fixed a bug where base expressions caused inconsistent formatting of
** in tenary
expression (<a
href="https://redirect.github.com/psf/black/issues/4154">#4154</a>)</li>
<li>Checking for newline before adding one on docstring that is almost
at the line limit
(<a
href="https://redirect.github.com/psf/black/issues/4185">#4185</a>)</li>
<li>Remove redundant parentheses in <code>case</code> statement
<code>if</code> guards (<a
href="https://redirect.github.com/psf/black/issues/4214">#4214</a>).</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>Fix issue where <em>Black</em> would ignore input files in the
presence of symlinks (<a
href="https://redirect.github.com/psf/black/issues/4222">#4222</a>)</li>
<li><em>Black</em> now ignores <code>pyproject.toml</code> that is
missing a <code>tool.black</code> section when
discovering project root and configuration. Since <em>Black</em>
continues to use version
control as an indicator of project root, this is expected to primarily
change behavior
for users in a monorepo setup (desirably). If you wish to preserve
previous behavior,
simply add an empty <code>[tool.black]</code> to the previously
discovered <code>pyproject.toml</code>
(<a
href="https://redirect.github.com/psf/black/issues/4204">#4204</a>)</li>
</ul>
<h3>Output</h3>
<ul>
<li>Black will swallow any <code>SyntaxWarning</code>s or
<code>DeprecationWarning</code>s produced by the <code>ast</code>
module when performing equivalence checks (<a
href="https://redirect.github.com/psf/black/issues/4189">#4189</a>)</li>
</ul>
<h3>Integrations</h3>
<ul>
<li>Add a JSONSchema and provide a validate-pyproject entry-point (<a
href="https://redirect.github.com/psf/black/issues/4181">#4181</a>)</li>
</ul>
<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>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</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.2.0</h2>
<h3>Stable style</h3>
<ul>
<li>Fixed a bug where comments where mistakenly removed along with
redundant parentheses
(<a
href="https://redirect.github.com/psf/black/issues/4218">#4218</a>)</li>
</ul>
<h3>Preview style</h3>
<ul>
<li>Move the <code>hug_parens_with_braces_and_square_brackets</code>
feature to the unstable style
due to an outstanding crash and proposed formatting tweaks (<a
href="https://redirect.github.com/psf/black/issues/4198">#4198</a>)</li>
<li>Fixed a bug where base expressions caused inconsistent formatting of
** in tenary
expression (<a
href="https://redirect.github.com/psf/black/issues/4154">#4154</a>)</li>
<li>Checking for newline before adding one on docstring that is almost
at the line limit
(<a
href="https://redirect.github.com/psf/black/issues/4185">#4185</a>)</li>
<li>Remove redundant parentheses in <code>case</code> statement
<code>if</code> guards (<a
href="https://redirect.github.com/psf/black/issues/4214">#4214</a>).</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>Fix issue where <em>Black</em> would ignore input files in the
presence of symlinks (<a
href="https://redirect.github.com/psf/black/issues/4222">#4222</a>)</li>
<li><em>Black</em> now ignores <code>pyproject.toml</code> that is
missing a <code>tool.black</code> section when
discovering project root and configuration. Since <em>Black</em>
continues to use version
control as an indicator of project root, this is expected to primarily
change behavior
for users in a monorepo setup (desirably). If you wish to preserve
previous behavior,
simply add an empty <code>[tool.black]</code> to the previously
discovered <code>pyproject.toml</code>
(<a
href="https://redirect.github.com/psf/black/issues/4204">#4204</a>)</li>
</ul>
<h3>Output</h3>
<ul>
<li>Black will swallow any <code>SyntaxWarning</code>s or
<code>DeprecationWarning</code>s produced by the <code>ast</code>
module when performing equivalence checks (<a
href="https://redirect.github.com/psf/black/issues/4189">#4189</a>)</li>
</ul>
<h3>Integrations</h3>
<ul>
<li>Add a JSONSchema and provide a validate-pyproject entry-point (<a
href="https://redirect.github.com/psf/black/issues/4181">#4181</a>)</li>
</ul>
<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>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/psf/black/commit/6fdf8a4af28071ed1d079c01122b34c5d587207a"><code>6fdf8a4</code></a>
Prepare release 24.2.0 (<a
href="https://redirect.github.com/psf/black/issues/4226">#4226</a>)</li>
<li><a
href="https://github.com/psf/black/commit/8af439407c051d55f3221cc93795d20bd9af49c9"><code>8af4394</code></a>
fix: Don't remove comments along with parens (<a
href="https://redirect.github.com/psf/black/issues/4218">#4218</a>)</li>
<li><a
href="https://github.com/psf/black/commit/35e97769190d8c8fe94d9ea2d70d7d88b22a2642"><code>35e9776</code></a>
Bump pre-commit/action from 3.0.0 to 3.0.1 (<a
href="https://redirect.github.com/psf/black/issues/4225">#4225</a>)</li>
<li><a
href="https://github.com/psf/black/commit/23dfc5b2c3b0694a8c27e58e28439591976aaf94"><code>23dfc5b</code></a>
Fix ignoring input files for symlink reasons (<a
href="https://redirect.github.com/psf/black/issues/4222">#4222</a>)</li>
<li><a
href="https://github.com/psf/black/commit/a20100395cf6179a81289452efad1d8e72b19682"><code>a201003</code></a>
Simplify check for symlinks that resolve outside root (<a
href="https://redirect.github.com/psf/black/issues/4221">#4221</a>)</li>
<li><a
href="https://github.com/psf/black/commit/dab37a6a1117d690d683121edc4d7c8fb8dd75a7"><code>dab37a6</code></a>
Remove redundant parentheses in <code>case</code> statement
<code>if</code> guards (<a
href="https://redirect.github.com/psf/black/issues/4214">#4214</a>)</li>
<li><a
href="https://github.com/psf/black/commit/32230e6f5c4bc6bb5c469451e15f3f54d9884b51"><code>32230e6</code></a>
fix: bug where the doublestar operation had inconsistent formatting. (<a
href="https://redirect.github.com/psf/black/issues/4154">#4154</a>)</li>
<li><a
href="https://github.com/psf/black/commit/7edb50f5a0afc56bb648dc14640ced144366b43a"><code>7edb50f</code></a>
fix: additional newline added to docstring when the previous line length
is l...</li>
<li><a
href="https://github.com/psf/black/commit/3e80de3447dee272e9977ab58b1560a669b7b848"><code>3e80de3</code></a>
Bump furo from 2023.9.10 to 2024.1.29 in /docs (<a
href="https://redirect.github.com/psf/black/issues/4211">#4211</a>)</li>
<li><a
href="https://github.com/psf/black/commit/a08b480a2f39fb4fc7b210d8b450e33d3879f77d"><code>a08b480</code></a>
Bump pypa/cibuildwheel from 2.16.4 to 2.16.5 (<a
href="https://redirect.github.com/psf/black/issues/4212">#4212</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/psf/black/compare/23.12.1...24.2.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=black&package-manager=pip&previous-version=23.12.1&new-version=24.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shaîhh <[email protected]>
  • Loading branch information
dependabot[bot] and guillaumetavernier authored Feb 16, 2024
1 parent 4c926dd commit 1b3f680
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 16 deletions.
8 changes: 4 additions & 4 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@ async def logging_middleware(
client_address = "unknown"

settings: Settings = app.dependency_overrides.get(get_settings, get_settings)()
redis_client: redis.Redis | Literal[
False
] | None = app.dependency_overrides.get(get_redis_client, get_redis_client)(
settings=settings
redis_client: redis.Redis | Literal[False] | None = (
app.dependency_overrides.get(get_redis_client, get_redis_client)(
settings=settings
)
)

# We test the ip address with the redis limiter
Expand Down
8 changes: 6 additions & 2 deletions app/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ class Settings(BaseSettings):
# PostgreSQL configuration #
############################
# PostgreSQL configuration is needed to use the database
SQLITE_DB: str | None = None # If set, the application use a SQLite database instead of PostgreSQL, for testing or development purposes (should not be used if possible)
SQLITE_DB: str | None = (
None # If set, the application use a SQLite database instead of PostgreSQL, for testing or development purposes (should not be used if possible)
)
POSTGRES_HOST: str
POSTGRES_USER: str
POSTGRES_PASSWORD: str
Expand All @@ -87,7 +89,9 @@ class Settings(BaseSettings):
LOG_DEBUG_MESSAGES: bool | None
# Hyperion follows Semantic Versioning
# https://semver.org/
HYPERION_VERSION: str = "1.0.0" # This value should never be modified by hand. See [Hyperion release] documentation
HYPERION_VERSION: str = (
"1.0.0" # This value should never be modified by hand. See [Hyperion release] documentation
)
MINIMAL_TITAN_VERSION_CODE: int = 100
# Depreciated, minimal_titan_version_code should be used
MINIMAL_TITAN_VERSION: str = "0.0.1"
Expand Down
4 changes: 3 additions & 1 deletion app/core/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class console_color:
+ "%(message)s"
+ console_color.END
)
MATRIX_LOG_FORMAT: str = "%(asctime)s - %(name)s - <code>%(levelname)s</code> - <font color ='green'>%(message)s</font>"
MATRIX_LOG_FORMAT: str = (
"%(asctime)s - %(name)s - <code>%(levelname)s</code> - <font color ='green'>%(message)s</font>"
)

# Logging config
# See https://docs.python.org/3/library/logging.config.html#logging-config-dictschema
Expand Down
1 change: 0 additions & 1 deletion app/cruds/cruds_amap.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""File defining the functions called by the endpoints, making queries to the table using the models"""


import logging
from datetime import date
from typing import Sequence
Expand Down
1 change: 1 addition & 0 deletions app/database.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""File defining the Metadata."""

from sqlalchemy.orm import DeclarativeBase


Expand Down
14 changes: 9 additions & 5 deletions app/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ async def get_users(db: AsyncSession = Depends(get_db)):
hyperion_access_logger = logging.getLogger("hyperion.access")
hyperion_error_logger = logging.getLogger("hyperion.error")

redis_client: redis.Redis | bool | None = None # Create a global variable for the redis client, so that it can be instancied in the startup event
redis_client: redis.Redis | bool | None = (
None # Create a global variable for the redis client, so that it can be instancied in the startup event
)
# Is None if the redis client is not instantiated, is False if the redis client is instancied but not connected, is a redis.Redis object if the redis client is connected

engine: AsyncEngine | None = None # Create a global variable for the database engine, so that it can be instancied in the startup event
SessionLocal: Callable[
[], AsyncSession
] | None = None # Create a global variable for the database session, so that it can be instancied in the startup event
engine: AsyncEngine | None = (
None # Create a global variable for the database engine, so that it can be instancied in the startup event
)
SessionLocal: Callable[[], AsyncSession] | None = (
None # Create a global variable for the database session, so that it can be instancied in the startup event
)


notification_manager: NotificationManager | None = None
Expand Down
1 change: 0 additions & 1 deletion app/endpoints/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Group management is part of the core of Hyperion. These endpoints allow managing membership between users and groups.
"""


import logging
import uuid

Expand Down
1 change: 1 addition & 0 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""File used to start the application. It is used by uvicorn and gunicorn"""

from app.app import get_application
from app.dependencies import get_settings

Expand Down
1 change: 1 addition & 0 deletions app/models/models_amap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Models file for amap"""

from datetime import date, datetime

from sqlalchemy import Date, DateTime, Enum, Float, ForeignKey, Integer, String
Expand Down
1 change: 1 addition & 0 deletions app/models/models_booking.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""model file for booking"""

from datetime import datetime

from sqlalchemy import Boolean, DateTime, ForeignKey, String
Expand Down
1 change: 1 addition & 0 deletions app/models/models_raffle.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Models file for module_tombola"""

from sqlalchemy import Enum, Float, ForeignKey, Integer, String
from sqlalchemy.orm import Mapped, mapped_column, relationship

Expand Down
1 change: 0 additions & 1 deletion app/utils/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
See https://pydantic-docs.helpmanual.io/usage/validators/#reuse-validators
"""


from datetime import datetime

from pytz import timezone
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements.txt
aiosqlite==0.19.0
black==23.12.1
black==24.2.0
flake8==6.1.0
isort[requirements_deprecated_finder]==5.12.0
pep8-naming==0.13.3 # A Flake8 plugin to check code against PEP 8 naming conventions
Expand Down

0 comments on commit 1b3f680

Please sign in to comment.