Skip to content

Commit

Permalink
Merge branch 'main' into zb/fix-get-set-dunder
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Feb 5, 2024
2 parents 1ae67f4 + b47f85e commit 49a9745
Show file tree
Hide file tree
Showing 136 changed files with 2,784 additions and 1,158 deletions.
50 changes: 25 additions & 25 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ indicatif ={ version = "0.17.7"}
indoc ={ version = "2.0.4"}
insta = { version = "1.34.0", feature = ["filters", "glob"] }
insta-cmd = { version = "0.4.0" }
is-macro = { version = "0.3.4" }
is-macro = { version = "0.3.5" }
is-wsl = { version = "0.4.0" }
itertools = { version = "0.12.0" }
itertools = { version = "0.12.1" }
js-sys = { version = "0.3.67" }
lalrpop-util = { version = "0.20.0", default-features = false }
lexical-parse-float = { version = "0.8.0", features = ["format"] }
libcst = { version = "1.1.0", default-features = false }
log = { version = "0.4.17" }
memchr = { version = "2.6.4" }
memchr = { version = "2.7.1" }
mimalloc = { version ="0.1.39"}
natord = { version = "1.0.9" }
notify = { version = "6.1.1" }
Expand All @@ -65,7 +65,7 @@ pathdiff = { version = "0.2.1" }
pep440_rs = { version = "0.4.0", features = ["serde"] }
pretty_assertions = "1.3.0"
proc-macro2 = { version = "1.0.78" }
pyproject-toml = { version = "0.8.1" }
pyproject-toml = { version = "0.8.2" }
quick-junit = { version = "0.3.5" }
quote = { version = "1.0.23" }
rand = { version = "0.8.5" }
Expand Down Expand Up @@ -93,7 +93,7 @@ tempfile = { version ="3.9.0"}
test-case = { version = "3.3.1" }
thiserror = { version = "1.0.51" }
tikv-jemallocator = { version ="0.5.0"}
toml = { version = "0.8.8" }
toml = { version = "0.8.9" }
tracing = { version = "0.1.40" }
tracing-indicatif = { version = "0.3.6" }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@ def f(x):

s = f"{ set([x for x in 'ab']) | set([x for x in 'ab']) }"
s = f"{set([x for x in 'ab']) | set([x for x in 'ab'])}"

s = set( # comment
[x for x in range(3)]
)

s = set([ # comment
x for x in range(3)
])
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ def list():
f"{ dict(x='y') | dict(y='z') }"
f"a {dict(x='y') | dict(y='z')} b"
f"a { dict(x='y') | dict(y='z') } b"

dict(
# comment
)

tuple( # comment
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
t5 = tuple(
(1, 2)
)

tuple( # comment
[1, 2]
)

tuple([ # comment
1, 2
])
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@
l2 = list((1, 2))
l3 = list([])
l4 = list(())


list( # comment
[1, 2]
)

list([ # comment
1, 2
])
40 changes: 40 additions & 0 deletions crates/ruff_linter/resources/test/fixtures/flake8_return/RET505.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,43 @@ def bar9():
def sb(self):
if self._sb is not None: return self._sb
else: self._sb = '\033[01;%dm'; self._sa = '\033[0;0m';


def indent(x, y, w, z):
if x: # [no-else-return]
a = 1
return y
else:

c = 3
return z


def indent(x, y, w, z):
if x: # [no-else-return]
a = 1
return y
else:
# comment
c = 3
return z


def indent(x, y, w, z):
if x: # [no-else-return]
a = 1
return y
else:
# comment
c = 3
return z


def indent(x, y, w, z):
if x: # [no-else-return]
a = 1
return y
else:
# comment
c = 3
return z
10 changes: 10 additions & 0 deletions crates/ruff_linter/resources/test/fixtures/pyupgrade/UP036_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,13 @@ def g():

if sys.version_info[:3] > (3,13):
print("py3")

if sys.version_info > (3,0):
f"this is\
allowed too"

f"""the indentation on
this line is significant"""

"this is\
allowed too"
Loading

0 comments on commit 49a9745

Please sign in to comment.