[PR #122] [CLOSED] Bump ruff from 0.3.4 to 0.4.0 #365

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/122
Author: @dependabot[bot]
Created: 4/18/2024
Status: Closed

Base: mainHead: dependabot/pip/ruff-0.4.0


📝 Commits (1)

  • 1b50c30 Bump ruff from 0.3.4 to 0.4.0

📊 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.0.

Release notes

Sourced from ruff's releases.

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)
  • [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)

Rule changes

  • [flake8-bandit] Allow urllib.request.urlopen calls with static Request argument (S310) (#10964)
  • [flake8-bugbear] Treat raise NotImplemented-only bodies as stub functions (B006) (#10990)
  • [flake8-slots] Respect same-file Enum subclasses (SLOT000) (#11006)
  • [pylint] Support inverted comparisons (PLR1730) (#10920)

Linter

  • Improve handling of builtin symbols in linter rules (#10919)
  • Improve display of rules in --show-settings (#11003)
  • Improve inference capabilities of the BuiltinTypeChecker (#10976)
  • Resolve classes and functions relative to script name (#10965)
  • Improve performance of RuleTable::any_enabled (#10971)

Server

This section is devoted to updates for our new language server, written in Rust.

... (truncated)

Changelog

Sourced from ruff's changelog.

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)

Rule changes

  • [flake8-bandit] Allow urllib.request.urlopen calls with static Request argument (S310) (#10964)
  • [flake8-bugbear] Treat raise NotImplemented-only bodies as stub functions (B006) (#10990)
  • [flake8-slots] Respect same-file Enum subclasses (SLOT000) (#11006)
  • [pylint] Support inverted comparisons (PLR1730) (#10920)

Linter

  • Improve handling of builtin symbols in linter rules (#10919)
  • Improve display of rules in --show-settings (#11003)
  • Improve inference capabilities of the BuiltinTypeChecker (#10976)
  • Resolve classes and functions relative to script name (#10965)
  • Improve performance of RuleTable::any_enabled (#10971)

... (truncated)

Commits
  • e751b4e Bump version to 0.4.0 (#11011)
  • 25a9131 Add myself as codeowner for the parser (#11013)
  • b7066e6 Consider binary expr for parenthesized with items parsing (#11012)
  • 6c4d779 Consider if expression for parenthesized with items parsing (#11010)
  • 8020d48 Reset FOR_TARGET context for all kinds of parentheses (#11009)
  • 13ffb5b Replace LALRPOP parser with hand-written parser (#10036)
  • e09180b Rename SemanticModel::is_builtin to SemanticModel::has_builtin_binding (#...
  • 2cc487e ruff server: Introduce settings for directly configuring the linter and for...
  • 5da7299 ruff server: Write a setup guide for Neovim (#10987)
  • 4d8890e [pylint] Omit stubs from invalid-bool and invalid-str-return-type (#11008)
  • 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/122 **Author:** [@dependabot[bot]](https://github.com/apps/dependabot) **Created:** 4/18/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dependabot/pip/ruff-0.4.0` --- ### 📝 Commits (1) - [`1b50c30`](https://github.com/ollama/ollama-python/commit/1b50c30ecfd8be2b798b00768b764751453224ff) Bump ruff from 0.3.4 to 0.4.0 ### 📊 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.0. <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.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> <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> <h3>Rule changes</h3> <ul> <li>[<code>flake8-bandit</code>] Allow <code>urllib.request.urlopen</code> calls with static <code>Request</code> argument (<code>S310</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10964">#10964</a>)</li> <li>[<code>flake8-bugbear</code>] Treat <code>raise NotImplemented</code>-only bodies as stub functions (<code>B006</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10990">#10990</a>)</li> <li>[<code>flake8-slots</code>] Respect same-file <code>Enum</code> subclasses (<code>SLOT000</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/11006">#11006</a>)</li> <li>[<code>pylint</code>] Support inverted comparisons (<code>PLR1730</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10920">#10920</a>)</li> </ul> <h3>Linter</h3> <ul> <li>Improve handling of builtin symbols in linter rules (<a href="https://redirect.github.com/astral-sh/ruff/pull/10919">#10919</a>)</li> <li>Improve display of rules in <code>--show-settings</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/11003">#11003</a>)</li> <li>Improve inference capabilities of the <code>BuiltinTypeChecker</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10976">#10976</a>)</li> <li>Resolve classes and functions relative to script name (<a href="https://redirect.github.com/astral-sh/ruff/pull/10965">#10965</a>)</li> <li>Improve performance of <code>RuleTable::any_enabled</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10971">#10971</a>)</li> </ul> <h3>Server</h3> <p><em>This section is devoted to updates for our new language server, written in Rust.</em></p> <!-- 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.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> <h3>Rule changes</h3> <ul> <li>[<code>flake8-bandit</code>] Allow <code>urllib.request.urlopen</code> calls with static <code>Request</code> argument (<code>S310</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10964">#10964</a>)</li> <li>[<code>flake8-bugbear</code>] Treat <code>raise NotImplemented</code>-only bodies as stub functions (<code>B006</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10990">#10990</a>)</li> <li>[<code>flake8-slots</code>] Respect same-file <code>Enum</code> subclasses (<code>SLOT000</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/11006">#11006</a>)</li> <li>[<code>pylint</code>] Support inverted comparisons (<code>PLR1730</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10920">#10920</a>)</li> </ul> <h3>Linter</h3> <ul> <li>Improve handling of builtin symbols in linter rules (<a href="https://redirect.github.com/astral-sh/ruff/pull/10919">#10919</a>)</li> <li>Improve display of rules in <code>--show-settings</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/11003">#11003</a>)</li> <li>Improve inference capabilities of the <code>BuiltinTypeChecker</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10976">#10976</a>)</li> <li>Resolve classes and functions relative to script name (<a href="https://redirect.github.com/astral-sh/ruff/pull/10965">#10965</a>)</li> <li>Improve performance of <code>RuleTable::any_enabled</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10971">#10971</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/e751b4ea8260ff83723345d1c7d39d5c776cc8ff"><code>e751b4e</code></a> Bump version to 0.4.0 (<a href="https://redirect.github.com/astral-sh/ruff/issues/11011">#11011</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/25a91311097f697b2a2b68c524478eb0f60eba18"><code>25a9131</code></a> Add myself as codeowner for the parser (<a href="https://redirect.github.com/astral-sh/ruff/issues/11013">#11013</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/b7066e64e716c2bd83350fd83e94f2a95cdf9d67"><code>b7066e6</code></a> Consider binary expr for parenthesized with items parsing (<a href="https://redirect.github.com/astral-sh/ruff/issues/11012">#11012</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/6c4d779140e0e16b041029000a96e8317f76624f"><code>6c4d779</code></a> Consider <code>if</code> expression for parenthesized with items parsing (<a href="https://redirect.github.com/astral-sh/ruff/issues/11010">#11010</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/8020d486f67505bcd3fc95d13868065e92ed92fe"><code>8020d48</code></a> Reset <code>FOR_TARGET</code> context for all kinds of parentheses (<a href="https://redirect.github.com/astral-sh/ruff/issues/11009">#11009</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/13ffb5bc1936493816f01fb5583359e3d8fffca7"><code>13ffb5b</code></a> Replace LALRPOP parser with hand-written parser (<a href="https://redirect.github.com/astral-sh/ruff/issues/10036">#10036</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/e09180b1df5f7ea31412e8330561a35cc64cb41b"><code>e09180b</code></a> Rename <code>SemanticModel::is_builtin</code> to <code>SemanticModel::has_builtin_binding</code> (#...</li> <li><a href="https://github.com/astral-sh/ruff/commit/2cc487eb22970036f5621758e34996a8ece1e194"><code>2cc487e</code></a> <code>ruff server</code>: Introduce settings for directly configuring the linter and for...</li> <li><a href="https://github.com/astral-sh/ruff/commit/5da7299b321395f4591f1167567c6dbe24045f12"><code>5da7299</code></a> <code>ruff server</code>: Write a setup guide for Neovim (<a href="https://redirect.github.com/astral-sh/ruff/issues/10987">#10987</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/4d8890eef5ae21d951be948864e8b61b549c77d0"><code>4d8890e</code></a> [<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/issues/11008">#11008</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/v0.3.4...v0.4.0">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.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> --- <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#365