Giter VIP home page Giter VIP logo

didyoumean-python's People

Contributors

gitter-badger avatar sylvainde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

didyoumean-python's Issues

Add explanation for suggestion

Format-related issue I thought about while working on #10 : it could be nice to have suggestions like : "Did you mean 'whatever' (possible explanation), 'something else' (other explanation)". This is especially interesting if I implement #9 to know in which version the name/attribute exists or not and/or possible url.

Different regexp on Python 3.7-dev/nightly

Error detected by Travis: https://travis-ci.org/SylvainDe/DidYouMean-Python/jobs/220642739 .

---: "^'(?P<arg>[^\\d\\W]\\w*)' is an invalid keyword argument for this function$" not found in "'this_doesnt_exist' is an invalid keyword argument for int()"
---: "^'(?P<arg>[^\\d\\W]\\w*)' is an invalid keyword argument for this function$" not found in "'end_' is an invalid keyword argument for print()"
---: "^'(?P<arg>[^\\d\\W]\\w*)' is an invalid keyword argument for this function$" not found in "'cmp' is an invalid keyword argument for sort()"

Most probably related to python/cpython@64c8f70 / python/cpython#916 .

Single quotes around suggestion and question mark

Hi! I am a great fan of the work you're doing here.

For the sake of pedantry, would it be possible to add a question mark at the end of the error message and single quotation marks around the suggestion, like say, NameError: global name 'maxi' is not defined. Did you mean 'max'?

Cheers!

Code quality - various details

  • Replace assert by proper exceptions
  • Add unit tests for get_func_by_name
  • Add FUNC_NAME is the regexp used to parse error messages.

Add suggestions for IOError

There are probably many interesting suggestions to be added in case of IOError (when a file is not found for instance).

Continuous integration: Different error message for test_object_indexing on recent Python builds

FAIL: test_object_indexing (didyoumean_sugg_tests.TypeErrorTests)
Index from object does not work if __getitem__ is not defined.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 1821, in test_object_indexing
    self.throws(set_code,
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 417, in throws
    self.assertRegexpMatches(msg, error_msg, details)
AssertionError: Running following code :
---
set()[0]
---: "^\\'([\\w\\.-]+)\\' object (?:does not|doesn't) support (.*)$" not found in "'set' object is not subscriptable"

OK (Job 1452 https://travis-ci.org/SylvainDe/DidYouMean-Python/builds/494645122 )
Python 3.7-dev - Python 3.7.2+ (heads/3.7:6f35219, Feb 17 2019, 07:35:15)
Python 3.8-dev - Python 3.8.0a1+ (heads/master:414c625, Feb 17 2019, 07:35:57)
Python nightly - Python 3.7.0a4+ (heads/master:4666ec5, Jan 26 2018, 04:14:24)

KO (Job 1453 https://travis-ci.org/SylvainDe/DidYouMean-Python/builds/495186868 )
Python 3.7-dev - Python 3.7.2+ (heads/3.7:a7f929d, Feb 18 2019, 07:41:08)
Python 3.8-dev - Python 3.8.0a1+ (heads/master:ac28147, Feb 18 2019, 07:36:23)
Python nightly - Python 3.8.0a1+ (heads/master:ac28147, Feb 18 2019, 07:36:23)

Probably caused by python/cpython@ac28147 .

AttributeError: 'NoneType' object has no attribute 'tb_next'

Following behavior to fix asap:

DidYouMean-Python/didyoumean $ python
Python 3.4.3 (default, Oct 14 2015, 20:28:29) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import didyoumean_api
>>> didyoumean_api.didyoumean_enablehook()
>>> return
Error in sys.excepthook:
Traceback (most recent call last):
  File "/home/josay/Geekage/NewNewDidYouMean/DidYouMean-Python/didyoumean/didyoumean_api.py", line 83, in didyoumean_hook
    add_suggestions_to_exception(type_, value, traceback)
  File "/home/josay/Geekage/NewNewDidYouMean/DidYouMean-Python/didyoumean/didyoumean_internal.py", line 656, in add_suggestions_to_exception
    traceback)))
  File "/home/josay/Geekage/NewNewDidYouMean/DidYouMean-Python/didyoumean/didyoumean_internal.py", line 586, in get_suggestions_for_exception
    frame = get_last_frame(traceback)
  File "/home/josay/Geekage/NewNewDidYouMean/DidYouMean-Python/didyoumean/didyoumean_internal.py", line 640, in get_last_frame
    while traceback.tb_next:
AttributeError: 'NoneType' object has no attribute 'tb_next'

Original exception was:
  File "<stdin>", line 1
SyntaxError: 'return' outside function
>>> 

New error on nightly build: didyoumean_internal_tests.AddStringToMemoryErrorTest

After logging is improved, error is:

FAIL: test_add_string_to_repr (didyoumean_internal_tests.AddStringToMemoryErrorTest)
Non-empty string added to error's repr value.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_internal_tests.py", line 469, in test_add_string_to_repr
    repr, "ABCDErepr", self.prefix_repr, self.suffix_repr)
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_internal_tests.py", line 452, in check_string_added
    prefix + string + suffix, s1, s2, self.check_str_sum)
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_common_tests.py", line 94, in assertStringAdded
    self.assertIn(string, after)
AssertionError: "'ABCDErepr'," not found in "MemoryError('ABCDErepr')"

CI jobs failing on nightly (7th June)

3.7-dev : https://travis-ci.org/SylvainDe/DidYouMean-Python/jobs/240478270
nightly : https://travis-ci.org/SylvainDe/DidYouMean-Python/jobs/240478273

AssertionError: Running following code :
---
bool(this_doesnt_exist=2)
---: '^(?P<func><?\\w+>?)(?:\\(\\))? (?:takes no|does not take) keyword arguments$' not found in 'bool()() takes no keyword arguments'

Probably an issue with CPython itself: introduced with python/cpython@5eb788b / http://bugs.python.org/issue30534 ?

About TODO_ENCLOSING

Hi,

I'm slowly implementing some of your ideas for my own project (friendly-traceback). I noticed that you had a comment about labelled TODO_ENCLOSING which I understood to mean nonlocal scopes.

I have implemented something that does that in my own project:
get_variables_in_frame_by_scope in info_variables.py currently found at https://github.com/aroberge/friendly-traceback/blob/master/friendly_traceback/info_variables.py#L16

Perhaps this could be of some use to you in relation to that comment.

I do recognize that my code is not as tight/efficient as yours, as I am trying to graft something like DidYouMean-Python into a project that was not designed for it initially.

Continuous Integration on nightly (Python 3.9): error in test_c_func_takes_no_keyword_arguments: re does not match

First failure: https://travis-ci.org/SylvainDe/DidYouMean-Python/jobs/634507305

Traceback (most recent call last):
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 1624, in test_c_func_takes_no_keyword_arguments
    self.throws(bad_code, NOKWARGS, sugg, interpreters='cpython')
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 431, in throws
    self.assertRegexpMatches(msg, error_msg, details)
AssertionError: Regex didn't match: '^(?P<func><?\\w+>?)(?:\\(\\))? (?:takes no|does not take) keyword arguments$' not found in 'dict.get() takes no keyword arguments' : Running following code :
---
dict().get(0, default=None)
---

We expect get() to be in the error message but we have dict.get().
I do not quite know the best way to solve this issue.

Test test_method_called_on_class fails on "recent" Python versions

This used to be hidden because we were running unaffected versions of Python on Travis (dist: Trusty).
The recent changes in the travis.yml file ensure we run test on dist: xenial when relevant.
When this happens, we have the following error shows:

FAIL: test_method_called_on_class (didyoumean_sugg_tests.TypeErrorTests)
Test where a method is called on a class and not an instance.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 1262, in test_method_called_on_class
    self.throws(bad_code, err_cy, interpreters='cpython')
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 416, in throws
    self.assertRegexpMatches(msg, error_msg, details)
AssertionError: Running following code :
---
set.add(0)
---: "^descriptor '(\\w+)' requires a '([\\w\\.-]+)' object but received a '([\\w\\.-]+)'$" not found in "descriptor 'add' for 'set' objects doesn't apply to 'int' object"

See https://travis-ci.org/SylvainDe/DidYouMean-Python/jobs/488164466

Affected versions:

  • 3.7-dev: affects Python 3.7.2+ but not Python 3.7.0a4+
  • 3.7: affects Python 3.7.1
  • 3.8-dev: affects Python 3.8.0a0
  • nightly: it may affect Python 3.8.0a0 but not Python 3.7.0a4+

`Maximum recursion depth exceeded` on Pypy

I have the following error:

======================================================================
ERROR: test_unbound_global (didyoumean_sugg_tests.UnboundLocalErrorTests)
Should be global nb.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 700, in test_unbound_global
    self.throws(bad_code, UNBOUNDLOCAL)
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 302, in throws
    get_suggestions_for_exception(value, traceback))
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_internal.py", line 302, in suggest_name_as_name_typo
    for name in get_close_matches(name, objdict.keys()):
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_internal.py", line 78, in get_close_matches
    for w in difflib.get_close_matches(word, possibilities, 3, 0.7)
  File "/opt/python/pypy-5.3.1/lib-python/2.7/difflib.py", line 738, in get_close_matches
    s.set_seq1(x)
  File "/opt/python/pypy-5.3.1/lib-python/2.7/difflib.py", line 256, in set_seq1
    self.a = a
RuntimeError: maximum recursion depth exceeded

when running the unit test on Travis. It does not seem related to the new changes performed.

This seems to affect:

$ python --version
Python 2.7.10 (7e8df3df9641, Jun 14 2016, 13:58:02)
[PyPy 5.3.1 with GCC 4.8.2]

$ python --version
Python 2.7.10 (7e8df3df9641, Jun 14 2016, 13:58:02)
[PyPy 5.3.1 with GCC 4.8.2]

but not:

$ python --version
Python 3.2.5 (b2091e973da6, Oct 19 2014, 18:29:55)
[PyPy 2.4.0 with GCC 4.6.3]

Looking for "pypy maximum recursion depth exceeded travis" in Google shows other similar looking errors. To be investigated.

Test "test_octal_literal" fails on Python 3.8

This issue used to be hidden - see #36 and #37 but is now visible: https://travis-ci.org/SylvainDe/DidYouMean-Python/builds/488197500

FAIL: test_octal_literal (didyoumean_sugg_tests.SyntaxErrorTests)
Syntax for octal liberals has changed.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 2276, in test_octal_literal
    self.throws(bad, INVALIDTOKEN, [], after, 'cpython')
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 416, in throws
    self.assertRegexpMatches(msg, error_msg, details)
AssertionError: Running following code :
---
0720
---: '^invalid token$' not found in 'leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers'

NameError: Add new test case/regexp

Got add different error message

NameError: free variable 'title' referenced before assignment in enclosing scope

$ python --version
Python 3.2.3

Continous Integration on pypy & pypy-5.4.1: Cannot install coveralls ("ERROR: Failed building wheel for cryptography")

First failure

Date: 21 July 2020
Build: Build #2023 https://travis-ci.org/github/SylvainDe/DidYouMean-Python/builds/710238444
Jobs:

$ python --version
Python 2.7.13 (c925e7381036, Jun 05 2017, 21:20:51)
[PyPy 5.8.0 with GCC 6.2.0 20160901]
$ pip --version
pip 9.0.1 from /home/travis/virtualenv/pypy2.7-5.8.0/site-packages (python 2.7)
  error: command 'cc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for cryptography
Successfully built docopt
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
The command "case "$TRAVIS_PYTHON_VERSION" in
      "2.6") ;; # coveralls not supported
      "pypy-5.3.1") ;; # coveralls not supported
      *) pip install coveralls;;
  esac
  " failed and exited with 1 during .

Last success

Date: 20 July 2020
Build: Build #2022 https://travis-ci.org/github/SylvainDe/DidYouMean-Python/builds/709855656
Jobs:

$ python --version
Python 2.7.13 (c925e7381036, Jun 05 2017, 21:20:51)
[PyPy 5.8.0 with GCC 6.2.0 20160901]
$ pip --version
pip 9.0.1 from /home/travis/virtualenv/pypy2.7-5.8.0/site-packages (python 2.7)
(...)
$ python -VV
Python 2.7.13 (c925e7381036, Jun 05 2017, 21:20:51)
[PyPy 5.8.0 with GCC 6.2.0 20160901]
$ python -c "import sys; print(sys._git)" || true
Traceback (most recent call last):
  File "<module>", line 1, in <module>
AttributeError: 'module' object has no attribute '_git'

Continuous Integration on pypy-5.4.1: "You are linking against OpenSSL 1.0.1, which is no longer supported by the OpenSSL project. You need to upgrade to a newer version of OpenSSL."

Continous Integration on Python nightly (3.10): re does not match for 2 exceptions because of qualified names ("my_class.my_method")

First failure

Date: 27th May 2020
Build: https://travis-ci.org/github/SylvainDe/DidYouMean-Python/builds/691583710
Jobs: https://travis-ci.org/github/SylvainDe/DidYouMean-Python/jobs/691583732

$ python -VV
Python 3.10.0a0 (heads/master:5eb45d7, May 26 2020, 13:13:09) 
[GCC 5.4.0 20160609]
$ python -c "import sys; print(sys._git)" || true
('CPython', 'heads/master', '5eb45d7')
AssertionError: Regex didn't match: "^(?P<func><?\\w+>?)\\(\\) got an unexpected keyword argument '(?P<arg>[^\\d\\W]\\w*)'$" not found in "MyClass.func() got an unexpected keyword argument 'babar'" : Running following code :
...
AssertionError: Regex didn't match: "^(?P<func><?\\w+>?)(?:\\(\\) takes| expected) (?:exactly |at least |at most |from )?(?P<expected>no|\\d+|\\d+ to \\d+) (?:positional |non-keyword )?arguments?,? \\(?(?:but |got )?(?P<actual>\\d+)(?: were given| was given| given)?\\)?(?:\\. Did you forget 'self' in the function definition\\?)?$" not found in 'FoobarClass.some_cls_method_missing_cls() takes 0 positional arguments but 1 was given'
...
Ran 368 tests in 1.500s

FAILED (failures=9)
...

Last success

Date: 26th May 2020
Build: https://travis-ci.org/github/SylvainDe/DidYouMean-Python/builds/691161784
Jobs: https://travis-ci.org/github/SylvainDe/DidYouMean-Python/jobs/691161806

$ python -VV
Python 3.9.0b1+ (heads/3.9:82c274e, May 25 2020, 04:36:39) 
[GCC 5.4.0 20160609]
$ python -c "import sys; print(sys._git)" || true
('CPython', 'heads/3.9', '82c274e')

CI jobs failing on Python 3.2 / PyPy3

Jobs have been failing fro a few days now:

2.59s$ pip install coverage==3.7.1
/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/_vendor/pkg_resources/__init__.py:80: UserWarning: Support for Python 3.0-3.2 has been dropped. Future versions will fail here.
  warnings.warn(msg)
Collecting coverage==3.7.1
  Downloading coverage-3.7.1.tar.gz (284kB)
    100% |████████████████████████████████| 286kB 1.9MB/s 
Exception:
Traceback (most recent call last):
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/commands/install.py", line 310, in run
    wb.build(autobuilding=True)
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/wheel.py", line 750, in build
    self.requirement_set.prepare_files(self.finder)
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/req/req_set.py", line 370, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/req/req_set.py", line 601, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/req/req_set.py", line 127, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/req/req_install.py", line 397, in run_egg_info
    self.setup_py, self.name,
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/req/req_install.py", line 372, in setup_py
    import setuptools  # noqa
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/setuptools/__init__.py", line 12, in <module>
    import setuptools.version
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pkg_resources/__init__.py", line 77, in <module>
    raise RuntimeError("Python 3.3 or later is required")
RuntimeError: Python 3.3 or later is required

Tests from didyoumean_sugg_tests.py can't be run on their own

When we run tests on all files:

python -m unittest2 discover --start-directory=didyoumean --pattern=*.py
Ran 359 tests in 6.779s
OK

When we run only didyoumean_sugg_tests.py:

python didyoumean/didyoumean_sugg_tests.py 
======================================================================
FAIL: test_remove_exc_attr (__main__.AttributeErrorTests)
Attribute sys.exc_xxx have been removed.
----------------------------------------------------------------------
AssertionError: Lists differ: ['to use "sys.exc_info()" returning a tupl[117 chars] 3)'] != ["'last_traceback'", 'to use "sys.exc_info[137 chars] 3)']
Running following code :
---
import sys
sys.exc_traceback
---
----------------------------------------------------------------------
Ran 200 tests in 3.266s
FAILED (failures=1)

Can't use from `pip` install

Hi,

very cool package! I'm trying to integrate it with pyinspect to complement pyinspect's fancy tracebacks with your helpful messages, but I can't get didyoumean to work.
I've tried both with pip install BetterErrorMessages and by installing from the master branch on github, but it's the same.

I think that's in an issue about how modules are imported within the package, e.g.

from didyoumean.didyoumean_internal import add_suggestions_to_exception

results in:

ModuleNotFoundError: No module named 'didyoumean_re'

and

import didyoumean
didyoumean.didyoumean_api.didyoumean_postmortem()

results in:

AttributeError: module 'didyoumean' has no attribute 'didyoumean_api'

and so on..

Different regexp on Python 3.7-dev/nightly

Error detected by Travis: https://travis-ci.org/SylvainDe/DidYouMean-Python/builds/213076066

======================================================================
FAIL: test_no_implicit_str_conv2 (didyoumean_sugg_tests.TypeErrorTests)
Trying to concatenate a non-string value to a string.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 1663, in test_no_implicit_str_conv2
    self.throws(bad_code, MUSTBETYPENOTTYPE, [], after, 'cpython')
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 397, in throws
    self.assertRegexpMatches(msg, error_msg, details)
AssertionError: Running following code :
---
"things " + 12
---: '^must be ([\\w\\.-]+), not ([\\w\\.-]+)$' not found in 'can only concatenate str (not "int") to str'

[not an issue] I made something similar, maybe you can take some ideas

Hi there. I had a hack at a similar tool 'exceptionalclarity' some months back, I ended up getting distracted. Mine sits in IPython and uses the post-execution hook to check for errors, it parses them and tries to suggest some improvements:
https://github.com/ianozsvald/exceptional_clarity

It has a tiny bit of advice for ZeroDivisionError and tries to explain what's wrong with some TypeErrors. It is terribly simple but maybe it'll give you an idea if e.g. you want to play with IPython.

Handle some TypeErrors

def f(a):
... pass
...
f[2]
Traceback (most recent call last):
File "", line 1, in
TypeError: 'function' object is not subscriptable

Did you mean f(2) ?

Probably easy to implement in a dummy way ('did you mean function()') but hard to implement in a smart way ('did you mean f(2)') ?

executing, pure_eval, and futurecoder

Hi! I just came across this project, it looks very impressive! I thought I'd point out a couple of libraries I've written which could help make it even more powerful, if you're willing to add dependencies:

For example this could allow you to get the AST node where an AttributeError occurred and the exact value that the user was trying to get an attribute of.

I'm currently developing futurecoder, a platform for free, interactive, high quality Python education for beginners. It includes convenient debugging with birdseye (which I noticed you starred) and snoop, an improved version of PySnooper (also starred). One feature I'd like to improve is tracebacks: alexmojaki/futurecoder#75

In particular integrating DidYouMean into futurecoder would be great, but beyond that there's a huge space of very cool possibilities, and I thought this would be right up your alley. Are you interested?

Continuous Integration on nightly during pep257 install: "ImportError: cannot import name 'Set' from 'collections'"

First failing job:

https://travis-ci.org/SylvainDe/DidYouMean-Python/jobs/634043915

$ python -VV
Python 3.9.0a2+ (heads/master:b821173, Jan  7 2020, 18:49:21) 
[GCC 5.4.0 20160609]

$ python -c "import sys; print(sys._git)" || true
('CPython', 'heads/master', 'b821173')

Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.9-dev/bin/pep257", line 5, in <module>
    from pep257 import main
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pep257.py", line 24, in <module>
    from collections import defaultdict, namedtuple, Set
ImportError: cannot import name 'Set' from 'collections' (/home/travis/virtualenv/python3.9-dev/lib/python3.9/collections/__init__.py)
The command "pep257 *.py */*.py" failed and exited with 1 during .

Last successful job:

https://travis-ci.org/SylvainDe/DidYouMean-Python/jobs/633568897

$ python -VV
Python 3.8.1+ (heads/3.8:6bf382a, Jan  2 2020, 12:08:12) 
[GCC 5.4.0 20160609]
$ python -c "import sys; print(sys._git)" || true
('CPython', 'heads/3.8', '6bf382a')

Continuous Integration on nightly (Python 3.9): No exception thrown with "1 <> 2"

First failure: #1922 https://travis-ci.org/github/SylvainDe/DidYouMean-Python/builds/678869608
https://travis-ci.org/github/SylvainDe/DidYouMean-Python/jobs/678869630

$ python -VV
Python 3.9.0a5+ (heads/master:ee40e4b, Apr 23 2020, 05:15:16) 
[GCC 5.4.0 20160609]
$ python -c "import sys; print(sys._git)" || true
('CPython', 'heads/master', 'ee40e4b')
...
======================================================================
FAIL: test_old_comparison (didyoumean_sugg_tests.SyntaxErrorTests)
<> comparison is removed, != always works.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 2158, in test_old_comparison
    self.throws(old_code, INVALIDSYNTAX, sugg, after, 'cpython')
  File "/home/travis/build/SylvainDe/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 418, in throws
    self.assertFalse(exc is None, "No exc thrown." + details)
AssertionError: True is not false : No exc thrown.Running following code :
---
1 <> 2
---
----------------------------------------------------------------------
Ran 368 tests in 1.488s
FAILED (failures=1)

Last success: #1921 https://travis-ci.org/github/SylvainDe/DidYouMean-Python/builds/678439749
https://travis-ci.org/github/SylvainDe/DidYouMean-Python/jobs/678439780

$ python -VV
Python 3.9.0a5+ (heads/master:df8913f, Apr 20 2020, 04:59:36) 
[GCC 5.4.0 20160609]
$ python -c "import sys; print(sys._git)" || true
('CPython', 'heads/master', 'df8913f')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.