Skip to content

Code refactoring for token selection in selection.py‎ #5247

@talagayev

Description

@talagayev

Is your feature request related to a problem?

Following the discussion in #4790

Currently in selection.py‎ we have various tokens in individual classes, with all of them reusing certain functions like _apply() with small changes.

Describe the solution you'd like

A preferred approach would be to create a helper function Selection._apply_mathc_by_resname() that would be used, instead of reusing __apply()

This would result in something along the lines of:

def _apply(self, group):
    return self._apply_match_by_resnames(self.sugar_res)

Describe alternatives you've considered

Don't refactor the code and continue reusing __apply()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions