-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement TRY002 and TRY003 #2135
Merged
charliermarsh
merged 4 commits into
astral-sh:main
from
karpa4o4:feat/tryceratops-TRY002
Jan 26, 2023
Merged
feat: implement TRY002 and TRY003 #2135
charliermarsh
merged 4 commits into
astral-sh:main
from
karpa4o4:feat/tryceratops-TRY002
Jan 26, 2023
Conversation
This file contains 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
karpa4o4
force-pushed
the
feat/tryceratops-TRY002
branch
2 times, most recently
from
January 24, 2023 16:39
d2c48ad
to
2f881e3
Compare
sbrugman
reviewed
Jan 24, 2023
|
||
|
||
def good(): | ||
raise MyException() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are extra test cases here:
https://github.com/guilatrova/tryceratops/blob/main/src/tests/samples/violations/call_raise_vanilla.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done.
karpa4o4
force-pushed
the
feat/tryceratops-TRY002
branch
2 times, most recently
from
January 25, 2023 19:30
ddb7173
to
0908bd1
Compare
karpa4o4
force-pushed
the
feat/tryceratops-TRY002
branch
2 times, most recently
from
January 25, 2023 19:55
8bc98c1
to
5dfd02d
Compare
karpa4o4
force-pushed
the
feat/tryceratops-TRY002
branch
from
January 25, 2023 19:58
5dfd02d
to
2c9099a
Compare
renovate bot
referenced
this pull request
in ixm-one/pytest-cmake-presets
Jan 27, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://github.com/charliermarsh/ruff) | `^0.0.235` -> `^0.0.236` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.236/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.236/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.236/compatibility-slim/0.0.235)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.236/confidence-slim/0.0.235)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.236`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.236) [Compare Source](https://github.com/charliermarsh/ruff/compare/v0.0.235...v0.0.236) #### What's Changed ##### Rules - feat: implement `TRY002` and `TRY003` by [@​karpa4o4](https://github.com/karpa4o4) in [https://github.com/charliermarsh/ruff/pull/2135](https://github.com/charliermarsh/ruff/pull/2135) - Implementing `TRY400` by [@​Flowake](https://github.com/Flowake) in [https://github.com/charliermarsh/ruff/pull/2115](https://github.com/charliermarsh/ruff/pull/2115) - Implement some rules from `flake8-logging-format` (`G`) by [@​edgarrmondragon](https://github.com/edgarrmondragon) in [https://github.com/charliermarsh/ruff/pull/2150](https://github.com/charliermarsh/ruff/pull/2150) ##### Settings - Add strictness setting for `flake8-typing-imports` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2221](https://github.com/charliermarsh/ruff/pull/2221) - Implement `exempt-modules` setting from flake8-type-checking by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2230](https://github.com/charliermarsh/ruff/pull/2230) ##### Bug fixes - flake8\_executable: Only match shebang at beginning of line by [@​andersk](https://github.com/andersk) in [https://github.com/charliermarsh/ruff/pull/2183](https://github.com/charliermarsh/ruff/pull/2183) - Don't flag B009/B010 if identifiers would be mangled by [@​sciyoshi](https://github.com/sciyoshi) in [https://github.com/charliermarsh/ruff/pull/2204](https://github.com/charliermarsh/ruff/pull/2204) - fix: --explain reporting the wrong linter by [@​not-my-profile](https://github.com/not-my-profile) in [https://github.com/charliermarsh/ruff/pull/2215](https://github.com/charliermarsh/ruff/pull/2215) - Preserve indentation when fixing via LibCST by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2223](https://github.com/charliermarsh/ruff/pull/2223) - Avoid erroneous class autofixes in indented blocks by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2226](https://github.com/charliermarsh/ruff/pull/2226) - Fix range for `try-consider-else` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2228](https://github.com/charliermarsh/ruff/pull/2228) - Avoid flagging blind exceptions with valid logging by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2232](https://github.com/charliermarsh/ruff/pull/2232) - Avoid removing trailing comments on `pass` statements by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2235](https://github.com/charliermarsh/ruff/pull/2235) - Allow `pytest` in shebang by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2237](https://github.com/charliermarsh/ruff/pull/2237) - Wrap return-bool-condition-directly fixes in bool() by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2240](https://github.com/charliermarsh/ruff/pull/2240) #### New Contributors - [@​Flowake](https://github.com/Flowake) made their first contribution in [https://github.com/charliermarsh/ruff/pull/2115](https://github.com/charliermarsh/ruff/pull/2115) - [@​henryiii](https://github.com/henryiii) made their first contribution in [https://github.com/charliermarsh/ruff/pull/2200](https://github.com/charliermarsh/ruff/pull/2200) - [@​sciyoshi](https://github.com/sciyoshi) made their first contribution in [https://github.com/charliermarsh/ruff/pull/2204](https://github.com/charliermarsh/ruff/pull/2204) **Full Changelog**: astral-sh/ruff@v0.0.235...v0.0.236 </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:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMTEuMSIsInVwZGF0ZWRJblZlciI6IjM0LjExMS4xIn0=--> Signed-off-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.
#2056