Commit 70ed8b6
authored
chore: use ruff linter and formatter (#1351)
* chore(pre-commit): switch to ruff for linting and formatting
Replace isort and black with ruff and ruff-format in pre-commit config.
Update hooks to use ruff for both linting and formatting, specifying
versions v0.9.6 and v0.11.2. Remove isort and black hooks, and keep
other hooks unchanged.
* feat(imports): add utilities for optional dependencies
Introduced a new `imports.py` module providing utilities to handle optional
dependencies. This includes functions for importing optional modules with
customizable error handling, checking for their presence, and version
validation. Also added a mapping for commonly used optional dependencies
and a helper to retrieve them with predefined settings.1 parent 0a40c61 commit 70ed8b6
File tree
383 files changed
+5731
-11132
lines changed- docs
- colang-2/examples
- getting-started
- 1-hello-world
- 2-core-colang-concepts
- 4-input-rails
- 5-output-rails
- 6-topical-rails
- 7-rag
- 8-tracing
- user-guides
- detailed-logging
- input-output-rails-only
- jailbreak-detection-heuristics
- langchain
- chain-with-guardrails
- runnable-as-action
- llm
- nvidia-ai-endpoints
- vertexai
- multi-config-api
- examples
- configs
- content_safety_vision
- gs_content_safety
- injection_detection
- llm
- hf_pipeline_dolly
- hf_pipeline_falcon
- hf_pipeline_llama2
- hf_pipeline_mosaic
- hf_pipeline_vicuna
- rag
- multi_kb
- pinecone
- tracing
- notebooks
- scripts
- langchain
- nemoguardrails
- actions_server
- actions
- langchain
- llm
- v2_x
- validation
- benchmark
- mock_llm_server
- cli
- colang
- v1_0
- lang
- runtime
- v2_x
- lang
- runtime
- embeddings
- providers
- evaluate
- cli
- data
- factchecking
- moderation
- topical
- eval
- ui
- pages
- integrations/langchain
- kb
- library
- activefence
- ai_defense
- attention
- autoalign
- clavata
- cleanlab
- factchecking/align_score
- fiddler
- gcp_moderate_text
- guardrails_ai
- hallucination
- injection_detection
- jailbreak_detection
- heuristics
- model_based
- llama_guard
- pangea
- patronusai
- privateai
- prompt_security
- self_check
- facts
- input_check
- output_check
- sensitive_data_detection
- trend_micro
- llm
- cache
- models
- providers
- huggingface
- trtllm
- logging
- rails
- llm
- server
- datastore
- tracing
- adapters
- qa
- tests
- benchmark
- cli
- colang/parser
- v2_x
- eval
- llm_providers
- rails/llm
- runnable_rails
- test_configs
- parallel_rails
- with_custom_action
- with_custom_llm
- tracing
- adapters
- spans
- v2_x
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
383 files changed
+5731
-11132
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
| 197 | + | |
200 | 198 | | |
201 | 199 | | |
202 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
640 | | - | |
641 | | - | |
642 | | - | |
| 640 | + | |
643 | 641 | | |
644 | 642 | | |
645 | 643 | | |
| |||
809 | 807 | | |
810 | 808 | | |
811 | 809 | | |
812 | | - | |
813 | | - | |
814 | | - | |
| 810 | + | |
815 | 811 | | |
816 | 812 | | |
817 | 813 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
0 commit comments