From 8fa26d46f394aa17eb1523d858a9b759f647436f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:01:51 +0000 Subject: [PATCH 1/4] build: bump ruff from 0.4.10 to 0.5.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.10 to 0.5.0. - [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.4.10...0.5.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 570c1eca..d7b541c9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -187,7 +187,7 @@ requests==2.32.3 # via # pygithub # sphinx -ruff==0.4.10 +ruff==0.5.0 # via rocm-docs-core (pyproject.toml) six==1.16.0 # via python-dateutil From adb7516fc10b67ab3056c80de0936347213de352 Mon Sep 17 00:00:00 2001 From: Sam Wu <22262939+samjwu@users.noreply.github.com> Date: Thu, 27 Jun 2024 13:45:20 -0600 Subject: [PATCH 2/4] ci(justfile): Use ruff check since ruff is deprecated in 0.5.0 --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index fdaacdf3..d30e1480 100644 --- a/justfile +++ b/justfile @@ -62,7 +62,7 @@ isort +files="src tests docs": (_isort "" files) check-isort +files="src tests docs": (_isort "--check" files) _ruff extra_args +files: - {{ruff_exe}} --config pyproject.toml {{extra_args}} {{files}} + {{ruff_exe}} check --config pyproject.toml {{extra_args}} {{files}} # Run ruff to lint files ruff +files="src tests": (_ruff "" files) From fe3d7cc08b8010cd24984c5b4929aca39b3c398d Mon Sep 17 00:00:00 2001 From: Sam Wu <22262939+samjwu@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:37:23 -0600 Subject: [PATCH 3/4] refactor(core.py): Apply ruff suggested fix --- src/rocm_docs/core.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/rocm_docs/core.py b/src/rocm_docs/core.py index 7219cb22..fa63bc84 100644 --- a/src/rocm_docs/core.py +++ b/src/rocm_docs/core.py @@ -259,9 +259,7 @@ def is_visible(element): return False if isinstance(element, bs4.element.Comment): return False - if element.string == "\n": - return False - return True + return not element.string == "\n" words_per_minute = 200 average_word_length = 5 From 51129315e983db2eeb97d8ad50d745ba25e883cb Mon Sep 17 00:00:00 2001 From: Sam Wu <22262939+samjwu@users.noreply.github.com> Date: Thu, 27 Jun 2024 15:38:03 -0600 Subject: [PATCH 4/4] refactor(core.py): Apply ruff suggested fix --- src/rocm_docs/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rocm_docs/core.py b/src/rocm_docs/core.py index fa63bc84..988eefc5 100644 --- a/src/rocm_docs/core.py +++ b/src/rocm_docs/core.py @@ -259,7 +259,7 @@ def is_visible(element): return False if isinstance(element, bs4.element.Comment): return False - return not element.string == "\n" + return element.string != "\n" words_per_minute = 200 average_word_length = 5