From nobody Thu May 16 23:20:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1558773604; cv=none; d=zoho.com; s=zohoarc; b=LsSs0lh3OKLxFHRiFZLEEo7Z7BwLP721UraDn92jy3oh0DTvR7E4+/qUc8gEPovv2Ow2a7pN25hEaEaItpLj6ruCPPq1qX9K1YQScND5qrEabQtbZ4lE//IVn8bdjZbRxcojd1aynIrdG7ryVTsA3dcp2ckyeVQN/vX8WSmRFhQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558773604; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=roE1lsQhRTNW9CeHIa/lwKKnugJ6zDAjotn2o48wTtk=; b=VHWsied6H896jQw2BY8Bi8w2wZvFy9IFSTND6NHmt1i7XEfqLXUoEp4KwOj3L11TfBybc/4RcpH0YgVJQf+GGyyN4H5Iez1G/pdtn5EEx+iUXQXOLUEBPuY7KkGkcrCDiWooh9cb2epmbcKjS0rcnw0mHfGKYOpXb8hOIYcs/64= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1558773604615610.5999124115324; Sat, 25 May 2019 01:40:04 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 67E3A859FB; Sat, 25 May 2019 08:39:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C5BA17C2F; Sat, 25 May 2019 08:39:57 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 524C41806B13; Sat, 25 May 2019 08:39:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4P8dq3e022587 for ; Sat, 25 May 2019 04:39:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9A94710021B1; Sat, 25 May 2019 08:39:52 +0000 (UTC) Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.42]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 956781001F5D for ; Sat, 25 May 2019 08:39:50 +0000 (UTC) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 71E8E308213B for ; Sat, 25 May 2019 08:39:31 +0000 (UTC) Received: by mail-wr1-f45.google.com with SMTP id t4so3838065wrx.7 for ; Sat, 25 May 2019 01:39:31 -0700 (PDT) Received: from donizetti.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id u15sm9569001wru.16.2019.05.25.01.39.29 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 May 2019 01:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+uxzyA4oNIkOmAdSuNnQPDwygP+YWCYnAMDt5x0FTD4=; b=R4OeyBdghUsX65sN2d/WT3RV1+wE8x9tIcagZRMZ7OnJ7p8ZXyn2qFPDV69lCEjwJC sSw1YTw0j7rRHEW93XaZqWkeOvgNtg5QRqvjcsGuDl2bzFzK/fQZrmisDQhYBMkJz+tJ bMRFfd+Bg4eoBuULhktqDnqNih02oLcuvGPBWQLOr7sAOosaO/DTx53OUpqdsPk67CK5 QiEHiqCLuxxeewyOiVfWgnmC5eI0MeT3opBF98eKneJ5h6/if/ukgUZMlNS4Xab7vCug BLzhxbYJVoHVJzk0eW0MJ3dvh4CwjcSeH41N9ORgBLoTn9jjNQqvdB+9v4oTggy0+TEN KkrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=+uxzyA4oNIkOmAdSuNnQPDwygP+YWCYnAMDt5x0FTD4=; b=QxsWAd347qOT6PAKzZ10AznQ8uSnvXXg+efjhiV9K6SkCeuVgrGSfm5jgLwo9Cvybx kBPIcVbUG2ZRxuBz+3RSawbXiHIe5273x8ky8ruaYmzYwe+9NUOgjfAOZdDJYqKk4dF5 WPv68Hg/T/DBJIv5ro23iOMXismXA2g+iJ9o9bRxsXI55+pGbSSDaxH9KDp5bJe/XfUx cgFpZ94tULnGXNnF3liW3gFtJojKfTfT1SWmjKWd1hEQ75kqB0fOu9gZCQNNY/YzdyaQ SDVM54eXRbei78oMF5oXbCQEmYA84rbfzoRtVE0Gg5PiKAqQFeN0kRIs+K/fgqO6Jex5 z3xg== X-Gm-Message-State: APjAAAUvqmOcQFv9N/umLKc3mQRH+/Z4hFrFtj/s4sezlg8Yp7Cw29NI T3JQgnOim3lsI81wyQU/X4f6MPq/ X-Google-Smtp-Source: APXvYqyFq0Q2eAtIAR4W7W3+pxKU1leJrBwRM12hq9I5qe7pMR1GM1hIQb3xUVArIrQGVEIFEGaZSw== X-Received: by 2002:a5d:4988:: with SMTP id r8mr2834442wrq.57.1558773569853; Sat, 25 May 2019 01:39:29 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Sat, 25 May 2019 10:39:24 +0200 Message-Id: <20190525083927.8277-2-pbonzini@redhat.com> In-Reply-To: <20190525083927.8277-1-pbonzini@redhat.com> References: <20190525083927.8277-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Sat, 25 May 2019 08:39:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Sat, 25 May 2019 08:39:31 +0000 (UTC) for IP:'209.85.221.45' DOMAIN:'mail-wr1-f45.google.com' HELO:'mail-wr1-f45.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.191 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS) 209.85.221.45 mail-wr1-f45.google.com 209.85.221.45 mail-wr1-f45.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.84 on 10.5.110.42 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 1/4] modules: do not use "import *" X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sat, 25 May 2019 08:39:58 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" import * prevents static analysis of undefined symbols, drop it. Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- mod.py | 16 ++++++++-------- mods/email.py | 30 +++++++++++++++--------------- mods/git.py | 10 +++++----- mods/testing.py | 22 +++++++++++----------- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/mod.py b/mod.py index a7ba7e2..d47745c 100644 --- a/mod.py +++ b/mod.py @@ -15,7 +15,7 @@ from django.conf import settings from django.template import Template, Context import traceback import configparser -from schema import * +import schema =20 class PatchewModule(object): """ Module base class """ @@ -103,22 +103,22 @@ class PatchewModule(object): value=3Dconfig) =20 def _build_one(self, request, project, prefix, config, scm): - if type(scm) =3D=3D MapSchema: + if type(scm) =3D=3D schema.MapSchema: return self._build_map_scm(request, project, prefix, config, s= cm) - elif type(scm) =3D=3D StringSchema: + elif type(scm) =3D=3D schema.StringSchema: return self._build_string_scm(request, project, prefix, config= , scm) - elif type(scm) =3D=3D IntegerSchema: + elif type(scm) =3D=3D schema.IntegerSchema: return self._build_integer_scm(request, project, prefix, confi= g, scm) - elif type(scm) =3D=3D BooleanSchema: + elif type(scm) =3D=3D schema.BooleanSchema: return self._build_boolean_scm(request, project, prefix, confi= g, scm) - elif type(scm) =3D=3D EnumSchema: + elif type(scm) =3D=3D schema.EnumSchema: return self._build_enum_scm(request, project, prefix, config, = scm) - elif type(scm) =3D=3D ArraySchema: + elif type(scm) =3D=3D schema.ArraySchema: return self._build_array_scm(request, project, prefix, config,= scm) assert False =20 def build_config_html(self, request, project): - assert isinstance(self.project_config_schema, ArraySchema) + assert isinstance(self.project_config_schema, schema.ArraySchema) scm =3D self.project_config_schema config =3D self.get_project_config(project) return self._build_one(request, project, scm.name, config, scm) diff --git a/mods/email.py b/mods/email.py index 175af9d..e95fbe9 100644 --- a/mods/email.py +++ b/mods/email.py @@ -21,7 +21,7 @@ import email.utils import uuid from api.models import Message, Project from event import register_handler, get_events_info -from schema import * +import schema =20 _default_config =3D """ [smtp] @@ -52,46 +52,46 @@ Email information is configured in "INI" style: default_config =3D _default_config =20 email_schema =3D \ - ArraySchema("{name}", "Email Notification", + schema.ArraySchema("{name}", "Email Notification", desc=3D"Email notification", members=3D[ - EnumSchema("event", "Event", + schema.EnumSchema("event", "Event", enums=3Dlambda: get_events_info(), required=3DTrue, desc=3D"Which event to trigger the emai= l notification"), - BooleanSchema("enabled", "Enabled", + schema.BooleanSchema("enabled", "Enabled", desc=3D"Whether this event is enable= d", default=3DTrue), - BooleanSchema("reply_to_all", "Reply to all", + schema.BooleanSchema("reply_to_all", "Reply to all= ", desc=3D'If set, Cc all the receipien= ts of the email message associated to the event. Also, if set the original = sender of the email message will be a recipient even if the "to" field is n= onempty', default=3DFalse), - BooleanSchema("in_reply_to", "Set In-Reply-To", + schema.BooleanSchema("in_reply_to", "Set In-Reply-= To", desc=3D'Whether to set In-Reply-To t= o the message id, if the event has an associated email message', default=3DTrue), - BooleanSchema("set_reply_to", "Set Reply-To", + schema.BooleanSchema("set_reply_to", "Set Reply-To= ", desc=3D'Whether to set Reply-To to t= he project mailing list, if the event has an associated email message', default=3DTrue), - BooleanSchema("reply_subject", "Set replying subje= ct", + schema.BooleanSchema("reply_subject", "Set replyin= g subject", desc=3D'Whether to set Subject to "R= e: xxx", if the event has an associated email message', default=3DTrue), - BooleanSchema("to_user", "Send to user", + schema.BooleanSchema("to_user", "Send to user", desc=3D'Whether to set To to a user = email, if the event has an associated user', default=3DFalse), - StringSchema("to", "To", desc=3D"Send email to"), - StringSchema("cc", "Cc", desc=3D"Cc list"), - StringSchema("subject_template", "Subject template= ", + schema.StringSchema("to", "To", desc=3D"Send email= to"), + schema.StringSchema("cc", "Cc", desc=3D"Cc list"), + schema.StringSchema("subject_template", "Subject t= emplate", desc=3D"""The django template for sub= ject""", required=3DTrue), - StringSchema("body_template", "Body template", + schema.StringSchema("body_template", "Body templat= e", desc=3D"The django template for email= body.", multiline=3DTrue, required=3DTrue), ]) =20 project_config_schema =3D \ - ArraySchema("email", desc=3D"Configuration for email module", + schema.ArraySchema("email", desc=3D"Configuration for email module= ", members=3D[ - MapSchema("notifications", "Email notifications", + schema.MapSchema("notifications", "Email notificat= ions", desc=3D"Email notifications", item=3Demail_schema), ]) diff --git a/mods/git.py b/mods/git.py index 78939b8..753da7e 100644 --- a/mods/git.py +++ b/mods/git.py @@ -25,7 +25,7 @@ from api.models import (Message, Project, Result) from api.rest import PluginMethodField, SeriesSerializer, reverse_detail from api.views import APILoginRequiredView, prepare_series from patchew.logviewer import LogView -from schema import * +import schema from rest_framework import generics, mixins, serializers from rest_framework.fields import CharField, SerializerMethodField =20 @@ -64,14 +64,14 @@ class GitModule(PatchewModule): result_data_serializer_class =3D ResultDataSerializer =20 project_config_schema =3D \ - ArraySchema("git", desc=3D"Configuration for git module", + schema.ArraySchema("git", desc=3D"Configuration for git module", members=3D[ - StringSchema("push_to", "Push remote", + schema.StringSchema("push_to", "Push remote", desc=3D"Remote to push to", required=3DTrue), - StringSchema("public_repo", "Public repo", + schema.StringSchema("public_repo", "Public repo", desc=3D"Publicly visible repo URL"), - StringSchema("url_template", "URL template", + schema.StringSchema("url_template", "URL template", desc=3D"Publicly visible URL template= for applied branch, where %t will be replaced by the applied tag name", required=3DTrue), ]) diff --git a/mods/testing.py b/mods/testing.py index 90bb2be..cece418 100644 --- a/mods/testing.py +++ b/mods/testing.py @@ -24,7 +24,7 @@ from api.rest import PluginMethodField, TestPermission, r= everse_detail from api.search import SearchEngine from event import emit_event, declare_event, register_handler from patchew.logviewer import LogView -from schema import * +import schema from rest_framework import serializers, generics from rest_framework.fields import CharField, BooleanField from rest_framework.response import Response @@ -64,17 +64,17 @@ class TestingModule(PatchewModule): result_data_serializer_class =3D ResultDataSerializer =20 test_schema =3D \ - ArraySchema("{name}", "Test", desc=3D"Test spec", + schema.ArraySchema("{name}", "Test", desc=3D"Test spec", members=3D[ - BooleanSchema("enabled", "Enabled", + schema.BooleanSchema("enabled", "Enabled", desc=3D"Whether this test is enabled= ", default=3DTrue), - StringSchema("requirements", "Requirements", + schema.StringSchema("requirements", "Requirements", desc=3D"List of requirements of the t= est"), - IntegerSchema("timeout", "Timeout", + schema.IntegerSchema("timeout", "Timeout", default=3D3600, desc=3D"Timeout for the test"), - StringSchema("script", "Test script", + schema.StringSchema("script", "Test script", desc=3D"The testing script", default=3DTESTING_SCRIPT_DEFAULT, multiline=3DTrue, @@ -82,9 +82,9 @@ class TestingModule(PatchewModule): ]) =20 requirement_schema =3D \ - ArraySchema("{name}", "Requirement", desc=3D"Test requirement spec= ", + schema.ArraySchema("{name}", "Requirement", desc=3D"Test requireme= nt spec", members=3D[ - StringSchema("script", "Probe script", + schema.StringSchema("script", "Probe script", desc=3D"The probing script for this r= equirement", default=3D"#!/bin/bash\ntrue", multiline=3DTrue, @@ -92,12 +92,12 @@ class TestingModule(PatchewModule): ]) =20 project_config_schema =3D \ - ArraySchema("testing", desc=3D"Configuration for testing module", + schema.ArraySchema("testing", desc=3D"Configuration for testing mo= dule", members=3D[ - MapSchema("tests", "Tests", + schema.MapSchema("tests", "Tests", desc=3D"Testing specs", item=3Dtest_schema), - MapSchema("requirements", "Requirements", + schema.MapSchema("requirements", "Requirements", desc=3D"Requirement specs", item=3Drequirement_schema), ]) --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu May 16 23:20:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1558773602; cv=none; d=zoho.com; s=zohoarc; b=dvHv8rahD3MgjDxefDPi0qB+G+7iLT+wLfM4A2FtWOB+iiZ5dvrxkphHUxyIzHn7QN3t8AHlShcQRGYqaRcuMEBuBQXyTvhp8/bNl4wkRlQUJ3KLTzd7K/wpyYjqFYU5RFNCWVociOEOJmm4di35sQBFRqrFJHayb5OU+yA88JI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558773602; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=wpyrYpydN15UU4seSqUb/4snZTrZZ5FZQgmWS7YbVYE=; b=CFrFa5r5RKtsjYz2tjRbSzPaUuRsNDELza89Lm/k4LKN4QoAftunPg/HFZQylRSznFzn7oAGDpNPLjaryBphGYG9KyvqhBgEjAg3gUStMAfLWvDY4Jj+y3oKs/XU7scKTDoI75YykAnFkT1ybpgvT6c5P4bvVXIw2SAJyf1rLsA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155877360249163.56671206176884; Sat, 25 May 2019 01:40:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4EBEF308626C; Sat, 25 May 2019 08:39:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 434C52B8D6; Sat, 25 May 2019 08:39:56 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3497A1806B13; Sat, 25 May 2019 08:39:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4P8dq3X022582 for ; Sat, 25 May 2019 04:39:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 782736013D; Sat, 25 May 2019 08:39:52 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 72FC261359 for ; Sat, 25 May 2019 08:39:50 +0000 (UTC) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 69A995AFE9 for ; Sat, 25 May 2019 08:39:32 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id l2so12112645wrb.9 for ; Sat, 25 May 2019 01:39:32 -0700 (PDT) Received: from donizetti.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id u15sm9569001wru.16.2019.05.25.01.39.30 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 May 2019 01:39:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4tDzQMHPAkhx8vxqek5sWTgLULl4oMxRUeenyZeQwow=; b=rmJ7NSsRt4be8MpLuw41rlOexwlpBqYjpzrgPK2Pe7/0ZtjCbZpvxPaA0PLPCCox61 8Pnx060yVnIeqQac/FmJi0uCpX8gjlUfWT6J9x3BXPxhnIdeAy2sqNiHzviggX1YLgue 3RYIbKw9fZ5+zDiHb70UGj8a6/tFo+GPkD0Zl3dqqgp7t9A8iAtwXH3hZMqY2iB/NrKh GINeCIWkQw5NatF9IYAA+x7HNpghSRSsHVfSQZYhsXhcjm3E+4Jz8WAQJ7zwGS1eKu0u 0/yXnXGxolib8OBIAzVaS3fJs43Q1fFN/kj2ZNbisndyGTwuwBgHELuK+TNtcLUpWbo9 Dh3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4tDzQMHPAkhx8vxqek5sWTgLULl4oMxRUeenyZeQwow=; b=tBPu4wFsXyjNxvERLF2robq7vNLsUd9/FFX6XDMJxWyHbf/bBRPDLpNoBxj4H7Jg/n vPMl7MFrka4SK/U/Q4SCIKSrPYmcmkVR+wp8+dmgXNN5EQZfMAkzFWwFAbBJLLkvKQjZ PQAb+oYnSRtnIUiWyeZivXPy0uIi8sZkOdHq8RJGyCLPtra/FCCHJg9msNiTDbmotJzA u0mZCFdGNzEiwZYkTBiZjyO+mjzOF++Q3VW9gznsXVFHg+wuZXznRVZwUl+t6cg9XT9k tqfdP+rOfXmIn1sA4GW1GfDEoQGYGqlR/aZCDVlhFlTZaXZLpk2VJv5Ro6jd4ZRnqWKT Ji6A== X-Gm-Message-State: APjAAAVELGlxoKYzD/UpFSJMonD6paFt0FuKbe9POG5j7oxso7Ch6yqk VLT5Bq20LYBQ8mTJNpPxicOP15O1 X-Google-Smtp-Source: APXvYqz3SQ/nDz2nGdzOzMyJLtiF/64NIqEzbNwULVyNnppWE6I4rEfCFfmNO3MBmQbOANH2UuiDyQ== X-Received: by 2002:a5d:49c1:: with SMTP id t1mr66661358wrs.247.1558773570799; Sat, 25 May 2019 01:39:30 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Sat, 25 May 2019 10:39:25 +0200 Message-Id: <20190525083927.8277-3-pbonzini@redhat.com> In-Reply-To: <20190525083927.8277-1-pbonzini@redhat.com> References: <20190525083927.8277-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sat, 25 May 2019 08:39:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sat, 25 May 2019 08:39:32 +0000 (UTC) for IP:'209.85.221.68' DOMAIN:'mail-wr1-f68.google.com' HELO:'mail-wr1-f68.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.206 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.221.68 mail-wr1-f68.google.com 209.85.221.68 mail-wr1-f68.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 2/4] remove unused imports X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Sat, 25 May 2019 08:39:56 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Patch generated by autoflake. Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- api/migrations/0028_populate_git_results.py | 2 -- api/migrations/0029_populate_testing_results.py | 2 -- api/migrations/0030_deblob_properties.py | 3 --- api/migrations/0036_populate_message_tags.py | 2 -- api/migrations/0038_populate_default_groups.py | 2 -- api/migrations/0041_postgres_fts.py | 3 +-- api/migrations/0042_review_to_queue.py | 3 +-- api/migrations/0047_populate_project_config.py | 1 - api/migrations/0049_populate_message_flags.py | 1 - api/migrations/0051_populate_property_fields.py | 2 -- mods/git.py | 7 ++----- tests/test_import.py | 1 - www/views.py | 1 - 13 files changed, 4 insertions(+), 26 deletions(-) diff --git a/api/migrations/0028_populate_git_results.py b/api/migrations/0= 028_populate_git_results.py index bc17e08..dd6f9bc 100644 --- a/api/migrations/0028_populate_git_results.py +++ b/api/migrations/0028_populate_git_results.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals =20 -from django.conf import settings from django.db import migrations -from django.db.models import Count from api.migrations import get_property, set_property, delete_property_blob =20 import datetime diff --git a/api/migrations/0029_populate_testing_results.py b/api/migratio= ns/0029_populate_testing_results.py index 0607936..0002de2 100644 --- a/api/migrations/0029_populate_testing_results.py +++ b/api/migrations/0029_populate_testing_results.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals =20 -from django.conf import settings from django.db import migrations -from django.db.models import Count from api.migrations import (get_property, get_property_raw, load_property, set_property, delete_property_blob) =20 diff --git a/api/migrations/0030_deblob_properties.py b/api/migrations/0030= _deblob_properties.py index 801f7a2..2750058 100644 --- a/api/migrations/0030_deblob_properties.py +++ b/api/migrations/0030_deblob_properties.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals =20 -from django.conf import settings from django.db import migrations -from django.db.models import Count =20 -import json from api import blobs =20 def deblob_properties(apps, schema_editor): diff --git a/api/migrations/0036_populate_message_tags.py b/api/migrations/= 0036_populate_message_tags.py index e9f2a70..681d70c 100644 --- a/api/migrations/0036_populate_message_tags.py +++ b/api/migrations/0036_populate_message_tags.py @@ -2,8 +2,6 @@ from __future__ import unicode_literals =20 from django.db import migrations -from django.db.models import Count -import json =20 =20 def tags_from_property(apps, schema_editor): diff --git a/api/migrations/0038_populate_default_groups.py b/api/migration= s/0038_populate_default_groups.py index b805da7..5fee0a3 100644 --- a/api/migrations/0038_populate_default_groups.py +++ b/api/migrations/0038_populate_default_groups.py @@ -2,8 +2,6 @@ from __future__ import unicode_literals =20 from django.db import migrations -from django.db.models import Count -import json =20 =20 def populate_default_groups(apps, schema_editor): diff --git a/api/migrations/0041_postgres_fts.py b/api/migrations/0041_post= gres_fts.py index d3b2fa8..9424b9e 100644 --- a/api/migrations/0041_postgres_fts.py +++ b/api/migrations/0041_postgres_fts.py @@ -2,8 +2,7 @@ # Generated by Django 1.11.16 on 2018-11-07 15:28 from __future__ import unicode_literals =20 -from django.db import migrations, models -import django.db.models.deletion +from django.db import migrations from django.contrib.postgres.operations import TrigramExtension =20 from api.migrations import PostgresOnlyMigration diff --git a/api/migrations/0042_review_to_queue.py b/api/migrations/0042_r= eview_to_queue.py index 8e1a33d..d9f193f 100644 --- a/api/migrations/0042_review_to_queue.py +++ b/api/migrations/0042_review_to_queue.py @@ -3,8 +3,7 @@ from __future__ import unicode_literals =20 from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion +from django.db import migrations =20 =20 class Migration(migrations.Migration): diff --git a/api/migrations/0047_populate_project_config.py b/api/migration= s/0047_populate_project_config.py index 2a86e1f..ee2f264 100644 --- a/api/migrations/0047_populate_project_config.py +++ b/api/migrations/0047_populate_project_config.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals =20 -from django.conf import settings from django.db import migrations from django.db.models import Q =20 diff --git a/api/migrations/0049_populate_message_flags.py b/api/migrations= /0049_populate_message_flags.py index 88e9a6b..d5302cf 100644 --- a/api/migrations/0049_populate_message_flags.py +++ b/api/migrations/0049_populate_message_flags.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals =20 -from django.conf import settings from django.db import migrations =20 def property_to_flags(apps, schema_editor): diff --git a/api/migrations/0051_populate_property_fields.py b/api/migratio= ns/0051_populate_property_fields.py index 2f36ceb..5bf07c4 100644 --- a/api/migrations/0051_populate_property_fields.py +++ b/api/migrations/0051_populate_property_fields.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals =20 -from django.conf import settings from django.db import migrations, transaction -from django.db.models import Q =20 def do_properties_to_field(obj, propset): properties =3D {} diff --git a/mods/git.py b/mods/git.py index 753da7e..14d54b6 100644 --- a/mods/git.py +++ b/mods/git.py @@ -10,23 +10,20 @@ =20 import os import subprocess -import hashlib -import json import rest_framework from django.conf.urls import url from django.http import Http404, HttpResponseRedirect from django.urls import reverse from django.core.exceptions import PermissionDenied from django.utils.html import format_html -from django.db.models import Q from mod import PatchewModule -from event import declare_event, register_handler, emit_event +from event import declare_event, register_handler from api.models import (Message, Project, Result) from api.rest import PluginMethodField, SeriesSerializer, reverse_detail from api.views import APILoginRequiredView, prepare_series from patchew.logviewer import LogView import schema -from rest_framework import generics, mixins, serializers +from rest_framework import generics, serializers from rest_framework.fields import CharField, SerializerMethodField =20 _instance =3D None diff --git a/tests/test_import.py b/tests/test_import.py index 466b45f..84bc70b 100755 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -8,7 +8,6 @@ # This work is licensed under the MIT License. Please see the LICENSE fil= e or # http://opensource.org/licenses/MIT. =20 -import json =20 from api.models import Message, Project =20 diff --git a/www/views.py b/www/views.py index 4436c7b..ccbbc6f 100644 --- a/www/views.py +++ b/www/views.py @@ -16,7 +16,6 @@ from django.urls import reverse from django.utils.html import format_html from django.conf import settings import api -import re from mod import dispatch_module_hook import subprocess =20 --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu May 16 23:20:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1558773601; cv=none; d=zoho.com; s=zohoarc; b=RJ7TycYp+xcIPTHdw2RbWLIX9bjL/46CuglF61PZFoBLrNWYv53WHZa/+iYS0D8lhSwkN5qSU7cRImRwBCWCydKy6tZK2G0I9Ha5lCvQua57AD4lMYAJgqr2pNUpr3bEEWvtV9TNtu7CklWjwqAfOC2oIHZoM2O8VDDLn7rBpRA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558773601; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=bMpd3UGUErs0SVpKWgnpioJOrWRpLVYfrYS5hfkO858=; b=g/hsxywURR19miJJJkERako8aaeHdXv4FOj/+OXtQURUDmB9mtaNlw3GRgR1LLOOqSIALoJc6Ad4XoRYBAEALh+BNO9hmGSJa8J2xX++HE0zDI8kuhwm/O5MIlKH6boBxh65nyO0Nid5v/XeBttGiHaqY+xzOuxCz3oaci4JWoo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1558773601066213.8419996859418; Sat, 25 May 2019 01:40:01 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 24F8C308FC47; Sat, 25 May 2019 08:39:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B2DE5D9D3; Sat, 25 May 2019 08:39:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C4CAB4EA6C; Sat, 25 May 2019 08:39:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4P8dqrp022573 for ; Sat, 25 May 2019 04:39:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 057C9579A9; Sat, 25 May 2019 08:39:52 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F317760610 for ; Sat, 25 May 2019 08:39:49 +0000 (UTC) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E9C659467 for ; Sat, 25 May 2019 08:39:33 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id d18so12119983wrs.5 for ; Sat, 25 May 2019 01:39:33 -0700 (PDT) Received: from donizetti.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id u15sm9569001wru.16.2019.05.25.01.39.31 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 May 2019 01:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5tgYxC24k1F03cJamcFu6CL0u1FQ59V/mQPNEqDmdvU=; b=TsPNfAoAphklG8qxvT9gt5e7mQRbAf6alwAsbGjPpr6AI1B2S+wfB11l9CZstB0nWW G6QCej82/6zf7u76wr+heSIMVc6NfnL2yPJkP+wnespvLy4PgRY9yhzCVz26cdZCd+4M yv6c9rCQAlih0eBdgaGGuTzxhk59I5uVkpTK06X9H09DmjM9/7qlz3zXDBIpwr0ii0kH IxbzhCtTp0epBucF3ISzI9+7zK6I08heuvUnw1aPc003CpZ9duHn8P9d249+dYVOgGcF HIYyl5kLsGiMFwJ8csOUWAPWCBWAXtBq34Dw5mSnJ3UwCRWPzjhVTQof5009DXVcN0bR 5TFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=5tgYxC24k1F03cJamcFu6CL0u1FQ59V/mQPNEqDmdvU=; b=lZOigTPsLPLlpfHpCHv/Y5d4Ke7LTy0CFN9wXoKufpthpQCbIdwNIRvu5nCWJBqa1Z cU1Ilf6h5MzOII2GDSC2l4tjm3KQbwR/sUEHc2gWYCEhwo2NALqEWw7ZUj9J1TCBrerS pKycywgOnwbBb60ucuJTNGT699Y7/l6RNgxS/9eT8znHujQ5riI05nngm4OULVXqXhK0 Lvk2WK7LImfQuEZ7nZfQqOFlIatucvzC1MSzkp5FEB7wQ238DlicdY7+bh+u4fU5g5SD UBRBbWI+oHDPSO1Knm42XEjrqfoe8OAQrhx22x9A3KB4KcchSgtA6Ru0x36gXKROML/J ZoEQ== X-Gm-Message-State: APjAAAXwQWkHvtXmqgrmuDX5Ei+xbB5g/OuWAt6LjM25DvhBSlPoOHsx nG1+S4bb7TU6ewgJXvCelxPi6Q8I X-Google-Smtp-Source: APXvYqxOwbf4U6ETafcCRv/fKC5pyjnybF+SSNKM0NufCLImv4HqeRDIPCCG7e0Bxpn0799c1AbkRg== X-Received: by 2002:a5d:40ca:: with SMTP id b10mr14945507wrq.10.1558773571650; Sat, 25 May 2019 01:39:31 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Sat, 25 May 2019 10:39:26 +0200 Message-Id: <20190525083927.8277-4-pbonzini@redhat.com> In-Reply-To: <20190525083927.8277-1-pbonzini@redhat.com> References: <20190525083927.8277-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sat, 25 May 2019 08:39:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sat, 25 May 2019 08:39:33 +0000 (UTC) for IP:'209.85.221.65' DOMAIN:'mail-wr1-f65.google.com' HELO:'mail-wr1-f65.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.192 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE) 209.85.221.65 mail-wr1-f65.google.com 209.85.221.65 mail-wr1-f65.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 3/4] remove dead code X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Sat, 25 May 2019 08:39:54 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Based on a patch generated by autoflake. --- api/migrations/0025_populate_project_maintainers.py | 1 - api/migrations/0028_populate_git_results.py | 3 --- mbox.py | 1 - mods/testing.py | 1 - 4 files changed, 6 deletions(-) diff --git a/api/migrations/0025_populate_project_maintainers.py b/api/migr= ations/0025_populate_project_maintainers.py index 3f9f3aa..0d83191 100644 --- a/api/migrations/0025_populate_project_maintainers.py +++ b/api/migrations/0025_populate_project_maintainers.py @@ -27,7 +27,6 @@ def maintainers_to_property(apps, schema_editor): # version than this migration expects. We use the historical version. Project =3D apps.get_model('api', 'Project') ProjectProperty =3D apps.get_model('api', 'ProjectProperty') - User =3D apps.get_model('auth', 'User') projects =3D Project.objects. \ annotate(maintainer_count=3DCount('maintainers')). \ filter(maintainer_count__gt=3D0) diff --git a/api/migrations/0028_populate_git_results.py b/api/migrations/0= 028_populate_git_results.py index dd6f9bc..ef7a593 100644 --- a/api/migrations/0028_populate_git_results.py +++ b/api/migrations/0028_populate_git_results.py @@ -49,8 +49,6 @@ def result_from_properties(apps, schema_editor): data['base'] =3D git_base r.status =3D api.models.Result.SUCCESS r.data =3D data - else: - status =3D api.models.Result.PENDING r.last_update =3D datetime.datetime.utcnow() r.save() messages =3D Message.objects.filter(properties__name=3D'git.apply-log'= , properties__blob=3DTrue) @@ -64,7 +62,6 @@ def result_to_properties(apps, schema_editor): Message =3D apps.get_model('api', 'Message') MessageProperty =3D apps.get_model('api', 'MessageProperty') MessageResult =3D apps.get_model('api', 'MessageResult') - LogEntry =3D apps.get_model('api', 'LogEntry') messages =3D Message.objects.filter(results__name=3D'git') for m in messages: r =3D MessageResult.objects.get(name=3D'git', message=3Dm) diff --git a/mbox.py b/mbox.py index 16b3fc9..c66dd95 100644 --- a/mbox.py +++ b/mbox.py @@ -72,7 +72,6 @@ class MboxMessage(object): only to prepend Re:, return an empty str strip_re: drop leading "Re:" prefixes""" def do_strip_tags(t): - diff_stats =3D t.strip() while t.startswith("[") and "]" in t: t =3D t[t.find("]") + 1:].strip() return t diff --git a/mods/testing.py b/mods/testing.py index cece418..ffd234f 100644 --- a/mods/testing.py +++ b/mods/testing.py @@ -302,7 +302,6 @@ class TestingModule(PatchewModule): html_log_url=3Dhtml_log_url, is_timeout=3Dis_timeout) =20 def get_tests(self, obj): - ret =3D {} if isinstance(obj, Message): obj =3D obj.project return self.get_project_config(obj).get("tests", {}) --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu May 16 23:20:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1558773600; cv=none; d=zoho.com; s=zohoarc; b=bpXrQb8tSqZrcePV1apgWqFpJe3kKlqYbJWpuAt0pr0sPveojsmdP1wuuBsf7xdJc47UgrtD6HWYGELEcrlillHBBUifRLMqBigDObcP5xId2fi1w8NH0gYFMB7JkZpn+qf0F5zi36hLyHwkONIHJsYKTKWlITNGQ2L/I0drhM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558773600; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=8ZFMtBPneEwi7YU1IytJObEAVjTB3IfW3tTi3TKMwGU=; b=YpVkMgeSxABpcgbEQiTYk7OainvSeOfHxreN67ry2wTwOT5vkzhS4n/CUrkY5P7syBYHrQRCrZQASAlSCs/oAjDDsUZOu5LZAf2KfZmeAiMWbHN2NVcogULJAb9ZXAB/BMF9L6uoNcanQUiiGHgO752a1pHmpegcWborn+kufdA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1558773600771165.0976484907659; Sat, 25 May 2019 01:40:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 56F79368E0; Sat, 25 May 2019 08:39:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4BC6F60606; Sat, 25 May 2019 08:39:56 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4418054D3D; Sat, 25 May 2019 08:39:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4P8dsCs022602 for ; Sat, 25 May 2019 04:39:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 969E219C4F; Sat, 25 May 2019 08:39:54 +0000 (UTC) Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.42]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 914B519C58 for ; Sat, 25 May 2019 08:39:52 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E20723082135 for ; Sat, 25 May 2019 08:39:38 +0000 (UTC) Received: by mail-wr1-f44.google.com with SMTP id b18so12082887wrq.12 for ; Sat, 25 May 2019 01:39:38 -0700 (PDT) Received: from donizetti.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id u15sm9569001wru.16.2019.05.25.01.39.31 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 May 2019 01:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6Mu5LaJGFt/sXMQjgRJXe2v3fswsk4C0vQ5cxD/mNxk=; b=Y13BNSPkZP8gCZ6bgVK1P5Gh2QTnfeBpC1nRTTW3DfnPIap0njsUEBaauH9cvdiQq1 WMrKWtL+x1gePZHdyjgg/5Lzpha8JUEX0YF2NLBtuB7QmbwtqcCbcOx4Yvta4eu481xd +NiPgB35v5oK2vCiQTH0SRTbO6oeG8YtzwiIN7HY7dZCrueRS5eCQaGwi3yuCjWmXO/6 CBhqaYbGDyrNb5dYJz6RnMpIdvZK2yUD0KuPCKUXpxQcL6157XjEfq+kLwe5zRp8uyBR J2DXcwHLISoPWUeuQONf45xFNBrnDWABX+W4p9IjAsJq04hLmekDucDcoifIYx6BiI5Q ekNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6Mu5LaJGFt/sXMQjgRJXe2v3fswsk4C0vQ5cxD/mNxk=; b=iCJnwh6qfAqVC72mpOhJM+bNyAJJjTDuv6+5IIC117yleSNH6Gd8eVOX5dTXkMczgB PICQiZy7+v/ldUrTOjA+EXZa1iZuvbQ3g1GHQ4BmXm519BPjIyQ7d9YC5r8GukJQF0pl RSuxyslvl4POmWMlerJBiseXCY6PCmF4I1hJVrytPEfdhcmCbmLTE50cBtj12XF1l7Nw pBs+Hrb2Grek7YZA4DkmDqkbpm42dsisp+iP+rnqu1e6286spO4olM6z8K/04JqCRFlu d24qD/wXZDem6R2k0uknV3Uu/vsD793p1LPh4awlUambTnEa4Mb7kgdY2r6Nnv+FQ0HL r1Gw== X-Gm-Message-State: APjAAAW/TVuiFE9cVYqIaUSABX72Nd3GmlYTR8pLbh0LATPhL5PbK/MU MtdY+d5b+lOhlndQlNP2bpi1UYRb X-Google-Smtp-Source: APXvYqw+Ec79LPQl9ttJAg/ZXBj+1m+khpf7OgiqOST6DnCWdQAMH3oUlaQsLi1sMT93rq5Zikj/DQ== X-Received: by 2002:adf:f2c2:: with SMTP id d2mr5275544wrp.153.1558773572364; Sat, 25 May 2019 01:39:32 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Sat, 25 May 2019 10:39:27 +0200 Message-Id: <20190525083927.8277-5-pbonzini@redhat.com> In-Reply-To: <20190525083927.8277-1-pbonzini@redhat.com> References: <20190525083927.8277-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Sat, 25 May 2019 08:39:39 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Sat, 25 May 2019 08:39:39 +0000 (UTC) for IP:'209.85.221.44' DOMAIN:'mail-wr1-f44.google.com' HELO:'mail-wr1-f44.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.191 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS) 209.85.221.44 mail-wr1-f44.google.com 209.85.221.44 mail-wr1-f44.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.84 on 10.5.110.42 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 4/4] add black configuration X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sat, 25 May 2019 08:39:56 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2ae6e53 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[tool.black] +target_version =3D ['py35'] +exclude =3D '/(?:\.git/|\.tox/|venv/|api/migrations/\d{4}_(?!populate|fix|= deblob))' --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel