Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce-reference-bool #317

Merged
merged 3 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ virt/
# mypy
.mypy_cache/

# ruff
.ruff_cache

# log
cert_processing_log.txt
./cc_processing_log.txt
Expand All @@ -124,4 +127,4 @@ cert_processing_log.txt
notebooks/cc/results/

# Default directory for dataset
/dataset
/dataset
3 changes: 0 additions & 3 deletions src/sec_certs/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ class DatasetInternalState(ComplexSerializableType):
auxiliary_datasets_processed: bool = False
certs_analyzed: bool = False

def __bool__(self):
return any(vars(self))

def __init__(
self,
certs: dict[str, CertSubType] = {},
Expand Down
3 changes: 3 additions & 0 deletions src/sec_certs/sample/certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class References(ComplexSerializableType):
directly_referencing: set[str] | None = field(default=None)
indirectly_referencing: set[str] | None = field(default=None)

def __bool__(self):
return any(getattr(self, x) for x in vars(self))


class Heuristics:
cpe_matches: set[str] | None
Expand Down