Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit 81a0e35

Browse files
author
John Andersen
committed
df: base: OperationImplementation config op.name
* df: base: OperationImplementation add_label and add_orig_label methods now use op.name instead of ENTRY_POINT_ORIG_LABEL and ENTRY_POINT_NAME. Since they already have an op.name to go off of. Fixes: #76 Signed-off-by: John Andersen <[email protected]>
1 parent 5266361 commit 81a0e35

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
- OperationImplementation add_label and add_orig_label methods now use op.name
10+
instead of ENTRY_POINT_ORIG_LABEL and ENTRY_POINT_NAME.
811

912
## [0.2.0] - 2019-05-23
1013
### Added

dffml/df/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@ def __call__(self,
7676
-> OperationImplementationContext:
7777
return self.CONTEXT(self, ctx, ictx)
7878

79+
@classmethod
80+
def add_orig_label(cls, *above):
81+
return (
82+
list(above) + cls.op.name.split('_')
83+
)
84+
85+
@classmethod
86+
def add_label(cls, *above):
87+
return (
88+
list(above) + cls.op.name.split('_')
89+
)
90+
7991
def op(**kwargs):
8092
def wrap(func):
8193
if not 'name' in kwargs:

0 commit comments

Comments
 (0)