From commits-return-76343-archive-asf-public=cust-asf.ponee.io@airflow.apache.org Wed Nov 20 14:24:32 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id C92FA180663 for ; Wed, 20 Nov 2019 15:24:31 +0100 (CET) Received: (qmail 37846 invoked by uid 500); 20 Nov 2019 14:24:21 -0000 Mailing-List: contact commits-help@airflow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.apache.org Delivered-To: mailing list commits@airflow.apache.org Received: (qmail 37650 invoked by uid 99); 20 Nov 2019 14:24:20 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Nov 2019 14:24:20 +0000 From: GitBox To: commits@airflow.apache.org Subject: [GitHub] [airflow] kaxil commented on a change in pull request #6601: [AIRFLOW-6010] Remove cyclic imports and pylint disables Message-ID: <157425986053.29296.10630031607235201152.gitbox@gitbox.apache.org> Date: Wed, 20 Nov 2019 14:24:20 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit kaxil commented on a change in pull request #6601: [AIRFLOW-6010] Remove cyclic imports and pylint disables URL: https://github.com/apache/airflow/pull/6601#discussion_r348496616 ########## File path: airflow/models/baseoperator.py ########## @@ -235,29 +234,26 @@ class derived from this one results in the creation of a task object, """ # For derived classes to define which fields will get jinjaified - template_fields = [] # type: Iterable[str] + template_fields: Iterable[str] = [] # Defines which files extensions to look for in the templated fields - template_ext = [] # type: Iterable[str] + template_ext: Iterable[str] = [] # Defines the color in the UI ui_color = '#fff' # type: str ui_fgcolor = '#000' # type: str pool = "" # type: str # base list which includes all the attrs that don't need deep copy. - _base_operator_shallow_copy_attrs = ('user_defined_macros', - 'user_defined_filters', - 'params', - '_log',) # type: Iterable[str] + BASE_OPERATOR_SHALLOW_COPY_ATTRS: Tuple[str, ...] = \ + ('user_defined_macros', 'user_defined_filters', 'params', '_log',) # each operator should override this class attr for shallow copy attrs. - shallow_copy_attrs = () # type: Iterable[str] + shallow_copy_attrs: Tuple[str, ...] = () # Defines the operator level extra links - operator_extra_links = () # type: Iterable[BaseOperatorLink] + operator_extra_links: Iterable['BaseOperatorLink'] = () - # Set at end of file - _serialized_fields = frozenset() # type: FrozenSet[str] + _serialized_fields: Optional[FrozenSet[str]] = None Review comment: Maybe keep the comment so that Readers know where to look for ? ```suggestion # Set at end of file _serialized_fields: Optional[FrozenSet[str]] = None ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services