Skip to content

Commit

Permalink
Remove __init__ if redundant
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed Nasser committed Feb 14, 2025
1 parent 7533078 commit 74ef100
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 92 deletions.
14 changes: 0 additions & 14 deletions src/ostorlab/assets/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@ class Agent(asset.Asset):
docker_location: Optional[str] = None
yaml_file_location: Optional[str] = None

Check warning on line 18 in src/ostorlab/assets/agent.py

View check run for this annotation

Codecov / codecov/patch

src/ostorlab/assets/agent.py#L14-L18

Added lines #L14 - L18 were not covered by tests

def __init__(
self,
key: str,
version: Optional[str] = None,
git_location: Optional[str] = None,
docker_location: Optional[str] = None,
yaml_file_location: Optional[str] = None,
):
self.key = key
self.version = version
self.git_location = git_location
self.docker_location = docker_location
self.yaml_file_location = yaml_file_location

def __str__(self) -> str:
if self.version is not None:
return f"Agent {self.key}:{self.version}"
Expand Down
10 changes: 0 additions & 10 deletions src/ostorlab/assets/android_aab.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ class AndroidAab(asset.Asset):
path: Optional[str] = None
content_url: Optional[str] = None

Check warning on line 16 in src/ostorlab/assets/android_aab.py

View check run for this annotation

Codecov / codecov/patch

src/ostorlab/assets/android_aab.py#L14-L16

Added lines #L14 - L16 were not covered by tests

def __init__(
self,
content: Optional[bytes] = None,
path: Optional[str] = None,
content_url: Optional[str] = None,
):
self.content = content
self.path = path
self.content_url = content_url

def __str__(self) -> str:
str_representation = "Android AAB"
if self.path is not None:
Expand Down
10 changes: 0 additions & 10 deletions src/ostorlab/assets/android_apk.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ class AndroidApk(asset.Asset):
path: Optional[str] = None
content_url: Optional[str] = None

Check warning on line 16 in src/ostorlab/assets/android_apk.py

View check run for this annotation

Codecov / codecov/patch

src/ostorlab/assets/android_apk.py#L14-L16

Added lines #L14 - L16 were not covered by tests

def __init__(
self,
content: Optional[bytes] = None,
path: Optional[str] = None,
content_url: Optional[str] = None,
):
self.content = content
self.path = path
self.content_url = content_url

def __str__(self) -> str:
str_representation = "Android APK"
if self.path is not None:
Expand Down
3 changes: 0 additions & 3 deletions src/ostorlab/assets/android_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ class AndroidStore(asset.Asset):

package_name: str

Check warning on line 13 in src/ostorlab/assets/android_store.py

View check run for this annotation

Codecov / codecov/patch

src/ostorlab/assets/android_store.py#L13

Added line #L13 was not covered by tests

def __init__(self, package_name: str):
self.package_name = package_name

def __str__(self) -> str:
return f"Android Store: ({self.package_name})"

Expand Down
12 changes: 0 additions & 12 deletions src/ostorlab/assets/api_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ class ApiSchema(asset.Asset):
content_url: Optional[str] = None
schema_type: Optional[str] = None

Check warning on line 20 in src/ostorlab/assets/api_schema.py

View check run for this annotation

Codecov / codecov/patch

src/ostorlab/assets/api_schema.py#L17-L20

Added lines #L17 - L20 were not covered by tests

def __init__(
self,
endpoint_url: str,
content: Optional[bytes] = None,
content_url: Optional[str] = None,
schema_type: Optional[str] = None,
):
self.content = content
self.endpoint_url = endpoint_url
self.schema_type = schema_type
self.content_url = content_url

def __str__(self) -> str:
str_representation = CLASS_NAME
if self.schema_type is not None:
Expand Down
3 changes: 0 additions & 3 deletions src/ostorlab/assets/domain_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ class DomainName(asset.Asset):

name: str

def __init__(self, name: str):
self.name = name

def __str__(self) -> str:
return self.name

Check warning on line 16 in src/ostorlab/assets/domain_name.py

View check run for this annotation

Codecov / codecov/patch

src/ostorlab/assets/domain_name.py#L13-L16

Added lines #L13 - L16 were not covered by tests

Expand Down
10 changes: 0 additions & 10 deletions src/ostorlab/assets/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ class File(asset.Asset):
path: Optional[str] = None
content_url: Optional[str] = None

def __init__(
self,
content: Optional[bytes] = None,
path: Optional[str] = None,
content_url: Optional[str] = None,
):
self.content = content
self.path = path
self.content_url = content_url

def __str__(self) -> str:
str_representation = "File"
if self.path is not None:
Expand Down
10 changes: 0 additions & 10 deletions src/ostorlab/assets/ios_ipa.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ class IOSIpa(asset.Asset):
path: Optional[str] = None
content_url: Optional[str] = None

Check warning on line 16 in src/ostorlab/assets/ios_ipa.py

View check run for this annotation

Codecov / codecov/patch

src/ostorlab/assets/ios_ipa.py#L14-L16

Added lines #L14 - L16 were not covered by tests

def __init__(
self,
content: Optional[bytes] = None,
path: Optional[str] = None,
content_url: Optional[str] = None,
):
self.content = content
self.path = path
self.content_url = content_url

def __str__(self) -> str:
str_representation = "iOS"
if self.path is not None:
Expand Down
3 changes: 0 additions & 3 deletions src/ostorlab/assets/ios_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ class IOSStore(asset.Asset):

bundle_id: str

Check warning on line 13 in src/ostorlab/assets/ios_store.py

View check run for this annotation

Codecov / codecov/patch

src/ostorlab/assets/ios_store.py#L13

Added line #L13 was not covered by tests

def __init__(self, bundle_id: str):
self.bundle_id = bundle_id

def __str__(self) -> str:
return f"iOS Store ({self.bundle_id})"

Expand Down
3 changes: 0 additions & 3 deletions src/ostorlab/assets/ios_testflight.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ class IOSTestflight(asset.Asset):

application_url: str

Check warning on line 13 in src/ostorlab/assets/ios_testflight.py

View check run for this annotation

Codecov / codecov/patch

src/ostorlab/assets/ios_testflight.py#L13

Added line #L13 was not covered by tests

def __init__(self, application_url: str):
self.application_url = application_url

def __str__(self) -> str:
return f"iOS Testflight ({self.application_url})"

Expand Down
5 changes: 0 additions & 5 deletions src/ostorlab/assets/ipv4.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ class IPv4(asset.Asset):
version: int = 4
mask: Optional[str] = None

Check warning on line 16 in src/ostorlab/assets/ipv4.py

View check run for this annotation

Codecov / codecov/patch

src/ostorlab/assets/ipv4.py#L14-L16

Added lines #L14 - L16 were not covered by tests

def __init__(self, host: str, version: int = 4, mask: Optional[str] = None):
self.host = host
self.version = version
self.mask = mask

def __str__(self) -> str:
return f"{self.host}/{self.mask}"

Expand Down
5 changes: 0 additions & 5 deletions src/ostorlab/assets/ipv6.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ class IPv6(asset.Asset):
version: int = 6
mask: Optional[str] = None

Check warning on line 16 in src/ostorlab/assets/ipv6.py

View check run for this annotation

Codecov / codecov/patch

src/ostorlab/assets/ipv6.py#L14-L16

Added lines #L14 - L16 were not covered by tests

def __init__(self, host: str, version: int = 6, mask: Optional[str] = None):
self.host = host
self.version = version
self.mask = mask

def __str__(self) -> str:
return f"{self.host}/{self.mask}"

Expand Down
4 changes: 0 additions & 4 deletions src/ostorlab/assets/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ class Link(asset.Asset):
url: str
method: str

Check warning on line 14 in src/ostorlab/assets/link.py

View check run for this annotation

Codecov / codecov/patch

src/ostorlab/assets/link.py#L13-L14

Added lines #L13 - L14 were not covered by tests

def __init__(self, url: str, method: str):
self.url = url
self.method = method

def __str__(self) -> str:
return f"Link {self.url} with method {self.method}"

Expand Down

0 comments on commit 74ef100

Please sign in to comment.