From graffatcolmingov at gmail.com Tue Mar 26 15:06:31 2013 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Tue, 26 Mar 2013 10:06:31 -0400 Subject: [code-quality] Flake8 API Message-ID: Part of the 2.0 redesign (in my mind) was to open up the avenue of having an API as part of Flake8 to allow people to do fun stuff with it. Unfortunately it seems we did not open it enough. Take a look at this issue on pep8: https://github.com/jcrocholl/pep8/pull/181. It's an odd request but it makes some sense to allow people to pass their own everything to Flake8 using our tools. I have a few ideas about how to make this easier for others to extend, but I'm not sure if they're overkill or not. The first is to have main create a StyleGuide and pass it to a function that does the rest of main with the StyleGuide that was passed in. This allows people to use `get_style_guide` to retrieve a StyleGuide with their own options and do all kinds of wonderful (horrible) things to it and then uses it to execute main. The issue with this is they could ostensibly remove options or methods that main currently relies on (and therefore this other function would rely on). The second is not much different but would allow main to directly take **kwargs and merge those with what we pass to `get_style_guide` (this is actually Florent's idea). The former feels more flexible and yet dangerous, the other seems less flexible but almost flexible enough for what seems to be the current use case. Any and all opinions are welcome. Thanks, Ian P.S. Anyone with Mercurial extension experience, please contact me separately. ;-) From graffatcolmingov at gmail.com Wed Mar 27 15:20:04 2013 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Wed, 27 Mar 2013 10:20:04 -0400 Subject: [code-quality] Flake8 API In-Reply-To: References: Message-ID: On Tue, Mar 26, 2013 at 10:06 AM, Ian Cordasco wrote: > Part of the 2.0 redesign (in my mind) was to open up the avenue of > having an API as part of Flake8 to allow people to do fun stuff with > it. Unfortunately it seems we did not open it enough. Take a look at > this issue on pep8: https://github.com/jcrocholl/pep8/pull/181. It's > an odd request but it makes some sense to allow people to pass their > own everything to Flake8 using our tools. I have a few ideas about how > to make this easier for others to extend, but I'm not sure if they're > overkill or not. > > The first is to have main create a StyleGuide and pass it to a > function that does the rest of main with the StyleGuide that was > passed in. This allows people to use `get_style_guide` to retrieve a > StyleGuide with their own options and do all kinds of wonderful > (horrible) things to it and then uses it to execute main. The issue > with this is they could ostensibly remove options or methods that main > currently relies on (and therefore this other function would rely on). > > The second is not much different but would allow main to directly take > **kwargs and merge those with what we pass to `get_style_guide` (this > is actually Florent's idea). > > The former feels more flexible and yet dangerous, the other seems less > flexible but almost flexible enough for what seems to be the current > use case. > > Any and all opinions are welcome. > > Thanks, > Ian > > P.S. > > Anyone with Mercurial extension experience, please contact me separately. ;-) So actually this was wholly unnecessary. The resolution can be found here: https://github.com/schlamar/flake8-immediate From graffatcolmingov at gmail.com Wed Mar 27 15:26:55 2013 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Wed, 27 Mar 2013 10:26:55 -0400 Subject: [code-quality] Flake8 Extensions Message-ID: I've started a list in the documentation to keep track of all of the Flake8 extensions currently in existence. You can find it here: http://flake8.readthedocs.org/en/latest/extensions.html#existing-extensions And pull requests to add more are always welcome! From florent.xicluna at gmail.com Wed Mar 27 15:51:01 2013 From: florent.xicluna at gmail.com (Florent) Date: Wed, 27 Mar 2013 15:51:01 +0100 Subject: [code-quality] Flake8 Extensions In-Reply-To: References: Message-ID: Thank you Ian, This is useful to keep a reference for the extensions somewhere in the documentation. For the record, there was a page on the Pep8 wiki with some tools related to Pep8 and code quality: https://github.com/jcrocholl/pep8/wiki/RelatedTools It is just an additional reference, I don't think there's any reason to give it more visibility. -- Florent 2013/3/27 Ian Cordasco > I've started a list in the documentation to keep track of all of the > Flake8 extensions currently in existence. You can find it here: > http://flake8.readthedocs.org/en/latest/extensions.html#existing-extensions > And pull requests to add more are always welcome! > _______________________________________________ > code-quality mailing list > code-quality at python.org > http://mail.python.org/mailman/listinfo/code-quality > -------------- next part -------------- An HTML attachment was scrubbed... URL: From graffatcolmingov at gmail.com Wed Mar 27 15:53:18 2013 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Wed, 27 Mar 2013 10:53:18 -0400 Subject: [code-quality] Flake8 Extensions In-Reply-To: References: Message-ID: I forgot about that. It would probably be beneficial to add it to the docs so that people realize how many other tools work with pep8 and flake8. Feel free to add a link in our docs or move that to the Flake8 docs and add a link to it in the wiki. Either way works for me. :-) On Wed, Mar 27, 2013 at 10:51 AM, Florent wrote: > Thank you Ian, > > This is useful to keep a reference for the extensions somewhere in the > documentation. > For the record, there was a page on the Pep8 wiki with some tools related to > Pep8 and code quality: https://github.com/jcrocholl/pep8/wiki/RelatedTools > > It is just an additional reference, I don't think there's any reason to give > it more visibility. > > > -- > Florent > > > > 2013/3/27 Ian Cordasco >> >> I've started a list in the documentation to keep track of all of the >> Flake8 extensions currently in existence. You can find it here: >> >> http://flake8.readthedocs.org/en/latest/extensions.html#existing-extensions >> And pull requests to add more are always welcome! >> _______________________________________________ >> code-quality mailing list >> code-quality at python.org >> http://mail.python.org/mailman/listinfo/code-quality > > > > _______________________________________________ > code-quality mailing list > code-quality at python.org > http://mail.python.org/mailman/listinfo/code-quality > From tarek at ziade.org Thu Mar 28 22:31:56 2013 From: tarek at ziade.org (=?ISO-8859-1?Q?Tarek_Ziad=E9?=) Date: Thu, 28 Mar 2013 22:31:56 +0100 Subject: [code-quality] Maintainability index Message-ID: <5154B6CC.9040403@ziade.org> Hey! I've discovered a new metrics : https://blogs.msdn.com/b/codeanalysis/archive/2007/11/20/maintainability-index-range-and-meaning.aspx I wonder how this would work on Python - I might experiment. Anyone have heard of this one before ? Cheers Tarek -- Tarek Ziad? ? http://ziade.org ? @tarek_ziade From graffatcolmingov at gmail.com Thu Mar 28 23:03:15 2013 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Thu, 28 Mar 2013 18:03:15 -0400 Subject: [code-quality] Maintainability index In-Reply-To: <5154B6CC.9040403@ziade.org> References: <5154B6CC.9040403@ziade.org> Message-ID: Interesting. That shouldn't be too terrible to implement. I have to wonder the origins of that magical constant, 171, though and if it would vary depending on language. On Thu, Mar 28, 2013 at 5:31 PM, Tarek Ziad? wrote: > Hey! > > I've discovered a new metrics : > https://blogs.msdn.com/b/codeanalysis/archive/2007/11/20/maintainability-index-range-and-meaning.aspx > > I wonder how this would work on Python - I might experiment. Anyone have > heard of this one before ? > > > Cheers > Tarek > > -- > Tarek Ziad? ? http://ziade.org ? @tarek_ziade > > _______________________________________________ > code-quality mailing list > code-quality at python.org > http://mail.python.org/mailman/listinfo/code-quality From tarek at ziade.org Thu Mar 28 23:32:16 2013 From: tarek at ziade.org (=?ISO-8859-1?Q?Tarek_Ziad=E9?=) Date: Thu, 28 Mar 2013 23:32:16 +0100 Subject: [code-quality] Maintainability index In-Reply-To: References: <5154B6CC.9040403@ziade.org> Message-ID: <5154C4F0.3040703@ziade.org> On 3/28/13 11:03 PM, Ian Cordasco wrote: > Interesting. That shouldn't be too terrible to implement. I have to > wonder the origins of that magical constant, 171, though and if it > would vary depending on language. Yeah I think they just tweaked it until they got decent results > On Thu, Mar 28, 2013 at 5:31 PM, Tarek Ziad? wrote: >> Hey! >> >> I've discovered a new metrics : >> https://blogs.msdn.com/b/codeanalysis/archive/2007/11/20/maintainability-index-range-and-meaning.aspx >> >> I wonder how this would work on Python - I might experiment. Anyone have >> heard of this one before ? >> >> >> Cheers >> Tarek >> >> -- >> Tarek Ziad? ? http://ziade.org ? @tarek_ziade >> >> _______________________________________________ >> code-quality mailing list >> code-quality at python.org >> http://mail.python.org/mailman/listinfo/code-quality -- Tarek Ziad? ? http://ziade.org ? @tarek_ziade