mixmastamyk / console

Comprehensive utility library for terminals. “Better… Stronger… Faster.”
GNU Lesser General Public License v3.0
34 stars 5 forks source link

Pylint doesn't like future_fstrings codec mentioned when it is not installed #12

Open arkarkark opened 3 years ago

arkarkark commented 3 years ago

I found pylint failed on a simple import console unless I installed future-fstrings. perhaps that needs to be added as a dependency?

here's the output of pylint for a 1 line import file. (on mac OS using brew)

Suspicious state from syntax checker python-pylint: Checker python-pylint returned non-zero exit code 1, but no errors from output: Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/astroid/manager.py", line 229, in file_from_module_name
    value = self._mod_file_cache[(modname, contextfile)]
KeyError: ('console.core', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tokenize.py", line 342, in find_cookie
    codec = lookup(encoding)
LookupError: unknown encoding: future_fstrings
mixmastamyk commented 3 years ago

Hmm, it is a dependency if you are using an old version of Python, say 3.5 or so. But otherwise not needed, it installs a dummy in __init__ instead.

But now that old Pythons are no longer supported, I'd like to remove the future_fstrings. The reason I haven't is that I wanted to have a version, say 1.0 that supported older Pythons before moving on.

Perhaps I should speed the process up, although not sure that this pylint problem is a significant problem. Need to think about it a bit.

mixmastamyk commented 3 years ago

Maybe I can install the dummy implementation if it isn't installed, rather than by version check, and trust the setup.py to install it.