Commit graph

26 commits

Author SHA1 Message Date
misrasaurabh1
198487bf81 format and lint all 2026-01-29 01:39:48 -08:00
Aseem Saxena
a7e3b3f2c1 None not supported for formatter commands 2025-11-11 22:02:25 -05:00
Aseem Saxena
410ef8e8fe inference test 2025-11-11 20:25:23 -05:00
Aseem Saxena
271b7ed789
Add test for isort skip file functionality 2025-10-15 20:12:10 -07:00
Kevin Turcios
be1ae9332b normalize paths and tmp_dir here too 2025-09-28 05:40:20 +00:00
Kevin Turcios
3c4573e22a Merge branch 'main' into part-1-windows-fixes 2025-09-27 21:02:06 -07:00
Sarthak Agarwal
a2825f95b5
formatting failure msg (#651)
* formatting failure msg

* fix

* make formatter optional in the optimizer only to not break other logic & fix unit tests

* small fix

* fix lint issue

---------

Co-authored-by: saga4 <saga4@codeflashs-MacBook-Air.local>
Co-authored-by: ali <mohammed18200118@gmail.com>
2025-08-17 10:37:41 +04:00
mohammed
3eee162d41
fix markdown context for formatting and more refactoring 2025-08-04 15:35:28 +03:00
mohammed
84324f8491
markdown multi context
Signed-off-by: mohammed <mohammed18200118@gmail.com>
2025-08-01 20:55:04 +03:00
Kevin Turcios
16d21e7464 reinsert 2025-07-29 23:49:22 -07:00
mohammed ahmed
10e8a1379e
Avoid formatting that causes large diffs (CF-637) (#274)
* check large diffs with black, and skipp formatting in such case (after optimizing)

* new line

* better log messages

* remove unnecessary check

* new line

* remove unused comment

* the max lines for formatting changes to 100

* refactoring

* refactoring and improvements

* added black as dev dependency

* made some refactor changes that codeflash suggested

* remove unused function

* formatting & using internal black dep

* fix black import issue

* handle formatting files with no formatting issues

* use user pre-defined formatting commands, instead of using black

* make sure format_code recieves file path as path type not as str

* formatting and linting

* typo

* revert lock file changes

* remove comment

* pass helper functions source code to the formatter for diff checking

* more unit tests

* enhancements

* Update formatter.py

add a todo comment

* Update formatter.py

Fix ruff lint

---------

Co-authored-by: Sarthak Agarwal <sarthak.saga@gmail.com>
2025-06-10 16:04:25 +05:30
Kevin Turcios
d28031f174 ruff check . 2025-02-28 19:21:22 -08:00
Saurabh Misra
fca210e8c2 remove project dependency on black 2024-12-18 12:53:03 -08:00
Kevin Turcios
72793a955c fix tests 2 2024-11-28 19:17:15 -05:00
Saurabh Misra
265ad6aafc Return the original code if the formatter fails. Don't delete the entire file from the PR 2024-11-11 23:23:55 -08:00
Saurabh Misra
d455cdee1a Ruff reformat and fix all the python files
Set minimum libcst version to be 1.0.1
move the stub files to dev dependencies
2024-10-25 15:45:44 -07:00
Kevin Turcios
fae10f6c9c round three 2024-10-12 19:40:07 -05:00
Kevin Turcios
5cd94cdf64 round 1 2024-10-12 17:29:15 -05:00
afik.cohen
e216ef8240 Fix bug with formatter_cmds default not being applied correctly when not present 2024-06-11 14:49:00 -07:00
Saurabh Misra
740162e4a6 Factor out the use of sort_imports away from format_code 2024-06-06 13:45:23 -07:00
Saurabh Misra
585a78829f imports sorting always defaults to isort or is disabled 2024-06-04 19:23:11 -07:00
Saurabh Misra
aaeccd21f8 Allow more complete support for running linters/formatters
We should now support ruff
2024-06-04 16:53:23 -07:00
Saurabh Misra
cf88e2b7d0 Make cli and django all RUFF and TUFF 2024-04-17 19:41:00 -07:00
ihitamandal
7973db5372 Add more test cases and modify import sorting 2024-03-28 16:59:13 -07:00
ihitamandal
fa62286fb6 Reformat import sorting code 2024-03-28 12:04:37 -07:00
ihitamandal
f28f9260a2 Add tests for sorting and deduplicating imports 2024-03-27 15:41:03 -07:00