Skip to content

snakeoil.formatters ontology needs refactoring #113

@ferringb

Description

@ferringb

The original reason for a seperated Formatter was to use it for GUI type callbacks, but the reality of all usage, this isn't something a GUI will use. It'll just consume the stream from whatever thing it's invoking.

Thus it's time to collapse that mess down so the signatures of everything are sane (for example- does fg() return None or a string? The inheritance doesn't agree) and simplify this.

In doing that work, the terminfo formatter should be split off into it's own module. Of note- in doing so, check the tests that scan snakeoil modules themselves, and add a protocol to be clear if a module is actually optional. IE, if it fails to import, this is actually fine. Test's should instead assert the module is importable if the thing that pivots it (curses module, for example) is missing.

I'll get this at a later date since I recall the chains of this, but it's not high priority since the thing 'works'. It's just hell on static analyzers right now.

Metadata

Metadata

Assignees

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