Remove redundant #![allow()] from main_native#1703
Merged
charliermarsh merged 1 commit intoastral-sh:mainfrom Jan 7, 2023
Merged
Remove redundant #![allow()] from main_native#1703charliermarsh merged 1 commit intoastral-sh:mainfrom
charliermarsh merged 1 commit intoastral-sh:mainfrom
Conversation
main_native.rs is a module of main.rs, so the #![allow()]s in the latter apply to the former automatically. Signed-off-by: Anders Kaseorg <[email protected]>
Member
|
Thanks! |
bruxisma
referenced
this pull request
in ixm-one/pytest-cmake-presets
Jan 7, 2023
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://togithub.com/charliermarsh/ruff) | `^0.0.212` -> `^0.0.213` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.213`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.213) [Compare Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.212...v0.0.213) #### What's Changed - Remove Result from SourceCodeGenerator signature by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1677](https://togithub.com/charliermarsh/ruff/pull/1677) - Implement `From` conversion for style detector-to-generator by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1678](https://togithub.com/charliermarsh/ruff/pull/1678) - Replace `toml` with `toml_edit` by [@​messense](https://togithub.com/messense) in [https://github.com/charliermarsh/ruff/pull/1680](https://togithub.com/charliermarsh/ruff/pull/1680) - Tweak badge logo by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1681](https://togithub.com/charliermarsh/ruff/pull/1681) - Don't mark D205 as fixable in more-lines case by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1682](https://togithub.com/charliermarsh/ruff/pull/1682) - Add requested context to issue template by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1679](https://togithub.com/charliermarsh/ruff/pull/1679) - Update `CONTRIBUTING.md` location on `README.md` by [@​saadmk11](https://togithub.com/saadmk11) in [https://github.com/charliermarsh/ruff/pull/1688](https://togithub.com/charliermarsh/ruff/pull/1688) - Implement flake8-simplify SIM108 by [@​messense](https://togithub.com/messense) in [https://github.com/charliermarsh/ruff/pull/1684](https://togithub.com/charliermarsh/ruff/pull/1684) - Remove TODO comment by [@​harupy](https://togithub.com/harupy) in [https://github.com/charliermarsh/ruff/pull/1691](https://togithub.com/charliermarsh/ruff/pull/1691) - Add specialized conversions for RefEquality by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1689](https://togithub.com/charliermarsh/ruff/pull/1689) - Avoiding flagging elif statements as potential ternaries by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1694](https://togithub.com/charliermarsh/ruff/pull/1694) - \[`flake8-bandit`] Add Rule for `S113` (requests call without timeout) by [@​saadmk11](https://togithub.com/saadmk11) in [https://github.com/charliermarsh/ruff/pull/1692](https://togithub.com/charliermarsh/ruff/pull/1692) - Implement flake8-simplify SIM109 by [@​messense](https://togithub.com/messense) in [https://github.com/charliermarsh/ruff/pull/1687](https://togithub.com/charliermarsh/ruff/pull/1687) - Simplify SIM201, SIM202, SIM208 by [@​chammika-become](https://togithub.com/chammika-become) in [https://github.com/charliermarsh/ruff/pull/1666](https://togithub.com/charliermarsh/ruff/pull/1666) - \[`flake8-bandit`] Add Rule for `S501` (request call with `verify=False`) by [@​saadmk11](https://togithub.com/saadmk11) in [https://github.com/charliermarsh/ruff/pull/1695](https://togithub.com/charliermarsh/ruff/pull/1695) - Require explicit opt-in for GitHub and Gitlab formats by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1697](https://togithub.com/charliermarsh/ruff/pull/1697) - Include error location in GitHub Action diagnostic messages by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1696](https://togithub.com/charliermarsh/ruff/pull/1696) - Include list of fixed files in `stderr` output by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1701](https://togithub.com/charliermarsh/ruff/pull/1701) - Remove redundant #!\[allow()] from main_native by [@​andersk](https://togithub.com/andersk) in [https://github.com/charliermarsh/ruff/pull/1703](https://togithub.com/charliermarsh/ruff/pull/1703) - Forbid unsafe code by [@​andersk](https://togithub.com/andersk) in [https://github.com/charliermarsh/ruff/pull/1704](https://togithub.com/charliermarsh/ruff/pull/1704) - Switch SourceCodeGenerator.buffer from Vec<u8> to String by [@​andersk](https://togithub.com/andersk) in [https://github.com/charliermarsh/ruff/pull/1702](https://togithub.com/charliermarsh/ruff/pull/1702) - Remove `add_check` methods by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1705](https://togithub.com/charliermarsh/ruff/pull/1705) - Use `trim_end` when checking line continutation by [@​harupy](https://togithub.com/harupy) in [https://github.com/charliermarsh/ruff/pull/1706](https://togithub.com/charliermarsh/ruff/pull/1706) - Automatically remove unused variables by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1683](https://togithub.com/charliermarsh/ruff/pull/1683) - Lazily compute ranges for class and function bindings by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1708](https://togithub.com/charliermarsh/ruff/pull/1708) - Add more backticks to flake8-pytest-style error messages by [@​harupy](https://togithub.com/harupy) in [https://github.com/charliermarsh/ruff/pull/1707](https://togithub.com/charliermarsh/ruff/pull/1707) - Increase blackd wait time by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1709](https://togithub.com/charliermarsh/ruff/pull/1709) - Revert "Include list of fixed files in `stderr` output ([#​1701](https://togithub.com/charliermarsh/ruff/issues/1701))" by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1711](https://togithub.com/charliermarsh/ruff/pull/1711) **Full Changelog**: astral-sh/ruff@v0.0.212...v0.0.213 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/ixm-one/pytest-cmake-presets). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC44NC4yIiwidXBkYXRlZEluVmVyIjoiMzQuODQuMiJ9--> Signed-off-by: Renovate Bot <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
suleymanozkeskin
added a commit
to suleymanozkeskin/ruff-ty-typeis-fix
that referenced
this pull request
Dec 1, 2025
Fixes astral-sh#1703 Fixes incomplete type narrowing when using TypeIs with generic union types like: Result[T, E] = Ok[T] | Err[E]. Previously, type parameter E was materialized to 'object' before specialization could substitute it with concrete types like Exception, causing narrowing to produce Err[Unknown] instead of Err[Exception]. Changes: - Added is_materialized flag to TypeIsType to defer materialization - Implemented class-based union element matching for multi-typevar unions in generics.rs - Modified TypeIs creation to delay materialization until after specialization - Added test case for generic TypeIs narrowing to type_guards.md - Removed the comments which had a discussion about: astral-sh#20591
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
main_native.rsis a module ofmain.rs, so the#![allow()]s in the latter apply to the former automatically.