From 173f41a40848d55595fb3f63fe998df4463d5fe5 Mon Sep 17 00:00:00 2001 From: Robin Quintero Date: Mon, 28 Oct 2024 16:34:46 -0500 Subject: [PATCH] feat(build): #52 improve usability of the package - Make it easier to use the package by importing the main functions and types directly. --- complexipy/__init__.py | 18 ++++++++++++++++++ tests/main.py | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/complexipy/__init__.py b/complexipy/__init__.py index e69de29..2ace38b 100644 --- a/complexipy/__init__.py +++ b/complexipy/__init__.py @@ -0,0 +1,18 @@ +from complexipy.rust import ( + CodeComplexity, + FileComplexity, + FunctionComplexity, +) + +from .main import ( + code_complexity, + file_complexity, +) + +__all__ = [ + "CodeComplexity", + "FileComplexity", + "FunctionComplexity", + "code_complexity", + "file_complexity", +] diff --git a/tests/main.py b/tests/main.py index 3002204..c64061a 100644 --- a/tests/main.py +++ b/tests/main.py @@ -2,7 +2,10 @@ import unittest from pathlib import Path -from complexipy.main import file_complexity, code_complexity +from complexipy import ( + file_complexity, + code_complexity, +) class TestFiles(unittest.TestCase):