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

small duplication in cylc_xdot.py and suite_srv_files_mgr.py #2647

Closed
ColemanTom opened this issue Apr 30, 2018 · 1 comment · Fixed by #2966
Closed

small duplication in cylc_xdot.py and suite_srv_files_mgr.py #2647

ColemanTom opened this issue Apr 30, 2018 · 1 comment · Fixed by #2966
Assignees
Labels
Milestone

Comments

@ColemanTom
Copy link
Contributor

In cylc_xdot.py:
The methods on_left_to_right, save_action and set_orientation could probably be migrated into CylcDotViewerCommon instead of in MyDotWindow and MyDotWindow2 individually as they are identical code. Unless there is a specific reason for them to exist in both classes independently which I did not see from a quick look.

In suite_srv_files_mgr.py:

                if content:
                    value = self._load_local_item(item, path)
                else:
                    value = self._locate_item(item, path)
                if value:
                    return value

is repeated three times in quick succession - perhaps worth turning that into a method which takes content, item, path and returns the value?

This comes from a duplication scanner I just ran over the lib/cylc directories. There were a couple more things, but these were the ones I thought worth mentioning as the simplest modifications that could be made.

@matthewrmshin matthewrmshin added this to the later milestone Apr 30, 2018
@matthewrmshin
Copy link
Contributor

@ColemanTom please feel free to raise a PR for this sort of stuff.

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

Successfully merging a pull request may close this issue.

3 participants