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

folder file parser should be case insensitive #647

Open
pokepress opened this issue Oct 30, 2023 · 0 comments
Open

folder file parser should be case insensitive #647

pokepress opened this issue Oct 30, 2023 · 0 comments

Comments

@pokepress
Copy link

I kept running into an issue with this line in data_utils.py:

assert input_name in input_paths, f'{input_name} is not in {input_key}_paths.'

Because my HR and LR files had different casings on their extensions. Windows considers them equivalent (and changing it is more complicated than just editing the filename in Windows Explorer, as it will change the capitalization back), so I changed the code to:

assert input_name.casefold() in map(str.casefold, input_paths), f'{input_name} is not in {input_key}_paths.'

But there's probably a cleaner/more appropriate way to achieve this.

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