Skip to content

Commit 7b88498

Browse files
authored
Cleanup init files (#56)
1 parent ba4bcef commit 7b88498

File tree

16 files changed

+26
-127
lines changed

16 files changed

+26
-127
lines changed

src/launchpad/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
1-
"""Launchpad - CLI tool for analyzing Apple and Android app bundle sizes."""
2-
31
__version__ = "0.0.1"
4-
5-
from .models import FileAnalysis
6-
7-
__all__ = [
8-
"FileAnalysis",
9-
]
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
"""Analyzers for different platforms."""
2-
3-
from .android import AndroidAnalyzer
4-
from .apple import AppleAppAnalyzer
5-
6-
__all__ = ["AndroidAnalyzer", "AppleAppAnalyzer"]

src/launchpad/analyzers/android.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
import time
44
from datetime import datetime, timezone
55

6-
from ..artifacts import AAB, APK, AndroidArtifact, ZippedAAB, ZippedAPK
6+
from ..artifacts.android.aab import AAB
7+
from ..artifacts.android.apk import APK
8+
from ..artifacts.android.zipped_aab import ZippedAAB
9+
from ..artifacts.android.zipped_apk import ZippedAPK
10+
from ..artifacts.artifact import AndroidArtifact
711
from ..models.android import AndroidAnalysisResults, AndroidAppInfo
812
from ..models.common import FileAnalysis, FileInfo
913
from ..models.treemap import FILE_TYPE_TO_TREEMAP_TYPE, TreemapType

src/launchpad/analyzers/apple.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010

1111
import lief
1212

13-
from ..artifacts import AppleArtifact, ZippedXCArchive
13+
from ..artifacts.apple.zipped_xcarchive import ZippedXCArchive
14+
from ..artifacts.artifact import AppleArtifact
1415
from ..insights.common import DuplicateFilesInsight
1516
from ..insights.insight import InsightsInput
16-
from ..models import AppleAnalysisResults, AppleAppInfo, FileAnalysis, FileInfo, MachOBinaryAnalysis
17-
from ..models.apple import AppleInsightResults
17+
from ..models.apple import AppleAnalysisResults, AppleAppInfo, AppleInsightResults, MachOBinaryAnalysis
18+
from ..models.common import FileAnalysis, FileInfo
1819
from ..models.treemap import FILE_TYPE_TO_TREEMAP_TYPE, TreemapType
1920
from ..parsers.apple.macho_parser import MachOParser
2021
from ..parsers.apple.range_mapping_builder import RangeMappingBuilder
Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +0,0 @@
1-
from .android.aab import AAB
2-
from .android.apk import APK
3-
from .android.manifest.axml import AxmlUtils, BinaryXmlParser
4-
from .android.manifest.manifest import AndroidManifest
5-
from .android.resources.binary import BinaryResourceTable
6-
from .android.zipped_aab import ZippedAAB
7-
from .android.zipped_apk import ZippedAPK
8-
from .apple.zipped_xcarchive import ZippedXCArchive
9-
from .artifact import AndroidArtifact, AppleArtifact, Artifact
10-
from .artifact_factory import ArtifactFactory
11-
from .providers.zip_provider import ZipProvider
12-
13-
__all__ = [
14-
"AAB",
15-
"APK",
16-
"ArtifactFactory",
17-
"Artifact",
18-
"AndroidArtifact",
19-
"AxmlUtils",
20-
"AndroidManifest",
21-
"BinaryResourceTable",
22-
"BinaryXmlParser",
23-
"AppleArtifact",
24-
"ZipProvider",
25-
"ZippedAPK",
26-
"ZippedAAB",
27-
"ZippedXCArchive",
28-
]

src/launchpad/cli.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
"""Command-line interface for launchpad."""
2-
31
from __future__ import annotations
42

53
import asyncio
@@ -18,8 +16,11 @@
1816
from . import __version__
1917
from .analyzers.android import AndroidAnalyzer
2018
from .analyzers.apple import AppleAppAnalyzer
21-
from .artifacts import AndroidArtifact, AppleArtifact, ArtifactFactory
22-
from .models import AndroidAnalysisResults, AppleAnalysisResults, FileAnalysis
19+
from .artifacts.artifact import AndroidArtifact, AppleArtifact
20+
from .artifacts.artifact_factory import ArtifactFactory
21+
from .models.android import AndroidAnalysisResults
22+
from .models.apple import AppleAnalysisResults
23+
from .models.common import FileAnalysis
2324
from .service import run_service
2425
from .utils.logging import setup_logging
2526

src/launchpad/models/__init__.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +0,0 @@
1-
"""Data models for app size analysis results."""
2-
3-
# Import common models that are shared across platforms
4-
# Import Android models (placeholders for now)
5-
from .android import AndroidAnalysisResults, AndroidAppInfo
6-
7-
# Import Apple-specific models
8-
from .apple import ( # Backwards compatibility aliases
9-
AppleAnalysisResults,
10-
AppleAppInfo,
11-
MachOBinaryAnalysis,
12-
SwiftMetadata,
13-
)
14-
from .common import BaseAnalysisResults, BaseAppInfo, BaseBinaryAnalysis, FileAnalysis, FileInfo, SymbolInfo
15-
from .range_mapping import BinaryTag, Range, RangeConflict, RangeMap
16-
from .treemap import TreemapElement, TreemapResults, TreemapType
17-
18-
__all__ = [
19-
# Common models
20-
"FileInfo",
21-
"SymbolInfo",
22-
"FileAnalysis",
23-
"BaseAppInfo",
24-
"BaseBinaryAnalysis",
25-
"BaseAnalysisResults",
26-
# Apple-specific models
27-
"SwiftMetadata",
28-
"AppleAppInfo",
29-
"MachOBinaryAnalysis",
30-
"AppleAnalysisResults",
31-
# Android models
32-
"AndroidAppInfo",
33-
"AndroidAnalysisResults",
34-
# Range mapping models
35-
"BinaryTag",
36-
"Range",
37-
"RangeConflict",
38-
"RangeMap",
39-
# Treemap models
40-
"TreemapType",
41-
"TreemapElement",
42-
"TreemapResults",
43-
]

src/launchpad/models/apple.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77
from pydantic import BaseModel, ConfigDict, Field
88

9-
from launchpad.models.insights import DuplicateFilesInsightResult
10-
119
from .common import BaseAnalysisResults, BaseAppInfo, BaseBinaryAnalysis
10+
from .insights import DuplicateFilesInsightResult
1211
from .range_mapping import RangeMap
1312

1413

src/launchpad/models/insights.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from pydantic import BaseModel, ConfigDict, Field
44

5-
from launchpad.models.common import FileInfo
5+
from .common import FileInfo
66

77

88
class BaseInsightResult(BaseModel):

src/launchpad/parsers/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
from .android.android_binary_parser import AndroidBinaryParser
2-
from .apple.macho_parser import MachOParser
3-
from .apple.range_mapping_builder import RangeMappingBuilder
4-
from .buffer_wrapper import BufferWrapper
5-
6-
__all__ = ["AndroidBinaryParser", "BufferWrapper", "MachOParser", "RangeMappingBuilder"]

0 commit comments

Comments
 (0)