Skip to content

Commit

Permalink
Merge branch 'main' into dict-iter-without-items
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Feb 9, 2024
2 parents 695cb36 + b4f2882 commit 76d85ec
Show file tree
Hide file tree
Showing 143 changed files with 4,319 additions and 1,154 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ jobs:
tool: cargo-insta
- uses: Swatinem/rust-cache@v2
- name: "Run tests"
run: cargo insta test --all --exclude ruff_dev --all-features --unreferenced reject
- name: "Run dev tests"
# e.g. generating the schema — these should not run with all features enabled
run: cargo insta test -p ruff_dev --unreferenced reject
run: cargo insta test --all --all-features --unreferenced reject
# Check for broken links in the documentation.
- run: cargo doc --all --no-deps
env:
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions crates/ruff_formatter/src/printer/line_suffixes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ impl<'a> LineSuffixes<'a> {
/// Takes all the pending line suffixes.
pub(super) fn take_pending<'l>(
&'l mut self,
) -> impl Iterator<Item = LineSuffixEntry<'a>> + DoubleEndedIterator + 'l + ExactSizeIterator
{
) -> impl DoubleEndedIterator<Item = LineSuffixEntry<'a>> + 'l + ExactSizeIterator {
self.suffixes.drain(..)
}

Expand Down
22 changes: 22 additions & 0 deletions crates/ruff_linter/resources/test/fixtures/flake8_bandit/S308.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from django.utils.safestring import mark_safe


def some_func():
return mark_safe('<script>alert("evil!")</script>')


@mark_safe
def some_func():
return '<script>alert("evil!")</script>'


from django.utils.html import mark_safe


def some_func():
return mark_safe('<script>alert("evil!")</script>')


@mark_safe
def some_func():
return '<script>alert("evil!")</script>'
Loading

0 comments on commit 76d85ec

Please sign in to comment.