On Thursday, September 22, 2016 at 3:38:10 PM UTC, Salvatore Stella wrote: > > Hi Erik, > no options. As an example of the errors I get let's consider the ticket I > am > working on (#21254). > > I installed pylint via > > $ sage -pip install pylint > > my sage install is in /opt/sage so > > $ /opt/sage/local/bin/pylint > /opt/sage/src/sage/algebras/cluster_algebra.py | grep E: | head >
IMHO you should run pylint in sage shell, i.e. first do "sage -sh" and only at its prompt start pylint. The way you try doesn't set the environment right. HTH, Dima > No config file found, using default configuration > E:327, 0: No name 'morphism' in module 'sage.categories' > (no-name-in-module) > E:335, 0: No name 'constructor' in module 'sage.matrix' > (no-name-in-module) > E:337, 0: No name 'cachefunc' in module 'sage.misc' > (no-name-in-module) > E:338, 0: No name 'misc_c' in module 'sage.misc' > (no-name-in-module) > E:339, 0: No name 'free_module_element' in module 'sage.modules' > (no-name-in-module) > E:341, 0: No name 'integer' in module 'sage.rings' > (no-name-in-module) > E:342, 0: No name 'integer_ring' in module 'sage.rings' > (no-name-in-module) > E:347, 0: No name 'element_wrapper' in module 'sage.structure' > (no-name-in-module) > E:348, 0: No name 'parent' in module 'sage.structure' > (no-name-in-module) > E:349, 0: No name 'sage_object' in module 'sage.structure' > (no-name-in-module) > > I get many more warnings about lines being too long, having too many/too > few > methods etc but I do not care about those. > > Something weird: line 326 and 327 are > from sage.categories.homset import Hom > from sage.categories.morphism import SetMorphism > > pylint complains only about the second. > > Best > S. > > > > > * Erik Bray <erik....@gmail.com <javascript:>> [2016-09-22 17:24:05]: > > >On Fri, Sep 16, 2016 at 1:12 PM, VulK <etn4...@gmail.com <javascript:>> > wrote: > >> Hi, > >> I thought this was a question for sage-devel because it is about > tickets I > >> am currently working on (#21254 specifically). Sorry for the wrong > >> assumption. > >> > >> I did try sage -pip install pylint before posting but the results were > >> identical (even launching it from within sage -sh) > > > >That sounds suspicious, though I admit I haven't tried it myself yet. > >With what options did you run pylint? If it installed correctly into > >Sage's Python it should work. > > > >I wouldn't mind getting that working myself. It would be very nice to > >see what cleanup pylint can suggest (though a foolish consistency is > >the hobgoblin of little minds--I suspect pylint will require a lot of > >exceptions for sage :) > > > >> * Thierry <sage-goo...@lma.metelu.net <javascript:>> [2016-09-16 > 13:08:10]: > >> > >> > >>> Hi, > >>> > >>> note that https://ask.sagemath.org is a nice place to ask such > questions > >>> that are not related to sage development but still interesting. > >>> > >>> Anyway, Sage uses its own Python install, so you should install pylint > >>> within Sage and import it from there. > >>> > >>> A priori, the following should work: > >>> > >>> sage -pip install pylint > >>> > >>> If you really want to use the pylint from your distro, you should add > the > >>> path to your distro's '/${WHATEVER}/python2.7/dist-packages' directory > to > >>> Sage's PYTHONPATH, at your own risks. > >>> > >>> Ciao, > >>> Thierry > >>> > >>> > >>> > >>> On Fri, Sep 16, 2016 at 12:55:29PM +0200, VulK wrote: > >>>> > >>>> Dear all, > >>>> I am trying to use pylint to validate some of the code in a patch I > wrote > >>>> for sage and, unsurprisingly, I am getting several complaints because > my > >>>> system-wide pylint can't resolve modules like sage.something. > >>>> > >>>> What is the correct way of doing this? Is there any other alternative > to > >>>> pylint that I should use instead? > >>>> Thanks > >>>> S. > >>>> > >>>> > >>>> -- > >>>> You received this message because you are subscribed to the Google > Groups > >>>> "sage-devel" group. > >>>> To unsubscribe from this group and stop receiving emails from it, > send an > >>>> email to sage-devel+...@googlegroups.com <javascript:>. > >>>> To post to this group, send email to sage-...@googlegroups.com > <javascript:>. > >>>> Visit this group at https://groups.google.com/group/sage-devel. > >>>> For more options, visit https://groups.google.com/d/optout. > >>> > >>> > >>> -- > >>> You received this message because you are subscribed to the Google > Groups > >>> "sage-devel" group. > >>> To unsubscribe from this group and stop receiving emails from it, send > an > >>> email to sage-devel+...@googlegroups.com <javascript:>. > >>> To post to this group, send email to sage-...@googlegroups.com > <javascript:>. > >>> Visit this group at https://groups.google.com/group/sage-devel. > >>> For more options, visit https://groups.google.com/d/optout. > >> > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "sage-devel" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an > >> email to sage-devel+...@googlegroups.com <javascript:>. > >> To post to this group, send email to sage-...@googlegroups.com > <javascript:>. > >> Visit this group at https://groups.google.com/group/sage-devel. > >> For more options, visit https://groups.google.com/d/optout. > > > >-- > >You received this message because you are subscribed to the Google Groups > "sage-devel" group. > >To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+...@googlegroups.com <javascript:>. > >To post to this group, send email to sage-...@googlegroups.com > <javascript:>. > >Visit this group at https://groups.google.com/group/sage-devel. > >For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.