Closed Jonas1312 closed 1 year ago
Can you try adding the notebook extensions to extend-include
(doc)
[tool.ruff]
extend-include = ["*.ipynb"]
Can you try adding the notebook extensions to
extend-include
(doc)[tool.ruff] extend-include = ["*.ipynb"]
ruff.....................................................................Passed
ruff-format..............................................................Failed
- hook id: ruff-format
- exit code: 2
warning: The following rules may cause conflicts when used with the formatter: 'COM819', 'D206', 'ISC001', 'Q000', 'Q001', 'Q002', 'Q003', 'W191'. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding then to the `ignore` configuration.
warning: The following rules may cause conflicts when used with the formatter: 'COM819', 'D206', 'ISC001', 'Q000', 'Q001', 'Q002', 'Q003', 'W191'. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding then to the `ignore` configuration.
error: Failed to format recipes/basic_project_setup.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/counterfactual_data_augmentation.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 18, source_path: "<filename>" }
error: Failed to format recipes/export_a_kili_project.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/finetuning_dinov2.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/finetuning_openai.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/finetuning_openai_summaries.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Exclamation, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/frame_dicom_data.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/geojson.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/import_text_assets.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/importing_assets_and_metadata.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/importing_coco.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/importing_labels.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/importing_pdf_assets.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/importing_video_assets.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/inference_labels.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/label_parsing.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/medical_imaging.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/ner_pre_annotations_openai.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/ocr_pre_annotations.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/pixel_level_masks.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/plugins_development.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/plugins_example.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/plugins_example_document.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/set_up_workflows.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/tagtog_to_kili.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
error: Failed to format recipes/webhooks_example.ipynb: source contains syntax errors: ParseError { error: UnrecognizedToken(Percent, None), offset: 0, source_path: "<filename>" }
401 files left unchanged
Interesting. @dhruvmanila any ideas? Could it be that we don't correctly set the parsing mode?
Yeah, that's correct. Let me send in a patch quickly.
Thanks for opening this issue! It's fixed and will be available in the next release.
@dhruvmanila Thanks for fixing this! I'm curious when the the next release will be available.
I can probably cut a release tomorrow.
Hi,
I tried the new ruff formatter on my notebooks through a pre-commit config:
But I get these errors:
Here is the pyproject.toml:
And the notebooks: https://github.com/kili-technology/kili-python-sdk/tree/main/recipes
Thanks a lot!