From 6dea7ff13640641b8dbfbb1995847c727be91a4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 08:12:21 +0000 Subject: [PATCH 1/2] Bump ruff from 0.1.7 to 0.4.9 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.7 to 0.4.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.1.7...v0.4.9) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Pipfile.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index 9349386..b3268b0 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -710,27 +710,27 @@ }, "ruff": { "hashes": [ - "sha256:0683b7bfbb95e6df3c7c04fe9d78f631f8e8ba4868dfc932d43d690698057e2e", - "sha256:1ea109bdb23c2a4413f397ebd8ac32cb498bee234d4191ae1a310af760e5d287", - "sha256:276a89bcb149b3d8c1b11d91aa81898fe698900ed553a08129b38d9d6570e717", - "sha256:290ecab680dce94affebefe0bbca2322a6277e83d4f29234627e0f8f6b4fa9ce", - "sha256:416dfd0bd45d1a2baa3b1b07b1b9758e7d993c256d3e51dc6e03a5e7901c7d80", - "sha256:45b38c3f8788a65e6a2cab02e0f7adfa88872696839d9882c13b7e2f35d64c5f", - "sha256:4af95fd1d3b001fc41325064336db36e3d27d2004cdb6d21fd617d45a172dd96", - "sha256:69a4bed13bc1d5dabf3902522b5a2aadfebe28226c6269694283c3b0cecb45fd", - "sha256:6b05e3b123f93bb4146a761b7a7d57af8cb7384ccb2502d29d736eaade0db519", - "sha256:6c64cb67b2025b1ac6d58e5ffca8f7b3f7fd921f35e78198411237e4f0db8e73", - "sha256:7f80496854fdc65b6659c271d2c26e90d4d401e6a4a31908e7e334fab4645aac", - "sha256:8b0c2de9dd9daf5e07624c24add25c3a490dbf74b0e9bca4145c632457b3b42a", - "sha256:90c958fe950735041f1c80d21b42184f1072cc3975d05e736e8d66fc377119ea", - "sha256:9dcc6bb2f4df59cb5b4b40ff14be7d57012179d69c6565c1da0d1f013d29951b", - "sha256:de02ca331f2143195a712983a57137c5ec0f10acc4aa81f7c1f86519e52b92a1", - "sha256:df2bb4bb6bbe921f6b4f5b6fdd8d8468c940731cb9406f274ae8c5ed7a78c478", - "sha256:dffd699d07abf54833e5f6cc50b85a6ff043715da8788c4a79bcd4ab4734d306" + "sha256:06b60f91bfa5514bb689b500a25ba48e897d18fea14dce14b48a0c40d1635893", + "sha256:0e8e7b95673f22e0efd3571fb5b0cf71a5eaaa3cc8a776584f3b2cc878e46bff", + "sha256:2d45ddc6d82e1190ea737341326ecbc9a61447ba331b0a8962869fcada758505", + "sha256:4555056049d46d8a381f746680db1c46e67ac3b00d714606304077682832998e", + "sha256:5d5460f789ccf4efd43f265a58538a2c24dbce15dbf560676e430375f20a8198", + "sha256:673bddb893f21ab47a8334c8e0ea7fd6598ecc8e698da75bcd12a7b9d0a3206e", + "sha256:732dd550bfa5d85af8c3c6cbc47ba5b67c6aed8a89e2f011b908fc88f87649db", + "sha256:784d3ec9bd6493c3b720a0b76f741e6c2d7d44f6b2be87f5eef1ae8cc1d54c84", + "sha256:78de3fdb95c4af084087628132336772b1c5044f6e710739d440fc0bccf4d321", + "sha256:8064590fd1a50dcf4909c268b0e7c2498253273309ad3d97e4a752bb9df4f521", + "sha256:88bffe9c6a454bf8529f9ab9091c99490578a593cc9f9822b7fc065ee0712a06", + "sha256:8c1aff58c31948cc66d0b22951aa19edb5af0a3af40c936340cd32a8b1ab7438", + "sha256:98ec2775fd2d856dc405635e5ee4ff177920f2141b8e2d9eb5bd6efd50e80317", + "sha256:b262ed08d036ebe162123170b35703aaf9daffecb698cd367a8d585157732991", + "sha256:e0a22c4157e53d006530c902107c7f550b9233e9706313ab57b892d7197d8e52", + "sha256:e91175fbe48f8a2174c9aad70438fe9cb0a5732c4159b2a10a3565fea2d94cde", + "sha256:f1cb0828ac9533ba0135d148d214e284711ede33640465e706772645483427e3" ], "index": "pypi", "markers": "python_version >= '3.7'", - "version": "==0.1.7" + "version": "==0.4.9" }, "tomli": { "hashes": [ From 09b95e7f65d1a5ae981bc700f49e54947d86d7a7 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Tue, 18 Jun 2024 11:53:53 -0400 Subject: [PATCH 2/2] Update ruff config All of the lint related fixes are nested under `lint` in newer versions of the configuration. Also, run `ruff --fix` which removes the `# noqa` comment. --- protovalidate/internal/string_format.py | 2 +- pyproject.toml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/protovalidate/internal/string_format.py b/protovalidate/internal/string_format.py index bed78f5..6604029 100644 --- a/protovalidate/internal/string_format.py +++ b/protovalidate/internal/string_format.py @@ -40,7 +40,7 @@ class StringFormat: def __init__(self, locale: str): self.locale = locale - def format(self, fmt: celtypes.Value, args: celtypes.Value) -> celpy.Result: # noqa: A003 + def format(self, fmt: celtypes.Value, args: celtypes.Value) -> celpy.Result: if not isinstance(fmt, celtypes.StringType): return celpy.native_to_cel(celpy.new_error("format() requires a string as the first argument")) if not isinstance(args, celtypes.ListType): diff --git a/pyproject.toml b/pyproject.toml index 673ab59..c5b97a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ line-length = 120 [tool.ruff] target-version = "py38" line-length = 120 -select = [ +lint.select = [ "A", "ARG", "B", @@ -59,7 +59,7 @@ select = [ "W", "YTT", ] -ignore = [ +lint.ignore = [ # Allow boolean positional values in function calls, like `dict.get(..., True)`. "FBT003", # Ignore complexity @@ -71,17 +71,17 @@ ignore = [ # Ignore magic values - in this library, most are obvious in context. "PLR2004", ] -unfixable = [ +lint.unfixable = [ # Don't autofix unused imports. "F401", ] -[tool.ruff.isort] +[tool.ruff.lint.isort] known-first-party = ["protovalidate", "buf"] -[tool.ruff.flake8-tidy-imports] +[tool.ruff.lint.flake8-tidy-imports] ban-relative-imports = "all" -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] # Tests can use magic values, assertions, and relative imports. "tests/**/*" = ["PLR2004", "S101", "TID252"]