Skip to content

Robust rule definition #5

@NithinChintala

Description

@NithinChintala

It would be nice to define some more simple rules using just class variables to avoid __init__ logic, i.e. say a rule to Parse

This data is on a single line 5

to

[5]

With a rule like

class MyRule(SplitterRule):
     INDEX = 7
     CONVERTOR = int

could be nice to optionally define the tags (though we need logic to prevent these being defined both at the class and instance level)

class MyRule(Rule):
    START_TAG = "START DATA"
    END_TAG = "END_DATA"

    def process_lines(self, start_line):
         ...

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions