Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map classes to their valid FileFormat enum types #1164

Open
mferrera opened this issue Feb 14, 2024 · 0 comments
Open

Map classes to their valid FileFormat enum types #1164

mferrera opened this issue Feb 14, 2024 · 0 comments
Milestone

Comments

@mferrera
Copy link
Contributor

Validating file types is quite ad-hoc for importing and exporting at the moment. Imports have generally been moved to check again the new FileFormat enum

class FileFormat(Enum):
RMSWELL = ["rmswell", "rmsw", "w", "bw"]
ROFF_BINARY = ["roff_binary", "roff", "roff_bin", "roff-bin", "roffbin", "roff.*"]
ROFF_ASCII = ["roff_ascii", "roff_asc", "roff-asc", "roffasc", "asc"]

but exports have not yet so far, for practical reasons. We should map the class types to the keys of this enum where appropriate to unify file format checking for import and export. This presumes that import file types and export file types are the same, which may not be the case -- in which case they can be grouped into import and export types, respectively.

This mapping might exist inside or outside of the class itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant