Skip to content

Add error banner when trying to compare the same file to itself.

Jack Vanier requested to merge jackrvan/meld:issue-530 into master

Goal of this change is to fix this issue #530 (closed). This is my attempt at getting a error message when a file is being compared against itself. This is my first attempt at contributing to this project so if there is a simpler way to do this please let me know. One issue I encountered was that when using add_dismissable_msg you need to clear each error on each pane individually. To mitigate this I added a new kwarg to that function that accepts a list of other panes that will also clear when hitting the close button on the current pane.

I also had an extremely hard time getting flake8 working. I still havent been able to do it and ive been trying for an hour or 2. I did these steps:

  1. created a new venv with python3.6 -m venv meld-venv
  2. source meld-venv/bin/activate
  3. pip install -r dev-requirements.txt
  4. source meld-venv/bin/activate
  5. flake8 meld/ the last step gives me this traceback:
Traceback (most recent call last):
  File "/home/jack/Documents/my-meld/meld-venv/lib/python3.6/site-packages/flake8/plugins/manager.py", line 163, in load_plugin
    self._load()
  File "/home/jack/Documents/my-meld/meld-venv/lib/python3.6/site-packages/flake8/plugins/manager.py", line 140, in _load
    self._plugin = self.entry_point.load()
  File "/home/jack/Documents/my-meld/meld-venv/lib/python3.6/site-packages/entrypoints.py", line 82, in load
    mod = import_module(self.module_name)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/jack/Documents/my-meld/meld-venv/lib/python3.6/site-packages/flake8_isort.py", line 3, in <module>
    from isort import SortImports
ImportError: cannot import name 'SortImports'

has anyone experienced this before? Am i maybe on the wrong isort version? I dont see an isort version in dev-requirements.txt so im assuming its just using whatever version from flake8-isort?

Thank you to whoever takes the time to look at my merge request.

Edited by Kai Willadsen

Merge request reports