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

Refactor mastercook text file check #349

Merged
merged 2 commits into from
Jun 26, 2021
Merged

Conversation

cydanil
Copy link
Collaborator

@cydanil cydanil commented Jun 26, 2021

Description

This PR refactors the Mastercook text file check: some code was unreachable, and the argument is always a filepath string.
It can therefore all be done in a context manager.

Some dead code from gtk_extras was also removed: is_markup always returns False because an exception is raised.
This is due to an API change in Gtk3, but the check is insignificant enough that it can be removed altogether, rather than fixed.

How Has This Been Tested?

The Mastercook check refactor was tested by adding an integration test.

The is_markup removal was tested by running the application and creating dialogs: editing a recipe and closing it before save, prompting a dialog.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor!

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@cydanil cydanil merged commit 6b5c119 into kirienko:master Jun 26, 2021
@cydanil cydanil deleted the dead_code branch June 26, 2021 15:58
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

Successfully merging this pull request may close these issues.

1 participant