Skip to content

Commit 2d85d31

Browse files
committed
type comparisons
1 parent d051c08 commit 2d85d31

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

contentctl/actions/detection_testing/GitService.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def getChanges(self, target_branch: str) -> List[Detection]:
8080
updated_datasources: set[DataSource] = set()
8181

8282
for diff in all_diffs:
83-
if type(diff) == pygit2.Patch:
83+
if type(diff) is pygit2.Patch:
8484
if diff.delta.status in (
8585
DeltaStatus.ADDED,
8686
DeltaStatus.MODIFIED,

contentctl/contentctl.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def deploy_acs_func(config: deploy_acs):
113113

114114

115115
def test_common_func(config: test_common):
116-
if type(config) == test:
116+
if type(config) is test:
117117
# construct the container Infrastructure objects
118118
config.getContainerInfrastructureObjects()
119119
# otherwise, they have already been passed as servers
@@ -220,25 +220,25 @@ def main():
220220
with warnings.catch_warnings(action="ignore"):
221221
config = tyro.cli(models)
222222

223-
if type(config) == init:
223+
if type(config) is init:
224224
t.__dict__.update(config.__dict__)
225225
init_func(t)
226-
elif type(config) == validate:
226+
elif type(config) is validate:
227227
validate_func(config)
228-
elif type(config) == report:
228+
elif type(config) is report:
229229
report_func(config)
230-
elif type(config) == build:
230+
elif type(config) is build:
231231
build_func(config)
232-
elif type(config) == new:
232+
elif type(config) is new:
233233
new_func(config)
234-
elif type(config) == inspect:
234+
elif type(config) is inspect:
235235
inspect_func(config)
236-
elif type(config) == release_notes:
236+
elif type(config) is release_notes:
237237
release_notes_func(config)
238-
elif type(config) == deploy_acs:
238+
elif type(config) is deploy_acs:
239239
updated_config = deploy_acs.model_validate(config)
240240
deploy_acs_func(updated_config)
241-
elif type(config) == test or type(config) == test_servers:
241+
elif type(config) is test or type(config) is test_servers:
242242
test_common_func(config)
243243
else:
244244
raise Exception(f"Unknown command line type '{type(config).__name__}'")

0 commit comments

Comments
 (0)