Skip to content

Format Compare Op#5292

Merged
MichaReiser merged 1 commit intomainfrom
06-21-Format_Compare_Op
Jun 23, 2023
Merged

Format Compare Op#5292
MichaReiser merged 1 commit intomainfrom
06-21-Format_Compare_Op

Conversation

@MichaReiser
Copy link
Member

Summary

This PR adds basic formatting for compare operations.

The implementation currently breaks diffeently when nesting binary like expressions. I haven't yet figured out what Black's logic is in that case but I think that this by itself is already an improvement worth merging.

Test Plan

I added a few new tests

@MichaReiser
Copy link
Member Author

MichaReiser commented Jun 22, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@MichaReiser MichaReiser linked an issue Jun 22, 2023 that may be closed by this pull request
@MichaReiser MichaReiser marked this pull request as draft June 22, 2023 08:59
@MichaReiser MichaReiser changed the base branch from main to format-class-def June 22, 2023 09:08
@MichaReiser MichaReiser force-pushed the 06-21-Format_Compare_Op branch from 2aa2c90 to 1d37faf Compare June 22, 2023 09:08
@MichaReiser MichaReiser force-pushed the 06-21-Format_Compare_Op branch from 1d37faf to f809554 Compare June 22, 2023 09:09
Base automatically changed from format-class-def to main June 22, 2023 09:09
@MichaReiser MichaReiser force-pushed the 06-21-Format_Compare_Op branch from f809554 to 895d416 Compare June 22, 2023 09:13
@github-actions
Copy link
Contributor

github-actions bot commented Jun 22, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.00      6.6±0.01ms     6.2 MB/sec    1.00      6.6±0.02ms     6.2 MB/sec
formatter/numpy/ctypeslib.py               1.00   1447.8±4.35µs    11.5 MB/sec    1.02   1474.8±2.93µs    11.3 MB/sec
formatter/numpy/globals.py                 1.00    161.9±0.17µs    18.2 MB/sec    1.01    163.4±2.18µs    18.1 MB/sec
formatter/pydantic/types.py                1.00      3.4±0.00ms     7.6 MB/sec    1.01      3.4±0.00ms     7.5 MB/sec
linter/all-rules/large/dataset.py          1.00     13.0±0.12ms     3.1 MB/sec    1.00     13.0±0.06ms     3.1 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      3.3±0.00ms     5.0 MB/sec    1.00      3.3±0.01ms     5.1 MB/sec
linter/all-rules/numpy/globals.py          1.00    429.5±0.49µs     6.9 MB/sec    1.00    428.0±0.61µs     6.9 MB/sec
linter/all-rules/pydantic/types.py         1.00      5.8±0.01ms     4.4 MB/sec    1.03      5.9±0.08ms     4.3 MB/sec
linter/default-rules/large/dataset.py      1.00      6.6±0.01ms     6.2 MB/sec    1.01      6.6±0.03ms     6.1 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1465.4±3.79µs    11.4 MB/sec    1.01   1473.3±4.12µs    11.3 MB/sec
linter/default-rules/numpy/globals.py      1.00    167.1±0.20µs    17.7 MB/sec    1.01    168.5±2.12µs    17.5 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.0±0.00ms     8.4 MB/sec    1.01      3.0±0.01ms     8.4 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.15     12.9±0.48ms     3.1 MB/sec    1.00     11.3±0.62ms     3.6 MB/sec
formatter/numpy/ctypeslib.py               1.12      2.6±0.14ms     6.4 MB/sec    1.00      2.3±0.12ms     7.2 MB/sec
formatter/numpy/globals.py                 1.13   296.5±30.37µs    10.0 MB/sec    1.00   261.3±19.69µs    11.3 MB/sec
formatter/pydantic/types.py                1.21      6.2±0.38ms     4.1 MB/sec    1.00      5.1±0.22ms     5.0 MB/sec
linter/all-rules/large/dataset.py          1.00     20.4±0.84ms  2037.6 KB/sec    1.02     20.8±0.89ms  2003.6 KB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      5.5±0.22ms     3.0 MB/sec    1.03      5.7±0.26ms     2.9 MB/sec
linter/all-rules/numpy/globals.py          1.00   650.3±38.39µs     4.5 MB/sec    1.00   647.5±38.02µs     4.6 MB/sec
linter/all-rules/pydantic/types.py         1.04      9.6±0.54ms     2.6 MB/sec    1.00      9.3±0.41ms     2.8 MB/sec
linter/default-rules/large/dataset.py      1.00     11.2±0.56ms     3.6 MB/sec    1.01     11.3±0.40ms     3.6 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00      2.3±0.09ms     7.4 MB/sec    1.05      2.4±0.11ms     7.0 MB/sec
linter/default-rules/numpy/globals.py      1.01   276.6±15.47µs    10.7 MB/sec    1.00   275.0±13.04µs    10.7 MB/sec
linter/default-rules/pydantic/types.py     1.00      4.9±0.13ms     5.2 MB/sec    1.03      5.0±0.19ms     5.1 MB/sec

@MichaReiser MichaReiser marked this pull request as ready for review June 22, 2023 09:34
@MichaReiser MichaReiser force-pushed the 06-21-Format_Compare_Op branch from 895d416 to 54b2b11 Compare June 23, 2023 07:18
@MichaReiser MichaReiser merged commit 3e12bdf into main Jun 23, 2023
@MichaReiser MichaReiser deleted the 06-21-Format_Compare_Op branch June 23, 2023 07:35
@MichaReiser
Copy link
Member Author

@MichaReiser merged this pull request with Graphite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Formatter: Compare

2 participants