Skip to content

Commit

Permalink
rules: fix rendering of yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
williballenthin committed Oct 17, 2023
1 parent cb5fa36 commit e1b3a3f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions capa/rules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,6 @@ def _get_ruamel_yaml_parser():

# we use the ruamel.yaml parser because it supports roundtripping of documents with comments.
y = ruamel.yaml.YAML(typ="rt")
y.register_class(Scope)

# use block mode, not inline json-like mode
y.default_flow_style = False
Expand Down Expand Up @@ -1064,7 +1063,6 @@ def to_yaml(self) -> str:
meta[k] = v
# the name and scope of the rule instance overrides anything in meta.
meta["name"] = self.name
meta["scopes"] = asdict(self.scopes)

def move_to_end(m, k):
# ruamel.yaml uses an ordereddict-like structure to track maps (CommentedMap).
Expand Down

0 comments on commit e1b3a3f

Please sign in to comment.