From 416166992d14a488a66fa0aededaac7be0716fec Mon Sep 17 00:00:00 2001 From: Katelyn Gigante Date: Fri, 28 Jun 2024 00:40:30 +1000 Subject: [PATCH 1/3] Fix typo in pyproject.toml --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b93cbf7ea..967c41e66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,14 +93,12 @@ exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"] [tool.coverage.run] omit = ["tests/*"] +source = ["interactions"] [build-system] requires = ["setuptools", "tomli"] build-backend = "setuptools.build_meta" -[tools.coverage.run] -source = ["interactions"] - [tool.pytest.ini_options] addopts = "-l -ra --durations=2 --junitxml=TestResults.xml" doctest_optionflags = "NORMALIZE_WHITESPACE" From f44b0385229d8f04635699ae1cf13f6faadac34d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 21:31:46 +0000 Subject: [PATCH 2/3] ci: weekly check. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) - [github.com/astral-sh/ruff-pre-commit: v0.3.2 → v0.4.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.2...v0.4.3) - [github.com/psf/black: 24.2.0 → 24.4.2](https://github.com/psf/black/compare/24.2.0...24.4.2) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2a40c0045..186c71192 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: requirements-txt-fixer name: Requirements @@ -30,13 +30,13 @@ repos: - id: check-merge-conflict name: Merge Conflicts - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.3.2' + rev: 'v0.4.3' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] language: python - repo: https://github.com/psf/black - rev: 24.2.0 + rev: 24.4.2 hooks: - id: black name: Black Formatting From 6311ebe6ea439a262997ca6f424d7e7e4181fbdc Mon Sep 17 00:00:00 2001 From: Katelyn Gigante Date: Tue, 7 May 2024 15:54:55 +1000 Subject: [PATCH 3/3] Update pyproject.toml for ruff 0.2.0's breaking changes --- interactions/api/gateway/gateway.py | 2 +- pyproject.toml | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/interactions/api/gateway/gateway.py b/interactions/api/gateway/gateway.py index 47baf6f2b..723d7e663 100644 --- a/interactions/api/gateway/gateway.py +++ b/interactions/api/gateway/gateway.py @@ -223,7 +223,7 @@ async def dispatch_event(self, data, seq, event) -> None: return None case "GUILD_MEMBERS_CHUNK": - _ = asyncio.create_task(self._process_member_chunk(data.copy())) + _ = asyncio.create_task(self._process_member_chunk(data.copy())) # noqa: RUF006 case _: # the above events are "special", and are handled by the gateway itself, the rest can be dispatched diff --git a/pyproject.toml b/pyproject.toml index 967c41e66..49dfdd6bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,9 +111,11 @@ log_cli_date_format = "%Y-%m-%d %H:%M:%S" [tool.ruff] line-length = 120 target-version = "py310" +output-format = "concise" # set to full if you want to see the source of the error/warning + +[tool.ruff.lint] ignore-init-module-imports = true task-tags = ["TODO", "FIXME", "XXX", "HACK", "REVIEW", "NOTE"] -show-source = false # set to true if you want to see the source of the error/warning select = ["E", "F", "B", "Q", "RUF", "D", "ANN", "RET", "C"] ignore = [ "Q0", @@ -175,16 +177,16 @@ ignore = [ # unecessary variable assignement before return statement. ] -[tool.ruff.flake8-quotes] +[tool.ruff.lint.flake8-quotes] docstring-quotes = "double" -[tool.ruff.flake8-annotations] +[tool.ruff.lint.flake8-annotations] mypy-init-return = true suppress-dummy-args = true suppress-none-returning = true -[tool.ruff.flake8-errmsg] +[tool.ruff.lint.flake8-errmsg] max-string-length = 20 -[tool.ruff.mccabe] +[tool.ruff.lint.mccabe] max-complexity = 13