From tbttfox at gmail.com Wed Oct 18 21:08:59 2017 From: tbttfox at gmail.com (Tyler Fox) Date: Thu, 19 Oct 2017 01:08:59 +0000 Subject: [code-quality] Pylint Plugin help: Transform class locals to instances of provided types Message-ID: I've got a class that does some metaclass magic. Some class members are passed a type, and the metaclass turns those objects into instances of the type. How can I set that up in a pylint plugin? I've made it as far as identifying the members and the type names, but I have no idea what to do next. Any help would be greatly appreciated (If this doesn't work, maybe there's a way to just remove the type inference for those members? No idea how to do that either) from astroid import MANAGER from astroid import nodes, node_classes # Removed a bunch of safety code for the sake of brevity and clarity def transform_myClass(node): for key, value in node.locals.items(): val = value[0] s = val.statement().value # ArgumentObj is the class that stores the types if s.func.name == 'ArgumentObj': for child in s.get_children(): if isinstance(child, node_classes.Keyword): # allowedTypes is the kwarg that recieves a *TUPLE* of types # The first one gets instantiated, but the others are allowed if child.arg == 'allowedTypes': typeNames = child.value # A tuple of names of type objects #### And here is where I have no idea what to do next #### MANAGER.register_transform(nodes.ClassDef, transform_myClass) ~T.Fox -------------- next part -------------- An HTML attachment was scrubbed... URL: From sahumada at texla.cl Mon Oct 23 13:43:54 2017 From: sahumada at texla.cl (Sergio Ahumada) Date: Mon, 23 Oct 2017 19:43:54 +0200 Subject: [code-quality] flake8 3.5.0 Message-ID: <9d790b35-f127-6b7f-4b0e-eaa9f57335b7@texla.cl> Hello, I seems like flake8 3.5.0 was released today and I was wondering where can I find some release notes about what is new. Since I don't have the version pinned when creating the virtualenv, today some of my CIs broke due to a new (already fixed, but took me some time) error "E722 (bare except)". Is https://gitlab.com/pycqa/flake8/milestones/20 the only place where I can find such information? Cheers, -- Sergio Ahumada sahumada at texla.cl From graffatcolmingov at gmail.com Mon Oct 23 14:19:02 2017 From: graffatcolmingov at gmail.com (Ian Stapleton Cordasco) Date: Mon, 23 Oct 2017 13:19:02 -0500 Subject: [code-quality] flake8 3.5.0 In-Reply-To: <9d790b35-f127-6b7f-4b0e-eaa9f57335b7@texla.cl> References: <9d790b35-f127-6b7f-4b0e-eaa9f57335b7@texla.cl> Message-ID: I do my best to collate the release notes in our documentation: http://flake8.pycqa.org/en/latest/release-notes/3.5.0.html Are these notes not sufficiently discoverable from the front page of the documentation (http://flake8.pycqa.org/en/latest/index.html)? Sent from my phone with my typo-happy thumbs. Please excuse my brevity On Oct 23, 2017 12:46, "Sergio Ahumada" wrote: > Hello, > > I seems like flake8 3.5.0 was released today and I was wondering where can > I find some release notes about what is new. > > Since I don't have the version pinned when creating the virtualenv, today > some of my CIs broke due to a new (already fixed, but took me some time) > error "E722 (bare except)". > > Is https://gitlab.com/pycqa/flake8/milestones/20 the only place where I > can find such information? > > Cheers, > -- > Sergio Ahumada > sahumada at texla.cl > > _______________________________________________ > code-quality mailing list > code-quality at python.org > https://mail.python.org/mailman/listinfo/code-quality > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sahumada at texla.cl Mon Oct 23 14:41:58 2017 From: sahumada at texla.cl (Sergio Ahumada) Date: Mon, 23 Oct 2017 20:41:58 +0200 Subject: [code-quality] flake8 3.5.0 In-Reply-To: References: <9d790b35-f127-6b7f-4b0e-eaa9f57335b7@texla.cl> Message-ID: <5887c3ae-fd6f-e122-a5e0-b8740e7545f8@texla.cl> On 23.10.2017 20:19, Ian Stapleton Cordasco wrote: > I do my best to collate the release notes in our documentation: > http://flake8.pycqa.org/en/latest/release-notes/3.5.0.html > > Are these notes not sufficiently discoverable from the front page of the > documentation (http://flake8.pycqa.org/en/latest/index.html)? > Hi, This is exactly what I was looking for, but I didn't get to that page by a simple search in google. I just found https://pypi.python.org/pypi/pytest-flake8 I'll bookmark both now. Thanks! Cheers, -- Sergio Ahumada sahumada at texla.cl From komal436 at gmail.com Fri Oct 27 04:20:22 2017 From: komal436 at gmail.com (komal kumar) Date: Fri, 27 Oct 2017 13:50:22 +0530 Subject: [code-quality] Permission to push changes to pylint Message-ID: Hi, I am getting permission denied to push changes to pylint. My GitHub user id is: komal436. Can the team provide the permissions? Regards, Komal. -------------- next part -------------- An HTML attachment was scrubbed... URL: From graffatcolmingov at gmail.com Sat Oct 28 07:36:24 2017 From: graffatcolmingov at gmail.com (Ian Stapleton Cordasco) Date: Sat, 28 Oct 2017 06:36:24 -0500 Subject: [code-quality] Permission to push changes to pylint In-Reply-To: References: Message-ID: On Fri, Oct 27, 2017 at 3:20 AM, komal kumar wrote: > Hi, > > I am getting permission denied to push changes to pylint. > My GitHub user id is: komal436. > Can the team provide the permissions? Since you're making your first contribution Komal, you do not have push access to the repository. Instead, using GitHub, you must fork the repository, push to your fork, and submit a pull request. Eventually, if the team decides to invite you, you may be able to then push directly to Pylint. Until then, for that project (and most others on GitHub) you will need to follow the workflow above. If you need more help you should reference GitHub's documentation: https://help.github.com/articles/fork-a-repo/ https://help.github.com/articles/be-social/#pull-requests Cheers, Ian