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

Improve: Use the newer API for opening settings #78

Merged
merged 1 commit into from
May 27, 2017

Conversation

stoivo
Copy link
Contributor

@stoivo stoivo commented Dec 28, 2016

This will open default and user settings side by side
closes #77

I had some trouble setting up test locally but I committed and make a PR so the test can run on Travis

$ ./run_tests.sh
======================================= test session starts =======================================
platform darwin -- Python 3.5.0a2, pytest-3.0.5, py-1.4.32, pluggy-0.4.0
rootdir: /Users/simon/Library/Application Support/Sublime Text 3/Packages/ColorHelper, inifile:
collected 1 items

tests/test_json.py .

==================================== 1 passed in 0.34 seconds =====================================
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/plugins/manager.py", line 175, in load_plugin
    self._load(verify_requirements)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/plugins/manager.py", line 147, in _load
    self._plugin = resolve()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2316, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/plugins/pyflakes.py", line 15, in <module>
    import pyflakes.checker
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pyflakes/checker.py", line 62, in <module>
    LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)
AttributeError: module 'ast' has no attribute 'AsyncFor'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/bin/flake8", line 11, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/main/cli.py", line 16, in main
    app.run(argv)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/main/application.py", line 322, in run
    self._run(argv)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/main/application.py", line 305, in _run
    self.initialize(argv)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/main/application.py", line 295, in initialize
    self.find_plugins()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/main/application.py", line 147, in find_plugins
    self.check_plugins.load_plugins()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/plugins/manager.py", line 392, in load_plugins
    plugins = list(self.manager.map(load_plugin))
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/plugins/manager.py", line 284, in map
    yield func(self.plugins[name], *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/plugins/manager.py", line 390, in load_plugin
    return plugin.load_plugin()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/plugins/manager.py", line 183, in load_plugin
    raise failed_to_load
flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "F" due to module 'ast' has no attribute 'AsyncFor'.```

This will open default and user settings side by side
closes facelessuser#77
@facelessuser
Copy link
Owner

Thanks for pull. I am considering adding this. I was purposely avoiding for a while now, but enough people may be on versions that support it now to move in this direction. I wish I liked this behavior more than I do, but I may merge it regardless of how I feel because I think people in general probably want it.

@facelessuser
Copy link
Owner

As for the flake8 issue, yeah flake8 has been being weird recently. I don't know what they are doing on their side, but I know they changed some of their internals which as broken interaction with certain flake8 plugins. I know I can't use the latest flake8 and flake8-putty.

@stoivo
Copy link
Contributor Author

stoivo commented Dec 28, 2016

Ah, I see your point. Since this was released in september which is only 3 months.

@facelessuser facelessuser added the P: maybe Pending approval of low priority request. label Feb 2, 2017
@stoivo
Copy link
Contributor Author

stoivo commented May 25, 2017

Maybe now?

@facelessuser
Copy link
Owner

:) maybe.

@stoivo
Copy link
Contributor Author

stoivo commented May 26, 2017

I think the overall experience is nicer. Though you use backward compatibility.

@facelessuser
Copy link
Owner

This week I plan on making a new ColorHelper release that locks it to 3124+. So I won't be concerned with backwards compatibility. I actually have a number of plugins that I will be doing this to. I'm preparing for a new mdpopups release that will require 3124+ and will drop legacy baggage.

@stoivo
Copy link
Contributor Author

stoivo commented May 27, 2017

Cool, I have to admit. Realy cool stuff you make possible

@facelessuser
Copy link
Owner

@stoivo, Thanks! I wish I had more time to do all I want with them all, but I am glad people like them 🙂 .

@facelessuser facelessuser merged commit 75216aa into facelessuser:master May 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: maybe Pending approval of low priority request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use 'edit_settings' to ... edit the settings
2 participants