Charlie Marsh
1d756dc3a7
Move Python whitespace utilities into new ruff_python_whitespace
crate ( #4993 )
...
## Summary
`ruff_newlines` becomes `ruff_python_whitespace`, and includes the
existing "universal newline" handlers alongside the Python
whitespace-specific utilities.
2023-06-10 00:59:57 +00:00
Charlie Marsh
16d1e63a5e
Respect 'is not' operators split across newlines ( #4977 )
2023-06-09 05:07:45 +00:00
Charlie Marsh
58d08219e8
Allow re-assignments to __all__
( #4967 )
2023-06-08 17:19:56 +00:00
Micha Reiser
68969240c5
Format Function definitions ( #4951 )
2023-06-08 16:07:33 +00:00
Micha Reiser
39a1f3980f
Upgrade RustPython ( #4900 )
2023-06-08 05:53:14 +00:00
Micha Reiser
19abee086b
Introduce AnyFunctionDefinition
Node ( #4898 )
2023-06-06 20:37:46 +02:00
Charlie Marsh
d1b8fe6af2
Fix round-tripping of nested functions ( #4875 )
2023-06-05 16:13:08 -04:00
Charlie Marsh
8938b2d555
Use qualified_name
terminology in more structs for consistency ( #4873 )
2023-06-05 19:06:48 +00:00
Ryan Yang
72245960a1
implement E307 for pylint invalid str return type ( #4854 )
2023-06-05 17:54:15 +00:00
Micha Reiser
c89d2f835e
Add to AnyNode
and AnyNodeRef
conversion methods to AstNode
( #4783 )
2023-06-02 08:10:41 +02:00
qdegraaf
fcbf5c3fae
Add PYI034 for flake8-pyi
plugin ( #4764 )
2023-06-02 02:15:57 +00:00
Charlie Marsh
ab26f2dc9d
Use saturating_sub in more token-walking methods ( #4773 )
2023-06-01 17:16:32 -04:00
Micha Reiser
be31d71849
Correctly associate own-line comments in bodies ( #4671 )
2023-06-01 08:12:53 +02:00
Charlie Marsh
9d0ffd33ca
Move universal newline handling into its own crate ( #4729 )
2023-05-31 12:00:47 -04:00
Micha Reiser
6c1ff6a85f
Upgrade RustPython ( #4747 )
2023-05-31 08:26:35 +00:00
Charlie Marsh
f47a517e79
Enable callers to specify import-style preferences in Importer
( #4717 )
2023-05-30 16:46:19 +00:00
Charlie Marsh
ea31229be0
Track TYPE_CHECKING
blocks in Importer
( #4593 )
2023-05-30 16:18:10 +00:00
Micha Reiser
0cd453bdf0
Generic "comment to node" association logic ( #4642 )
2023-05-30 09:28:01 +00:00
Charlie Marsh
9741f788c7
Remove globals table from Scope
( #4686 )
2023-05-27 22:35:20 -04:00
Micha Reiser
33a7ed058f
Create PreorderVisitor
trait ( #4658 )
2023-05-26 06:14:08 +00:00
Charlie Marsh
0f610f2cf7
Remove dedicated ScopeKind structs in favor of AST nodes ( #4648 )
2023-05-25 19:31:02 +00:00
Micha Reiser
85f094f592
Improve Message
sorting performance ( #4624 )
2023-05-24 16:34:48 +02:00
Micha Reiser
2681c0e633
Add missing nodes to AnyNodeRef
and AnyNode
( #4608 )
2023-05-23 18:30:27 +02:00
Micha Reiser
154439728a
Add AnyNode
and AnyNodeRef
unions ( #4578 )
2023-05-23 08:53:22 +02:00
Micha Reiser
daadd24bde
Include decorators in Function
and Class
definition ranges ( #4467 )
2023-05-22 17:50:42 +02:00
Charlie Marsh
19c4b7bee6
Rename ruff_python_semantic's Context
struct to SemanticModel
( #4565 )
2023-05-22 02:35:03 +00:00
Micha Reiser
2f35099f81
Remove regex
dependency from ruff_python_ast
( #4518 )
2023-05-19 06:44:18 +00:00
Ville Skyttä
2e2ba2cb16
Avoid some false positives in dunder variable assigments ( #4508 )
2023-05-19 02:11:20 +00:00
Charlie Marsh
e9c6f16c56
Move unparse utility methods onto Generator ( #4497 )
2023-05-18 15:00:46 +00:00
Charlie Marsh
d3b18345c5
Move triple-quoted string detection into Indexer
method ( #4495 )
2023-05-18 14:42:05 +00:00
Charlie Marsh
73efbeb581
Invert quote-style when generating code within f-strings ( #4487 )
2023-05-18 14:33:33 +00:00
Charlie Marsh
e8e66f3824
Remove unnecessary path prefixes ( #4492 )
2023-05-18 10:19:09 -04:00
Charlie Marsh
14c6419bc1
Bring pycodestyle rules into full compatibility (on SciPy) ( #4472 )
2023-05-17 16:51:55 +00:00
Charlie Marsh
d9c3f8e249
Avoid flagging missing whitespace for decorators ( #4454 )
2023-05-16 13:15:01 -04:00
Charlie Marsh
7e0d018b35
Avoid emitting empty logical lines ( #4452 )
2023-05-16 16:33:33 +00:00
Jeong, YunWon
4b05ca1198
Specialize ConversionFlag ( #4450 )
2023-05-16 18:00:13 +02:00
Charlie Marsh
f0465bf106
Emit non-logical newlines for "empty" lines ( #4444 )
2023-05-16 14:58:56 +00:00
Jeong, YunWon
badade3ccc
Impl Default
for SourceLocation
( #4328 )
...
Co-authored-by: Micha Reiser <micha@reiser.io>
2023-05-16 07:03:43 +00:00
Micha Reiser
fa26860296
Refactor range from Attributed
to Node
s ( #4422 )
2023-05-16 06:36:32 +00:00
Jonathan Plasse
c10a4535b9
Disallow unreachable_pub
( #4314 )
2023-05-11 18:00:00 -04:00
Jeong, YunWon
be6e00ef6e
Re-integrate RustPython parser repository ( #4359 )
...
Co-authored-by: Micha Reiser <micha@reiser.io>
2023-05-11 07:47:17 +00:00
Charlie Marsh
fd34797d0f
Add a specialized StatementVisitor
( #4349 )
2023-05-10 12:42:20 -04:00
Micha Reiser
99a755f936
Add schemars
feature ( #4305 )
2023-05-09 16:15:18 +02:00
Charlie Marsh
c1f0661225
Replace parents
statement stack with a Nodes
abstraction ( #4233 )
2023-05-06 16:12:41 +00:00
Micha Reiser
e93f378635
Refactor whitespace around operator ( #4223 )
2023-05-05 09:37:56 +02:00
Jonathan Plasse
8c97e7922b
Fix F811 false positive with match ( #4161 )
2023-04-30 14:39:45 -04:00
Micha Reiser
e04ef42334
Use memchr
to speedup newline search on x86 ( #3985 )
2023-04-26 20:15:47 +01:00
Micha Reiser
f3e6ddda62
perf(logical-lines): Various small perf improvements ( #4022 )
2023-04-26 20:10:35 +01:00
Micha Reiser
cab65b25da
Replace row/column based Location
with byte-offsets. ( #3931 )
2023-04-26 18:11:02 +00:00
Jonathan Plasse
df77595426
Move Truthiness
into ruff_python_ast
( #4071 )
2023-04-24 04:54:31 +00:00