numat / alicat

Python driver and command line tool for Alicat mass flow controllers.
GNU General Public License v2.0
21 stars 27 forks source link

Update ruff to v0.3.0 #109

Closed renovate[bot] closed 4 months ago

renovate[bot] commented 4 months ago

Mend Renovate

This PR contains the following updates:

Package Type Update Change Age Adoption Passing Confidence
charliermarsh/ruff-pre-commit repository minor v0.2.0 -> v0.3.0 age adoption passing confidence
ruff (source, changelog) minor ==0.2.0 -> ==0.3.0 age adoption passing confidence

Note: The pre-commit manager in Renovate is not supported by the pre-commit maintainers or community. Please do not report any problems there, instead create a Discussion in the Renovate repository if you have any questions.


Release Notes

charliermarsh/ruff-pre-commit (charliermarsh/ruff-pre-commit) ### [`v0.3.0`](https://togithub.com/astral-sh/ruff-pre-commit/releases/tag/v0.3.0) [Compare Source](https://togithub.com/charliermarsh/ruff-pre-commit/compare/v0.2.2...v0.3.0) See: https://github.com/astral-sh/ruff/releases/tag/v0.3.0 ### [`v0.2.2`](https://togithub.com/astral-sh/ruff-pre-commit/releases/tag/v0.2.2) [Compare Source](https://togithub.com/charliermarsh/ruff-pre-commit/compare/v0.2.1...v0.2.2) See: https://github.com/astral-sh/ruff/releases/tag/v0.2.2 ### [`v0.2.1`](https://togithub.com/astral-sh/ruff-pre-commit/releases/tag/v0.2.1) [Compare Source](https://togithub.com/charliermarsh/ruff-pre-commit/compare/v0.2.0...v0.2.1) See: https://github.com/astral-sh/ruff/releases/tag/v0.2.1
astral-sh/ruff (ruff) ### [`v0.3.0`](https://togithub.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#030) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.2.2...v0.3.0) This release introduces the new Ruff formatter 2024.2 style and adds a new lint rule to detect invalid formatter suppression comments. ##### Preview features - \[`flake8-bandit`] Remove suspicious-lxml-import (`S410`) ([#​10154](https://togithub.com/astral-sh/ruff/pull/10154)) - \[`pycodestyle`] Allow `os.environ` modifications between imports (`E402`) ([#​10066](https://togithub.com/astral-sh/ruff/pull/10066)) - \[`pycodestyle`] Don't warn about a single whitespace character before a comma in a tuple (`E203`) ([#​10094](https://togithub.com/astral-sh/ruff/pull/10094)) ##### Rule changes - \[`eradicate`] Detect commented out `case` statements (`ERA001`) ([#​10055](https://togithub.com/astral-sh/ruff/pull/10055)) - \[`eradicate`] Detect single-line code for `try:`, `except:`, etc. (`ERA001`) ([#​10057](https://togithub.com/astral-sh/ruff/pull/10057)) - \[`flake8-boolean-trap`] Allow boolean positionals in `__post_init__` ([#​10027](https://togithub.com/astral-sh/ruff/pull/10027)) - \[`flake8-copyright`] Allow © in copyright notices ([#​10065](https://togithub.com/astral-sh/ruff/pull/10065)) - \[`isort`]: Use one blank line after imports in typing stub files ([#​9971](https://togithub.com/astral-sh/ruff/pull/9971)) - \[`pylint`] New Rule `dict-iter-missing-items` (`PLE1141`) ([#​9845](https://togithub.com/astral-sh/ruff/pull/9845)) - \[`pylint`] Ignore `sys.version` and `sys.platform` (`PLR1714`) ([#​10054](https://togithub.com/astral-sh/ruff/pull/10054)) - \[`pyupgrade`] Detect literals with unary operators (`UP018`) ([#​10060](https://togithub.com/astral-sh/ruff/pull/10060)) - \[`ruff`] Expand rule for `list(iterable).pop(0)` idiom (`RUF015`) ([#​10148](https://togithub.com/astral-sh/ruff/pull/10148)) ##### Formatter This release introduces the Ruff 2024.2 style, stabilizing the following changes: - Prefer splitting the assignment's value over the target or type annotation ([#​8943](https://togithub.com/astral-sh/ruff/pull/8943)) - Remove blank lines before class docstrings ([#​9154](https://togithub.com/astral-sh/ruff/pull/9154)) - Wrap multiple context managers in `with` parentheses when targeting Python 3.9 or newer ([#​9222](https://togithub.com/astral-sh/ruff/pull/9222)) - Add a blank line after nested classes with a dummy body (`...`) in typing stub files ([#​9155](https://togithub.com/astral-sh/ruff/pull/9155)) - Reduce vertical spacing for classes and functions with a dummy (`...`) body ([#​7440](https://togithub.com/astral-sh/ruff/issues/7440), [#​9240](https://togithub.com/astral-sh/ruff/pull/9240)) - Add a blank line after the module docstring ([#​8283](https://togithub.com/astral-sh/ruff/pull/8283)) - Parenthesize long type hints in assignments ([#​9210](https://togithub.com/astral-sh/ruff/pull/9210)) - Preserve indent for single multiline-string call-expressions ([#​9673](https://togithub.com/astral-sh/ruff/pull/9637)) - Normalize hex escape and unicode escape sequences ([#​9280](https://togithub.com/astral-sh/ruff/pull/9280)) - Format module docstrings ([#​9725](https://togithub.com/astral-sh/ruff/pull/9725)) ##### CLI - Explicitly disallow `extend` as part of a `--config` flag ([#​10135](https://togithub.com/astral-sh/ruff/pull/10135)) - Remove `build` from the default exclusion list ([#​10093](https://togithub.com/astral-sh/ruff/pull/10093)) - Deprecate `ruff `, `ruff --explain`, `ruff --clean`, and `ruff --generate-shell-completion` in favor of `ruff check `, `ruff rule`, `ruff clean`, and `ruff generate-shell-completion` ([#​10169](https://togithub.com/astral-sh/ruff/pull/10169)) - Remove the deprecated CLI option `--format` from `ruff rule` and `ruff linter` ([#​10170](https://togithub.com/astral-sh/ruff/pull/10170)) ##### Bug fixes - \[`flake8-bugbear`] Avoid adding default initializers to stubs (`B006`) ([#​10152](https://togithub.com/astral-sh/ruff/pull/10152)) - \[`flake8-type-checking`] Respect runtime-required decorators for function signatures ([#​10091](https://togithub.com/astral-sh/ruff/pull/10091)) - \[`pycodestyle`] Mark fixes overlapping with a multiline string as unsafe (`W293`) ([#​10049](https://togithub.com/astral-sh/ruff/pull/10049)) - \[`pydocstyle`] Trim whitespace when removing blank lines after section (`D413`) ([#​10162](https://togithub.com/astral-sh/ruff/pull/10162)) - \[`pylint`] Delete entire statement, including semicolons (`PLR0203`) ([#​10074](https://togithub.com/astral-sh/ruff/pull/10074)) - \[`ruff`] Avoid f-string false positives in `gettext` calls (`RUF027`) ([#​10118](https://togithub.com/astral-sh/ruff/pull/10118)) - Fix `ruff` crashing on PowerPC systems because of too small page size ([#​10080](https://togithub.com/astral-sh/ruff/pull/10080)) ##### Performance - Add cold attribute to less likely printer queue branches in the formatter ([#​10121](https://togithub.com/astral-sh/ruff/pull/10121)) - Skip unnecessary string normalization in the formatter ([#​10116](https://togithub.com/astral-sh/ruff/pull/10116)) ##### Documentation - Remove "Beta" Label from formatter documentation ([#​10144](https://togithub.com/astral-sh/ruff/pull/10144)) - `line-length` option: fix link to `pycodestyle.max-line-length` ([#​10136](https://togithub.com/astral-sh/ruff/pull/10136)) ### [`v0.2.2`](https://togithub.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#022) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.2.1...v0.2.2) Highlights include: - Initial support formatting f-strings (in `--preview`). - Support for overriding arbitrary configuration options via the CLI through an expanded `--config` argument (e.g., `--config "lint.isort.combine-as-imports=false"`). - Significant performance improvements in Ruff's lexer, parser, and lint rules. ##### Preview features - Implement minimal f-string formatting ([#​9642](https://togithub.com/astral-sh/ruff/pull/9642)) - \[`pycodestyle`] Add blank line(s) rules (`E301`, `E302`, `E303`, `E304`, `E305`, `E306`) ([#​9266](https://togithub.com/astral-sh/ruff/pull/9266)) - \[`refurb`] Implement `readlines_in_for` (`FURB129`) ([#​9880](https://togithub.com/astral-sh/ruff/pull/9880)) ##### Rule changes - \[`ruff`] Ensure closing parentheses for multiline sequences are always on their own line (`RUF022`, `RUF023`) ([#​9793](https://togithub.com/astral-sh/ruff/pull/9793)) - \[`numpy`] Add missing deprecation violations (`NPY002`) ([#​9862](https://togithub.com/astral-sh/ruff/pull/9862)) - \[`flake8-bandit`] Detect `mark_safe` usages in decorators ([#​9887](https://togithub.com/astral-sh/ruff/pull/9887)) - \[`ruff`] Expand `asyncio-dangling-task` (`RUF006`) to include `new_event_loop` ([#​9976](https://togithub.com/astral-sh/ruff/pull/9976)) - \[`flake8-pyi`] Ignore 'unused' private type dicts in class scopes ([#​9952](https://togithub.com/astral-sh/ruff/pull/9952)) ##### Formatter - Docstring formatting: Preserve tab indentation when using `indent-style=tabs` ([#​9915](https://togithub.com/astral-sh/ruff/pull/9915)) - Disable top-level docstring formatting for notebooks ([#​9957](https://togithub.com/astral-sh/ruff/pull/9957)) - Stabilize quote-style's `preserve` mode ([#​9922](https://togithub.com/astral-sh/ruff/pull/9922)) ##### CLI - Allow arbitrary configuration options to be overridden via the CLI ([#​9599](https://togithub.com/astral-sh/ruff/pull/9599)) ##### Bug fixes - Make `show-settings` filters directory-agnostic ([#​9866](https://togithub.com/astral-sh/ruff/pull/9866)) - Respect duplicates when rewriting type aliases ([#​9905](https://togithub.com/astral-sh/ruff/pull/9905)) - Respect tuple assignments in typing analyzer ([#​9969](https://togithub.com/astral-sh/ruff/pull/9969)) - Use atomic write when persisting cache ([#​9981](https://togithub.com/astral-sh/ruff/pull/9981)) - Use non-parenthesized range for `DebugText` ([#​9953](https://togithub.com/astral-sh/ruff/pull/9953)) - \[`flake8-simplify`] Avoid false positive with `async` for loops (`SIM113`) ([#​9996](https://togithub.com/astral-sh/ruff/pull/9996)) - \[`flake8-trio`] Respect `async with` in `timeout-without-await` ([#​9859](https://togithub.com/astral-sh/ruff/pull/9859)) - \[`perflint`] Catch a wider range of mutations in `PERF101` ([#​9955](https://togithub.com/astral-sh/ruff/pull/9955)) - \[`pycodestyle`] Fix `E30X` panics on blank lines with trailing white spaces ([#​9907](https://togithub.com/astral-sh/ruff/pull/9907)) - \[`pydocstyle`] Allow using `parameters` as a subsection header (`D405`) ([#​9894](https://togithub.com/astral-sh/ruff/pull/9894)) - \[`pydocstyle`] Fix blank-line docstring rules for module-level docstrings ([#​9878](https://togithub.com/astral-sh/ruff/pull/9878)) - \[`pylint`] Accept 0.0 and 1.0 as common magic values (`PLR2004`) ([#​9964](https://togithub.com/astral-sh/ruff/pull/9964)) - \[`pylint`] Avoid suggesting set rewrites for non-hashable types ([#​9956](https://togithub.com/astral-sh/ruff/pull/9956)) - \[`ruff`] Avoid false negatives with string literals inside of method calls (`RUF027`) ([#​9865](https://togithub.com/astral-sh/ruff/pull/9865)) - \[`ruff`] Fix panic on with f-string detection (`RUF027`) ([#​9990](https://togithub.com/astral-sh/ruff/pull/9990)) - \[`ruff`] Ignore builtins when detecting missing f-strings ([#​9849](https://togithub.com/astral-sh/ruff/pull/9849)) ##### Performance - Use `memchr` for string lexing ([#​9888](https://togithub.com/astral-sh/ruff/pull/9888)) - Use `memchr` for tab-indentation detection ([#​9853](https://togithub.com/astral-sh/ruff/pull/9853)) - Reduce `Result` size by using `Box` instead of `String` ([#​9885](https://togithub.com/astral-sh/ruff/pull/9885)) - Reduce size of `Expr` from 80 to 64 bytes ([#​9900](https://togithub.com/astral-sh/ruff/pull/9900)) - Improve trailing comma rule performance ([#​9867](https://togithub.com/astral-sh/ruff/pull/9867)) - Remove unnecessary string cloning from the parser ([#​9884](https://togithub.com/astral-sh/ruff/pull/9884)) ### [`v0.2.1`](https://togithub.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#021) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.2.0...v0.2.1) This release includes support for range formatting (i.e., the ability to format specific lines within a source file). ##### Preview features - \[`refurb`] Implement `missing-f-string-syntax` (`RUF027`) ([#​9728](https://togithub.com/astral-sh/ruff/pull/9728)) - Format module-level docstrings ([#​9725](https://togithub.com/astral-sh/ruff/pull/9725)) ##### Formatter - Add `--range` option to `ruff format` ([#​9733](https://togithub.com/astral-sh/ruff/pull/9733)) - Don't trim last empty line in docstrings ([#​9813](https://togithub.com/astral-sh/ruff/pull/9813)) ##### Bug fixes - Skip empty lines when determining base indentation ([#​9795](https://togithub.com/astral-sh/ruff/pull/9795)) - Drop `__get__` and `__set__` from `unnecessary-dunder-call` ([#​9791](https://togithub.com/astral-sh/ruff/pull/9791)) - Respect generic `Protocol` in ellipsis removal ([#​9841](https://togithub.com/astral-sh/ruff/pull/9841)) - Revert "Use publicly available Apple Silicon runners ([#​9726](https://togithub.com/astral-sh/ruff/issues/9726))" ([#​9834](https://togithub.com/astral-sh/ruff/pull/9834)) ##### Performance - Skip LibCST parsing for standard dedent adjustments ([#​9769](https://togithub.com/astral-sh/ruff/pull/9769)) - Remove CST-based fixer for `C408` ([#​9822](https://togithub.com/astral-sh/ruff/pull/9822)) - Add our own ignored-names abstractions ([#​9802](https://togithub.com/astral-sh/ruff/pull/9802)) - Remove CST-based fixers for `C400`, `C401`, `C410`, and `C418` ([#​9819](https://togithub.com/astral-sh/ruff/pull/9819)) - Use `AhoCorasick` to speed up quote match ([#​9773](https://togithub.com/astral-sh/ruff/pull/9773)) - Remove CST-based fixers for `C405` and `C409` ([#​9821](https://togithub.com/astral-sh/ruff/pull/9821)) - Add fast-path for comment detection ([#​9808](https://togithub.com/astral-sh/ruff/pull/9808)) - Invert order of checks in `zero-sleep-call` ([#​9766](https://togithub.com/astral-sh/ruff/pull/9766)) - Short-circuit typing matches based on imports ([#​9800](https://togithub.com/astral-sh/ruff/pull/9800)) - Run dunder method rule on methods directly ([#​9815](https://togithub.com/astral-sh/ruff/pull/9815)) - Track top-level module imports in the semantic model ([#​9775](https://togithub.com/astral-sh/ruff/pull/9775)) - Slight speed-up for lowercase and uppercase identifier checks ([#​9798](https://togithub.com/astral-sh/ruff/pull/9798)) - Remove LibCST-based fixer for `C403` ([#​9818](https://togithub.com/astral-sh/ruff/pull/9818)) ##### Documentation - Update `max-pos-args` example to `max-positional-args` ([#​9797](https://togithub.com/astral-sh/ruff/pull/9797)) - Fixed example code in `weak_cryptographic_key.rs` ([#​9774](https://togithub.com/astral-sh/ruff/pull/9774)) - Fix references to deprecated `ANN` rules in changelog ([#​9771](https://togithub.com/astral-sh/ruff/pull/9771)) - Fix default for `max-positional-args` ([#​9838](https://togithub.com/astral-sh/ruff/pull/9838))

Configuration

📅 Schedule: Branch creation - "on the first day of the month" in timezone America/Chicago, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.



This PR has been generated by Mend Renovate. View repository job log here.