Skip to content

Commit

Permalink
Enable RUF022 to automatically sort __all__
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmbmb committed Dec 13, 2024
1 parent a8588fd commit cf28976
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 82 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ exclude = ["docs"]
[tool.ruff.lint]
select = ["E", "W", "F", "I", "C", "B"]
ignore = ["E501", "B905", "B008"]
extend-select = ["RUF022"]

[tool.pytest.ini_options]
testpaths = ["tests"]
22 changes: 11 additions & 11 deletions src/distilabel/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@


__all__ = [
"DISTILABEL_METADATA_KEY",
"BASE_CACHE_DIR",
"PIPELINES_CACHE_DIR",
"STEP_ATTR_NAME",
"CONVERGENCE_STEP_ATTR_NAME",
"DISTILABEL_DOCS_URL",
"DISTILABEL_METADATA_KEY",
"DISTISET_ARTIFACTS_FOLDER",
"DISTISET_CONFIG_FOLDER",
"INPUT_QUEUE_ATTR_NAME",
"LAST_BATCH_SENT_FLAG",
"PIPELINES_CACHE_DIR",
"PIPELINE_CONFIG_FILENAME",
"PIPELINE_LOG_FILENAME",
"RECEIVES_ROUTED_BATCHES_ATTR_NAME",
"ROUTING_BATCH_FUNCTION_ATTR_NAME",
"CONVERGENCE_STEP_ATTR_NAME",
"LAST_BATCH_SENT_FLAG",
"SIGINT_HANDLER_CALLED_ENV_NAME",
"STEPS_OUTPUTS_PATH",
"STEPS_ARTIFACTS_PATH",
"DISTISET_CONFIG_FOLDER",
"DISTISET_ARTIFACTS_FOLDER",
"PIPELINE_CONFIG_FILENAME",
"PIPELINE_LOG_FILENAME",
"DISTILABEL_DOCS_URL",
"STEPS_OUTPUTS_PATH",
"STEP_ATTR_NAME",
]
12 changes: 6 additions & 6 deletions src/distilabel/llms.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,26 @@
from distilabel.models.mixins.cuda_device_placement import CudaDevicePlacementMixin

__all__ = [
"LLM",
"AnthropicLLM",
"AnyscaleLLM",
"AzureOpenAILLM",
"LLM",
"AsyncLLM",
"AzureOpenAILLM",
"ClientvLLM",
"CohereLLM",
"CudaDevicePlacementMixin",
"GenerateOutput",
"GroqLLM",
"HiddenState",
"InferenceEndpointsLLM",
"LiteLLM",
"LlamaCppLLM",
"MistralLLM",
"CudaDevicePlacementMixin",
"MixtureOfAgentsLLM",
"OllamaLLM",
"OpenAILLM",
"TogetherLLM",
"TransformersLLM",
"GenerateOutput",
"HiddenState",
"VertexAILLM",
"ClientvLLM",
"vLLM",
]
16 changes: 8 additions & 8 deletions src/distilabel/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,29 @@
from distilabel.models.mixins.cuda_device_placement import CudaDevicePlacementMixin

__all__ = [
"LLM",
"AnthropicLLM",
"AnyscaleLLM",
"AzureOpenAILLM",
"LLM",
"AsyncLLM",
"AzureOpenAILLM",
"ClientvLLM",
"CohereLLM",
"CudaDevicePlacementMixin",
"Embeddings",
"GenerateOutput",
"GroqLLM",
"HiddenState",
"InferenceEndpointsLLM",
"LiteLLM",
"LlamaCppLLM",
"MistralLLM",
"CudaDevicePlacementMixin",
"MixtureOfAgentsLLM",
"OllamaLLM",
"OpenAILLM",
"SentenceTransformerEmbeddings",
"TogetherLLM",
"TransformersLLM",
"GenerateOutput",
"HiddenState",
"VertexAILLM",
"ClientvLLM",
"vLLM",
"Embeddings",
"SentenceTransformerEmbeddings",
"vLLMEmbeddings",
]
12 changes: 6 additions & 6 deletions src/distilabel/models/llms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,26 @@
from distilabel.models.mixins.cuda_device_placement import CudaDevicePlacementMixin

__all__ = [
"LLM",
"AnthropicLLM",
"AnyscaleLLM",
"AzureOpenAILLM",
"LLM",
"AsyncLLM",
"AzureOpenAILLM",
"ClientvLLM",
"CohereLLM",
"CudaDevicePlacementMixin",
"GenerateOutput",
"GroqLLM",
"HiddenState",
"InferenceEndpointsLLM",
"LiteLLM",
"LlamaCppLLM",
"MistralLLM",
"CudaDevicePlacementMixin",
"MixtureOfAgentsLLM",
"OllamaLLM",
"OpenAILLM",
"TogetherLLM",
"TransformersLLM",
"GenerateOutput",
"HiddenState",
"VertexAILLM",
"ClientvLLM",
"vLLM",
]
2 changes: 1 addition & 1 deletion src/distilabel/pipeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
)

__all__ = [
"InstructionResponsePipeline",
"Pipeline",
"RayPipeline",
"InstructionResponsePipeline",
"routing_batch_function",
"sample_n_steps",
]
44 changes: 22 additions & 22 deletions src/distilabel/steps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,42 +58,42 @@
from distilabel.steps.typing import GeneratorStepOutput, StepOutput

__all__ = [
"PreferenceToArgilla",
"TextGenerationToArgilla",
"GeneratorStep",
"GlobalStep",
"Step",
"StepInput",
"StepResources",
"CombineOutputs",
"ExpandColumns",
"CombineColumns",
"GroupColumns",
"KeepColumns",
"MergeColumns",
"DBSCAN",
"UMAP",
"TextClustering",
"step",
"CombineColumns",
"CombineOutputs",
"ConversationTemplate",
"DataSampler",
"DeitaFiltering",
"EmbeddingDedup",
"EmbeddingGeneration",
"ExpandColumns",
"FaissNearestNeighbour",
"ConversationTemplate",
"FormatChatGenerationDPO",
"FormatTextGenerationDPO",
"FormatChatGenerationSFT",
"FormatTextGenerationDPO",
"FormatTextGenerationSFT",
"GeneratorStep",
"GeneratorStepOutput",
"GlobalStep",
"GroupColumns",
"KeepColumns",
"LoadDataFromDicts",
"DataSampler",
"LoadDataFromDisk",
"LoadDataFromFileSystem",
"LoadDataFromHub",
"EmbeddingDedup",
"MergeColumns",
"MinHashDedup",
"make_generator_step",
"PreferenceToArgilla",
"PushToHub",
"RewardModelScore",
"TruncateTextColumn",
"GeneratorStepOutput",
"Step",
"StepInput",
"StepOutput",
"StepResources",
"TextClustering",
"TextGenerationToArgilla",
"TruncateTextColumn",
"make_generator_step",
"step",
]
36 changes: 18 additions & 18 deletions src/distilabel/steps/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,47 +60,47 @@
from distilabel.steps.tasks.urial import URIAL

__all__ = [
"GeneratorTask",
"Task",
"ArgillaLabeller",
"CLAIR",
"URIAL",
"APIGenExecutionChecker",
"APIGenGenerator",
"APIGenSemanticChecker",
"ArgillaLabeller",
"BitextRetrievalGenerator",
"ChatGeneration",
"ChatItem",
"ChatType",
"ComplexityScorer",
"task",
"EvolInstruct",
"EmbeddingTaskGenerator",
"EvolComplexity",
"EvolComplexityGenerator",
"EvolInstruct",
"EvolInstructGenerator",
"EvolQuality",
"FormatPRM",
"GenerateEmbeddings",
"Genstruct",
"BitextRetrievalGenerator",
"EmbeddingTaskGenerator",
"GenerateLongTextMatchingData",
"GenerateSentencePair",
"GenerateShortTextMatchingData",
"GenerateTextClassificationData",
"GenerateTextRetrievalData",
"MonolingualTripletGenerator",
"GeneratorTask",
"Genstruct",
"InstructionBacktranslation",
"Magpie",
"MagpieGenerator",
"MathShepherdGenerator",
"MathShepherdCompleter",
"FormatPRM",
"MathShepherdGenerator",
"MonolingualTripletGenerator",
"PairRM",
"PrometheusEval",
"QualityScorer",
"SelfInstruct",
"GenerateSentencePair",
"StructuredGeneration",
"Task",
"TextClassification",
"ChatGeneration",
"TextGeneration",
"ChatItem",
"ChatType",
"CLAIR",
"UltraFeedback",
"URIAL",
"TextGenerationWithImage",
"UltraFeedback",
"task",
]
20 changes: 10 additions & 10 deletions src/distilabel/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@
from distilabel.steps.typing import GeneratorStepOutput, StepColumns, StepOutput

__all__ = [
"GenerateOutput",
"DownstreamConnectable",
"DownstreamConnectableSteps",
"InputDataset",
"PipelineRuntimeParametersInfo",
"StepLoadStatus",
"UpstreamConnectableSteps",
"ChatItem",
"ChatType",
"DownstreamConnectable",
"DownstreamConnectableSteps",
"FormattedInput",
"GenerateOutput",
"GeneratorStepOutput",
"InputDataset",
"InstructorStructuredOutputType",
"OutlinesStructuredOutputType",
"PipelineRuntimeParametersInfo",
"StandardInput",
"StructuredInput",
"StructuredOutputType",
"GeneratorStepOutput",
"StepColumns",
"StepLoadStatus",
"StepOutput",
"StructuredInput",
"StructuredOutputType",
"UpstreamConnectableSteps",
]

0 comments on commit cf28976

Please sign in to comment.