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

pyflakes cleanup of interfaces #18490

Closed
fchapoton opened this issue May 24, 2015 · 14 comments
Closed

pyflakes cleanup of interfaces #18490

fchapoton opened this issue May 24, 2015 · 14 comments

Comments

@fchapoton
Copy link
Contributor

pyflakes finds many small problems in many interfaces

let's correct them all

Component: interfaces

Author: Frédéric Chapoton

Branch/Commit: e6cd26f

Reviewer: André Apitzsch

Issue created by migration from https://trac.sagemath.org/ticket/18490

@fchapoton fchapoton added this to the sage-6.8 milestone May 24, 2015
@fchapoton
Copy link
Contributor Author

Branch: u/chapoton/18490

@fchapoton
Copy link
Contributor Author

Commit: b226acd

@fchapoton
Copy link
Contributor Author

New commits:

b226acdlarge scale pyflakes cleanup of interfaces

@a-andre
Copy link

a-andre commented May 24, 2015

comment:2

There are still some problems

$ pyflakes-python2 src/sage/interfaces/*.py

src/sage/interfaces/chomp.py:670: list comprehension redefines 'x' from line 665
src/sage/interfaces/expect.py:60: 'AsciiArtString' imported but unused
src/sage/interfaces/maxima_abstract.py:978: local variable 'a' is assigned to but never used
src/sage/interfaces/tests.py:46: 'from all import *' used; unable to detect undefined names

Not sure if we should/can fix the last one.

@fchapoton
Copy link
Contributor Author

comment:3

At least three of them cannot be fixed.

  • maxima_abstract: 'a' is used inside an eval
  • tests: this file is testing several interfaces, it is simpler to keep the import *
  • expect: this import is there to be imported from other places. So it cannot be removed.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 25, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

f357233trac #18490 one more thing in chomp

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 25, 2015

Changed commit from b226acd to f357233

@a-andre
Copy link

a-andre commented May 25, 2015

comment:5

Documentation fails to build.

[reference] interfaces:
[reference] WARNING: Unable to fetch /home/user/Development/sage/src/doc/output/doctrees/en/reference/interfaces/environment.pickle
Error building the documentation.

Note: incremental documentation builds sometimes cause spurious
error messages. To be certain that these are real errors, run
"make doc-clean" first and try again.
Traceback (most recent call last):
  File "/home/user/Development/sage/src/doc/common/builder.py", line 1626, in <module>
    getattr(get_builder(name), type)()
  File "/home/user/Development/sage/src/doc/common/builder.py", line 292, in _wrapper
    getattr(get_builder(document), 'inventory')(*args, **kwds)
  File "/home/user/Development/sage/src/doc/common/builder.py", line 516, in _wrapper
    getattr(DocBuilder(self.name, lang), format)(*args, **kwds)
  File "/home/user/Development/sage/src/doc/common/builder.py", line 110, in f
    eval(compile(open(sys.argv[0]).read(), sys.argv[0], 'exec'))
  File "/home/user/Development/sage/src/doc/common/custom-sphinx-build.py", line 219, in <module>
    raise OSError(ERROR_MESSAGE)
OSError: [reference] WARNING: Unable to fetch /home/user/Development/sage/src/doc/output/doctrees/en/reference/interfaces/environment.pickle

@fchapoton
Copy link
Contributor Author

comment:6

yes, indeed. no idea where this can come from ?

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 25, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

e6cd26ftrac #18490 found a bad unicode character

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 25, 2015

Changed commit from f357233 to e6cd26f

@a-andre
Copy link

a-andre commented May 25, 2015

comment:9

LGTM

@a-andre
Copy link

a-andre commented May 25, 2015

Reviewer: André Apitzsch

@vbraun
Copy link
Member

vbraun commented May 25, 2015

Changed branch from u/chapoton/18490 to e6cd26f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants