3-manifolds / SnapPy

SnapPy is a package for studying the topology and geometry of 3-manifolds, with a focus on hyperbolic structures. It is based on the SnapPea kernel written by Jeff Weeks.
https://snappy.computop.org/
84 stars 39 forks source link

fix pylint W0108 "useless lambda wrapping" #38

Closed fchapoton closed 3 years ago

fchapoton commented 3 years ago

see https://pycodequ.al/docs/pylint-messages/w0108-unnecessary-lambda.html

NathanDunfield commented 3 years ago

I notice this modifies the GUI code. Did you check that everything still works? The CI isn't going to catch problems there.

The CI failure on Windows seems unrelated at first glance to this patch:

LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

not sure what's going on there.

fchapoton commented 3 years ago

Indeed. No, I have not checked the user interface. Sorry, but I am not competent to check that the changes in app.py and pari.py have no unexpected effect.

NathanDunfield commented 3 years ago

Indeed. No, I have not checked the user interface. Sorry, but I am not competent to check that the changes in app.py and pari.py have no unexpected effect.

In that case, please remove those changes from the pull request --- the small improvement in cleaner code is not worth the very small chance that they break the GUI.

fchapoton commented 3 years ago

ok, done

NathanDunfield commented 3 years ago

CI failure on Ubuntu appears related to this patch:

    Traceback (most recent call last):
      File "/opt/python/cp36-cp36m/lib/python3.6/site-packages/sphinx/config.py", line 328, in eval_config_file
        exec(code, namespace)
      File "/tmp/pip-req-build-gpujw53e/doc_src/conf.py", line 32, in <module>
        import snappy
      File "/tmp/pip-req-build-gpujw53e/build/lib.linux-x86_64-3.6/snappy/__init__.py", line 7, in <module>
        from .SnapPy import (AbelianGroup, HolonomyGroup, FundamentalGroup,
      File "cython/core/basic.pyx", line 35, in init SnapPy
      File "/tmp/pip-req-build-gpujw53e/build/lib.linux-x86_64-3.6/snappy/ptolemy/__init__.py", line 6, in <module>
        from .processMagmaFile import solutions_from_magma, solutions_from_magma_file
      File "/tmp/pip-req-build-gpujw53e/build/lib.linux-x86_64-3.6/snappy/ptolemy/processMagmaFile.py", line 1, in <module>
        from .polynomial import Polynomial
      File "/tmp/pip-req-build-gpujw53e/build/lib.linux-x86_64-3.6/snappy/ptolemy/polynomial.py", line 188, in <module>
        class Polynomial(object):
      File "/tmp/pip-req-build-gpujw53e/build/lib.linux-x86_64-3.6/snappy/ptolemy/polynomial.py", line 502, in Polynomial
        def parse_string(cls, s, parse_coefficient_function=parse_int_or_fraction):
    NameError: name 'parse_int_or_fraction' is not defined
fchapoton commented 3 years ago

I think I have fixed the last issue. Ready to go ?