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

Add option to use a allowed extensions instead of ignored extensions #251

Merged
merged 18 commits into from
Jun 8, 2024

Conversation

Thesacraft
Copy link
Collaborator

@Thesacraft Thesacraft commented Jun 5, 2024

I added the option to invert the ignored extension list like its mentioned in #230.

@CyanVoxel CyanVoxel added the Type: Enhancement New feature or request label Jun 5, 2024
@CyanVoxel CyanVoxel added this to the Alpha 9.3 milestone Jun 5, 2024
@Thesacraft
Copy link
Collaborator Author

Thesacraft commented Jun 5, 2024

I don't understand why mypy complain about the line 1526 in my PR because i didn't change it ( or more accurate removed the change i did and it still complains). Maybe i didn't see something but I don't know.

@CyanVoxel
Copy link
Member

I don't understand why mypy complain about the line 1526 in my PR because i didn't change it ( or more accurate removed the change i did and it still complains).

I ran into a similar issue recently. You could create the definition of allowed_ext outside of the for loop with the type hint and a default value, then change the two existing definitions/"redefinitions" to just be assignments without the type hints.

@CyanVoxel CyanVoxel modified the milestones: Alpha 9.3, Alpha 9.2.2 Jun 6, 2024
@Thesacraft Thesacraft changed the title Add option to use a whitelist instead of a blacklist Add option to use a allowed extensions instead of ignored extensions Jun 6, 2024
Thesacraft and others added 4 commits June 6, 2024 14:10
Co-authored-by: Jiri <yedpodtrzitko@users.noreply.github.com>
Thesacraft and others added 3 commits June 6, 2024 17:55
Co-authored-by: Jiri <yedpodtrzitko@users.noreply.github.com>
- Change extension list mode setting from Checkbox to ComboBox to help better convey its purpose
- Change and simplify wording
- Add type hints to extension variables and change loading to use `get()` with default values
- Sanitize older extension lists that don't use extensions with a leading "."
- Misc. code organization and docstrings
@CyanVoxel
Copy link
Member

Pushed a few changes, notably switching the exclude/include mode selection from a checkbox to a combobox for better intuition of its function as well as some changes to how the extension lists are loaded.
image

@Thesacraft
Copy link
Collaborator Author

That is so much better haha

@CyanVoxel CyanVoxel merged commit 926dfff into TagStudioDev:main Jun 8, 2024
3 checks passed
@Thesacraft Thesacraft deleted the new-feature branch June 11, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants