[PR #124] [MERGED] Bump ruff from 0.3.4 to 0.4.1 #369

Closed
opened 2026-02-15 16:30:08 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama-python/pull/124
Author: @dependabot[bot]
Created: 4/19/2024
Status: Merged
Merged: 4/24/2024
Merged by: @dependabot[bot]

Base: mainHead: dependabot/pip/ruff-0.4.1


📝 Commits (1)

  • 426b30e Bump ruff from 0.3.4 to 0.4.1

📊 Changes

2 files changed (+20 additions, -20 deletions)

View changed files

📝 poetry.lock (+19 -19)
📝 pyproject.toml (+1 -1)

📄 Description

Bumps ruff from 0.3.4 to 0.4.1.

Release notes

Sourced from ruff's releases.

v0.4.1

Changes

Preview features

  • [pylint] Implement invalid-hash-returned (PLE0309) (#10961)
  • [pylint] Implement invalid-index-returned (PLE0305) (#10962)

Bug fixes

  • [pylint] Allow NoReturn-like functions for __str__, __len__, etc. (PLE0307) (#11017)
  • Parser: Use empty range when there's "gap" in token source (#11032)
  • [ruff] Ignore stub functions in unused-async (RUF029) (#11026)
  • Parser: Expect indented case block instead of match stmt (#11033)

Contributors

v0.4.0

Changes

A new, hand-written parser

Ruff's new parser is >2x faster, which translates to a 20-40% speedup for all linting and formatting invocations. There's a lot to say about this exciting change, so check out the blog post for more details!

See #10036 for implementation details.

A new language server in Rust

With this release, we also want to highlight our new language server. ruff server is a Rust-powered language server that comes built-in with Ruff. It can be used with any editor that supports the Language Server Protocol (LSP). It uses a multi-threaded, lock-free architecture inspired by rust-analyzer and it will open the door for a lot of exciting features. It’s also faster than our previous Python-based language server -- but you probably guessed that already.

ruff server is only in alpha, but it has a lot of features that you can try out today:

  • Lints Python files automatically and shows quick-fixes when available
  • Formats Python files, with support for range formatting
  • Comes with commands for quickly performing actions: ruff.applyAutofix, ruff.applyFormat, and ruff.applyOrganizeImports
  • Supports source.fixAll and source.organizeImports source actions
  • Automatically reloads your project configuration when you change it

To setup ruff server with your editor, refer to the README.md.

Preview features

  • [pycodestyle] Do not trigger E3 rules on defs following a function/method with a dummy body (#10704)
  • [pylint] Implement invalid-bytes-returned (E0308) (#10959)

... (truncated)

Changelog

Sourced from ruff's changelog.

0.4.1

Preview features

  • [pylint] Implement invalid-hash-returned (PLE0309) (#10961)
  • [pylint] Implement invalid-index-returned (PLE0305) (#10962)

Bug fixes

  • [pylint] Allow NoReturn-like functions for __str__, __len__, etc. (PLE0307) (#11017)
  • Parser: Use empty range when there's "gap" in token source (#11032)
  • [ruff] Ignore stub functions in unused-async (RUF029) (#11026)
  • Parser: Expect indented case block instead of match stmt (#11033)

0.4.0

A new, hand-written parser

Ruff's new parser is >2x faster, which translates to a 20-40% speedup for all linting and formatting invocations. There's a lot to say about this exciting change, so check out the blog post for more details!

See #10036 for implementation details.

A new language server in Rust

With this release, we also want to highlight our new language server. ruff server is a Rust-powered language server that comes built-in with Ruff. It can be used with any editor that supports the Language Server Protocol (LSP). It uses a multi-threaded, lock-free architecture inspired by rust-analyzer and it will open the door for a lot of exciting features. It’s also faster than our previous Python-based language server -- but you probably guessed that already.

ruff server is only in alpha, but it has a lot of features that you can try out today:

  • Lints Python files automatically and shows quick-fixes when available
  • Formats Python files, with support for range formatting
  • Comes with commands for quickly performing actions: ruff.applyAutofix, ruff.applyFormat, and ruff.applyOrganizeImports
  • Supports source.fixAll and source.organizeImports source actions
  • Automatically reloads your project configuration when you change it

To setup ruff server with your editor, refer to the README.md.

Preview features

  • [pycodestyle] Do not trigger E3 rules on defs following a function/method with a dummy body (#10704)
  • [pylint] Implement invalid-bytes-returned (E0308) (#10959)
  • [pylint] Implement invalid-length-returned (E0303) (#10963)
  • [pylint] Implement self-cls-assignment (W0642) (#9267)
  • [pylint] Omit stubs from invalid-bool and invalid-str-return-type (#11008)
  • [ruff] New rule unused-async (RUF029) to detect unneeded async keywords on functions (#9966)

... (truncated)

Commits
  • 0ff25a5 Bump version to 0.4.1 (#11035)
  • 34873ec Add a script to fuzz the parser (courtesy of pysource-codegen) (#11015)
  • d3cd61f Use empty range when there's "gap" in token source (#11032)
  • 9b80cc0 Select fewer ruff rules when linting Python files in scripts/ (#11034)
  • 9bb23b0 Expect indented case block instead of match stmt (#11033)
  • 06c248a [ruff] Ignore stub functions in unused-async (RUF029) (#11026)
  • 27902b7 [pylint] Implement invalid-index-returned (PLE0305) (#10962)
  • 97acf1d ENH: Bump ruff dependency versions to support the latest release of `v0.4.0...
  • adf63d9 [pylint] Implement invalid-hash-returned (PLE0309) (#10961)
  • 5d3c9f2 ruff server: fix Neovim setup guide command (#11021)
  • Additional commits viewable in compare view

Dependabot compatibility score

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 commands and options

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)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama-python/pull/124 **Author:** [@dependabot[bot]](https://github.com/apps/dependabot) **Created:** 4/19/2024 **Status:** ✅ Merged **Merged:** 4/24/2024 **Merged by:** [@dependabot[bot]](https://github.com/apps/dependabot) **Base:** `main` ← **Head:** `dependabot/pip/ruff-0.4.1` --- ### 📝 Commits (1) - [`426b30e`](https://github.com/ollama/ollama-python/commit/426b30e9ed076383a793e835845a13324624019f) Bump ruff from 0.3.4 to 0.4.1 ### 📊 Changes **2 files changed** (+20 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `poetry.lock` (+19 -19) 📝 `pyproject.toml` (+1 -1) </details> ### 📄 Description Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.4 to 0.4.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>v0.4.1</h2> <h2>Changes</h2> <h3>Preview features</h3> <ul> <li>[<code>pylint</code>] Implement <code>invalid-hash-returned</code> (<code>PLE0309</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10961">#10961</a>)</li> <li>[<code>pylint</code>] Implement <code>invalid-index-returned</code> (<code>PLE0305</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10962">#10962</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>[<code>pylint</code>] Allow <code>NoReturn</code>-like functions for <code>__str__</code>, <code>__len__</code>, etc. (<code>PLE0307</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/11017">#11017</a>)</li> <li>Parser: Use empty range when there's &quot;gap&quot; in token source (<a href="https://redirect.github.com/astral-sh/ruff/pull/11032">#11032</a>)</li> <li>[<code>ruff</code>] Ignore stub functions in <code>unused-async</code> (<code>RUF029</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/11026">#11026</a>)</li> <li>Parser: Expect indented case block instead of match stmt (<a href="https://redirect.github.com/astral-sh/ruff/pull/11033">#11033</a>)</li> </ul> <h2>Contributors</h2> <ul> <li><a href="https://github.com/AlexWaygood"><code>@​AlexWaygood</code></a></li> <li><a href="https://github.com/HenryAsa"><code>@​HenryAsa</code></a></li> <li><a href="https://github.com/MithicSpirit"><code>@​MithicSpirit</code></a></li> <li><a href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a></li> <li><a href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a></li> <li><a href="https://github.com/tibor-reiss"><code>@​tibor-reiss</code></a></li> </ul> <h2>v0.4.0</h2> <h2>Changes</h2> <h3>A new, hand-written parser</h3> <p>Ruff's new parser is <strong>&gt;2x faster</strong>, which translates to a <strong>20-40% speedup</strong> for all linting and formatting invocations. There's a lot to say about this exciting change, so check out the <a href="https://astral.sh/blog/ruff-v0.4.0">blog post</a> for more details!</p> <p>See <a href="https://redirect.github.com/astral-sh/ruff/pull/10036">#10036</a> for implementation details.</p> <h3>A new language server in Rust</h3> <p>With this release, we also want to highlight our new language server. <code>ruff server</code> is a Rust-powered language server that comes built-in with Ruff. It can be used with any editor that supports the <a href="https://microsoft.github.io/language-server-protocol/">Language Server Protocol</a> (LSP). It uses a multi-threaded, lock-free architecture inspired by <code>rust-analyzer</code> and it will open the door for a lot of exciting features. It’s also faster than our previous <a href="https://github.com/astral-sh/ruff-lsp">Python-based language server</a> -- but you probably guessed that already.</p> <p><code>ruff server</code> is only in alpha, but it has a lot of features that you can try out today:</p> <ul> <li>Lints Python files automatically and shows quick-fixes when available</li> <li>Formats Python files, with support for range formatting</li> <li>Comes with commands for quickly performing actions: <code>ruff.applyAutofix</code>, <code>ruff.applyFormat</code>, and <code>ruff.applyOrganizeImports</code></li> <li>Supports <code>source.fixAll</code> and <code>source.organizeImports</code> source actions</li> <li>Automatically reloads your project configuration when you change it</li> </ul> <p>To setup <code>ruff server</code> with your editor, refer to the <a href="https://github.com/astral-sh/ruff/blob/main/crates/ruff_server/README.md">README.md</a>.</p> <h3>Preview features</h3> <ul> <li>[<code>pycodestyle</code>] Do not trigger <code>E3</code> rules on <code>def</code>s following a function/method with a dummy body (<a href="https://redirect.github.com/astral-sh/ruff/pull/10704">#10704</a>)</li> <li>[<code>pylint</code>] Implement <code>invalid-bytes-returned</code> (<code>E0308</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10959">#10959</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.4.1</h2> <h3>Preview features</h3> <ul> <li>[<code>pylint</code>] Implement <code>invalid-hash-returned</code> (<code>PLE0309</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10961">#10961</a>)</li> <li>[<code>pylint</code>] Implement <code>invalid-index-returned</code> (<code>PLE0305</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10962">#10962</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>[<code>pylint</code>] Allow <code>NoReturn</code>-like functions for <code>__str__</code>, <code>__len__</code>, etc. (<code>PLE0307</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/11017">#11017</a>)</li> <li>Parser: Use empty range when there's &quot;gap&quot; in token source (<a href="https://redirect.github.com/astral-sh/ruff/pull/11032">#11032</a>)</li> <li>[<code>ruff</code>] Ignore stub functions in <code>unused-async</code> (<code>RUF029</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/11026">#11026</a>)</li> <li>Parser: Expect indented case block instead of match stmt (<a href="https://redirect.github.com/astral-sh/ruff/pull/11033">#11033</a>)</li> </ul> <h2>0.4.0</h2> <h3>A new, hand-written parser</h3> <p>Ruff's new parser is <strong>&gt;2x faster</strong>, which translates to a <strong>20-40% speedup</strong> for all linting and formatting invocations. There's a lot to say about this exciting change, so check out the <a href="https://astral.sh/blog/ruff-v0.4.0">blog post</a> for more details!</p> <p>See <a href="https://redirect.github.com/astral-sh/ruff/pull/10036">#10036</a> for implementation details.</p> <h3>A new language server in Rust</h3> <p>With this release, we also want to highlight our new language server. <code>ruff server</code> is a Rust-powered language server that comes built-in with Ruff. It can be used with any editor that supports the <a href="https://microsoft.github.io/language-server-protocol/">Language Server Protocol</a> (LSP). It uses a multi-threaded, lock-free architecture inspired by <code>rust-analyzer</code> and it will open the door for a lot of exciting features. It’s also faster than our previous <a href="https://github.com/astral-sh/ruff-lsp">Python-based language server</a> -- but you probably guessed that already.</p> <p><code>ruff server</code> is only in alpha, but it has a lot of features that you can try out today:</p> <ul> <li>Lints Python files automatically and shows quick-fixes when available</li> <li>Formats Python files, with support for range formatting</li> <li>Comes with commands for quickly performing actions: <code>ruff.applyAutofix</code>, <code>ruff.applyFormat</code>, and <code>ruff.applyOrganizeImports</code></li> <li>Supports <code>source.fixAll</code> and <code>source.organizeImports</code> source actions</li> <li>Automatically reloads your project configuration when you change it</li> </ul> <p>To setup <code>ruff server</code> with your editor, refer to the <a href="https://github.com/astral-sh/ruff/blob/main/crates/ruff_server/README.md">README.md</a>.</p> <h3>Preview features</h3> <ul> <li>[<code>pycodestyle</code>] Do not trigger <code>E3</code> rules on <code>def</code>s following a function/method with a dummy body (<a href="https://redirect.github.com/astral-sh/ruff/pull/10704">#10704</a>)</li> <li>[<code>pylint</code>] Implement <code>invalid-bytes-returned</code> (<code>E0308</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10959">#10959</a>)</li> <li>[<code>pylint</code>] Implement <code>invalid-length-returned</code> (<code>E0303</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10963">#10963</a>)</li> <li>[<code>pylint</code>] Implement <code>self-cls-assignment</code> (<code>W0642</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9267">#9267</a>)</li> <li>[<code>pylint</code>] Omit stubs from <code>invalid-bool</code> and <code>invalid-str-return-type</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/11008">#11008</a>)</li> <li>[<code>ruff</code>] New rule <code>unused-async</code> (<code>RUF029</code>) to detect unneeded <code>async</code> keywords on functions (<a href="https://redirect.github.com/astral-sh/ruff/pull/9966">#9966</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff/commit/0ff25a540c550d8d2f562844354f84eb292b9c4b"><code>0ff25a5</code></a> Bump version to 0.4.1 (<a href="https://redirect.github.com/astral-sh/ruff/issues/11035">#11035</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/34873ec009952f74b6248e10222690364f65c9ac"><code>34873ec</code></a> Add a script to fuzz the parser (courtesy of <code>pysource-codegen</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/11015">#11015</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/d3cd61f804bae7428c8bd3ac8d4a2b8bb3640e4c"><code>d3cd61f</code></a> Use empty range when there's &quot;gap&quot; in token source (<a href="https://redirect.github.com/astral-sh/ruff/issues/11032">#11032</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/9b80cc09ee4f91c378308844d80106d201539e46"><code>9b80cc0</code></a> Select fewer ruff rules when linting Python files in <code>scripts/</code> (<a href="https://redirect.github.com/astral-sh/ruff/issues/11034">#11034</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/9bb23b0a38bd0532dc70c018b99a1ad30774f31c"><code>9bb23b0</code></a> Expect indented case block instead of match stmt (<a href="https://redirect.github.com/astral-sh/ruff/issues/11033">#11033</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/06c248a126b403caa088f3fa6546f85b0ba2b1d5"><code>06c248a</code></a> [<code>ruff]</code> Ignore stub functions in <code>unused-async</code> (<code>RUF029</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/11026">#11026</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/27902b7130afed05c2d4c653592ff90db88e27dc"><code>27902b7</code></a> [<code>pylint</code>] Implement <code>invalid-index-returned</code> (<code>PLE0305</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/10962">#10962</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/97acf1d59bd9f1ec4d842549921452aafc0229cc"><code>97acf1d</code></a> ENH: Bump <code>ruff</code> dependency versions to support the latest release of `v0.4.0...</li> <li><a href="https://github.com/astral-sh/ruff/commit/adf63d90139b9412edc65986b5b4b7a7e667301c"><code>adf63d9</code></a> [<code>pylint</code>] Implement <code>invalid-hash-returned</code> (<code>PLE0309</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/10961">#10961</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/5d3c9f2637c4ec0c32cad22eae6c2fa39be74c6c"><code>5d3c9f2</code></a> <code>ruff server</code>: fix Neovim setup guide command (<a href="https://redirect.github.com/astral-sh/ruff/issues/11021">#11021</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/v0.3.4...v0.4.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.3.4&new-version=0.4.1)](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> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 16:30:08 -05:00
yindo closed this issue 2026-02-15 16:30:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#369