Skip to content

Commit

Permalink
Merge branch 'main' into feature/PERF403
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Sep 1, 2023
2 parents c62af56 + 08e2467 commit b5aadb8
Show file tree
Hide file tree
Showing 89 changed files with 10,732 additions and 8,406 deletions.
546 changes: 252 additions & 294 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ Ruff is used by a number of major open-source projects and companies, including:
- [Pydantic](https://github.com/pydantic/pydantic)
- [Pylint](https://github.com/PyCQA/pylint)
- [Reflex](https://github.com/reflex-dev/reflex)
- [Rippling](https://rippling.com)
- [Robyn](https://github.com/sansyrox/robyn)
- Scale AI ([Launch SDK](https://github.com/scaleapi/launch-python-client))
- Snowflake ([SnowCLI](https://github.com/Snowflake-Labs/snowcli))
Expand Down
12 changes: 8 additions & 4 deletions crates/ruff/resources/test/fixtures/flake8_pyi/PYI010.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ def bar():


def foo():
"""foo""" # OK
"""foo""" # OK, docstrings are handled by another rule


def buzz():
print("buzz") # OK, not in stub file
print("buzz") # ERROR PYI010


def foo2():
123 # OK, not in a stub file
123 # ERROR PYI010


def bizz():
x = 123 # OK, not in a stub file
x = 123 # ERROR PYI010


def foo3():
pass # OK, pass is handled by another rule
5 changes: 4 additions & 1 deletion crates/ruff/resources/test/fixtures/flake8_pyi/PYI010.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def bar(): ... # OK
def foo():
"""foo""" # OK, strings are handled by another rule
"""foo""" # OK, docstrings are handled by another rule

def buzz():
print("buzz") # ERROR PYI010
Expand All @@ -10,3 +10,6 @@ def foo2():

def bizz():
x = 123 # ERROR PYI010

def foo3():
pass # OK, pass is handled by another rule
18 changes: 13 additions & 5 deletions crates/ruff/resources/test/fixtures/flake8_pyi/PYI048.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
def bar(): # OK
...
def bar():
... # OK


def oof(): # OK, docstrings are handled by another rule
def bar():
pass # OK


def bar():
"""oof""" # OK


def oof(): # ERROR PYI048
"""oof"""
print("foo")


def foo(): # Ok not in Stub file
def foo(): # ERROR PYI048
"""foo"""
print("foo")
print("foo")


def buzz(): # Ok not in Stub file
def buzz(): # ERROR PYI048
print("fizz")
print("buzz")
print("test")
18 changes: 9 additions & 9 deletions crates/ruff/resources/test/fixtures/flake8_pyi/PYI048.pyi
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
def bar(): ... # OK
def bar():
... # OK


def oof(): # OK, docstrings are handled by another rule
"""oof"""
print("foo")
pass # OK

def bar():
"""oof""" # OK

def oof(): # ERROR PYI048
"""oof"""
print("foo")

def foo(): # ERROR PYI048
def foo(): # ERROR PYI048
"""foo"""
print("foo")
print("foo")


def buzz(): # ERROR PYI048
def buzz(): # ERROR PYI048
print("fizz")
print("buzz")
print("test")
Loading

0 comments on commit b5aadb8

Please sign in to comment.