You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/03/23 12:54:09 UTC

[GitHub] [airflow] zhongjiajie opened a new pull request #7834: Enable super init not called check in pylint

zhongjiajie opened a new pull request #7834: Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834
 
 
   ---
   Issue link: WILL BE INSERTED BY [boring-cyborg](https://github.com/kaxil/boring-cyborg)
   
   Make sure to mark the boxes below before creating PR: [x]
   
   - [x] Description above provides context of the change
   - [x] Unit tests coverage for changes (not needed for documentation changes)
   - [x] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [x] Relevant documentation is updated including usage instructions.
   - [x] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   

----------------------------------------------------------------
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

[GitHub] [airflow] potiuk commented on issue #7834: [WIP]Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #7834: [WIP]Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#issuecomment-605100405
 
 
   Looks good . Do we remove WIP from the name :) ? 

----------------------------------------------------------------
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

[GitHub] [airflow] mik-laj commented on a change in pull request #7834: [WIP]Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #7834: [WIP]Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#discussion_r398187337
 
 

 ##########
 File path: airflow/utils/log/logging_mixin.py
 ##########
 @@ -126,6 +126,8 @@ class RedirectStdHandler(StreamHandler):
     sys.stderr/stdout at handler construction time.
     """
     def __init__(self, stream):
+        # StreamHandler tries to set self.stream
+        super().__init__(stream)
 
 Review comment:
   This is a change that causes a change in behavior.

----------------------------------------------------------------
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

[GitHub] [airflow] kaxil merged pull request #7834: Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #7834: Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834
 
 
   

----------------------------------------------------------------
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

[GitHub] [airflow] kaxil commented on issue #7834: Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #7834: Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#issuecomment-602609038
 
 
   Looks like CI is failing:
   
   https://travis-ci.org/github/apache/airflow/jobs/665847017

----------------------------------------------------------------
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

[GitHub] [airflow] zhongjiajie commented on a change in pull request #7834: [WIP]Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on a change in pull request #7834: [WIP]Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#discussion_r398297514
 
 

 ##########
 File path: airflow/utils/log/logging_mixin.py
 ##########
 @@ -135,7 +135,7 @@ def __init__(self, stream):
             self._use_stderr = False
 
         # StreamHandler tries to set self.stream
-        Handler.__init__(self)  # pylint: disable=non-parent-init-called
+        super(Handler).__init__()  # pylint: disable=bad-super-call
 
 Review comment:
   Seem that will also call parent init, maybe we should keep this line in original.

----------------------------------------------------------------
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

[GitHub] [airflow] zhongjiajie commented on issue #7834: Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on issue #7834: Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#issuecomment-602684394
 
 
   Thiank to restart failing test. Will take a look at other exclude tomorrow, it's midnight in my timezone

----------------------------------------------------------------
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

[GitHub] [airflow] zhongjiajie commented on issue #7834: Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on issue #7834: Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#issuecomment-605408126
 
 
   Thanks everyone.

----------------------------------------------------------------
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

[GitHub] [airflow] zhongjiajie edited a comment on issue #7834: [WIP]Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
zhongjiajie edited a comment on issue #7834: [WIP]Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#issuecomment-605051932
 
 
   > Great. Wouldn't you like to review other exclusions too?
   > These look easy to fix:
   > deprecated-pragma,
   > deprecated-string-function,
   > deprecated-str-translate-call,
   > deprecated-itertools-function,
   > deprecated-types-field,
   > deprecated-operator-function,
   > deprecated-urllib-function,
   > deprecated-sys-function,
   
   I checkout and find all done by kaxil

----------------------------------------------------------------
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

[GitHub] [airflow] mik-laj commented on issue #7834: Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #7834: Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#issuecomment-602598836
 
 
   Great. Wouldn't you like to review other exclusions too?
   These look easy to fix:
    deprecated-pragma,
    deprecated-string-function,
    deprecated-str-translate-call,
    deprecated-itertools-function,
    deprecated-types-field,
    deprecated-operator-function,
    deprecated-urllib-function,
    deprecated-sys-function,
   

----------------------------------------------------------------
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

[GitHub] [airflow] zhongjiajie commented on a change in pull request #7834: [WIP]Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on a change in pull request #7834: [WIP]Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#discussion_r398270456
 
 

 ##########
 File path: airflow/utils/log/logging_mixin.py
 ##########
 @@ -135,7 +135,7 @@ def __init__(self, stream):
             self._use_stderr = False
 
         # StreamHandler tries to set self.stream
-        Handler.__init__(self)  # pylint: disable=non-parent-init-called
+        super(Handler).__init__()  # pylint: disable=bad-super-call
 
 Review comment:
   And what do you think this change? @mik-laj 

----------------------------------------------------------------
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

[GitHub] [airflow] mik-laj commented on a change in pull request #7834: [WIP]Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #7834: [WIP]Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#discussion_r398187155
 
 

 ##########
 File path: airflow/utils/log/logging_mixin.py
 ##########
 @@ -134,9 +136,6 @@ def __init__(self, stream):
         if 'stdout' in stream:
             self._use_stderr = False
 
-        # StreamHandler tries to set self.stream
-        Handler.__init__(self)  # pylint: disable=non-parent-init-called
 
 Review comment:
   Ohhh. There's a trick here. One init was intentionally omitted.

----------------------------------------------------------------
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

[GitHub] [airflow] codecov-io commented on issue #7834: [WIP]Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #7834: [WIP]Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#issuecomment-605097551
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7834?src=pr&el=h1) Report
   > Merging [#7834](https://codecov.io/gh/apache/airflow/pull/7834?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/3fb5f1568cbd98d49d8a195b65dcaa25539292c6&el=desc) will **decrease** coverage by `0.74%`.
   > The diff coverage is `88.88%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7834/graphs/tree.svg?width=650&height=150&src=pr&token=WdLKlKHOAU)](https://codecov.io/gh/apache/airflow/pull/7834?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7834      +/-   ##
   ==========================================
   - Coverage   87.10%   86.36%   -0.75%     
   ==========================================
     Files         929      929              
     Lines       45028    45036       +8     
   ==========================================
   - Hits        39223    38895     -328     
   - Misses       5805     6141     +336     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7834?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/executors/kubernetes\_executor.py](https://codecov.io/gh/apache/airflow/pull/7834/diff?src=pr&el=tree#diff-YWlyZmxvdy9leGVjdXRvcnMva3ViZXJuZXRlc19leGVjdXRvci5weQ==) | `56.87% <0.00%> (ø)` | |
   | [airflow/utils/log/logging\_mixin.py](https://codecov.io/gh/apache/airflow/pull/7834/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9sb2cvbG9nZ2luZ19taXhpbi5weQ==) | `95.38% <ø> (ø)` | |
   | [airflow/exceptions.py](https://codecov.io/gh/apache/airflow/pull/7834/diff?src=pr&el=tree#diff-YWlyZmxvdy9leGNlcHRpb25zLnB5) | `100.00% <100.00%> (ø)` | |
   | [airflow/hooks/dbapi\_hook.py](https://codecov.io/gh/apache/airflow/pull/7834/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy9kYmFwaV9ob29rLnB5) | `91.73% <100.00%> (-0.77%)` | :arrow_down: |
   | [airflow/hooks/filesystem.py](https://codecov.io/gh/apache/airflow/pull/7834/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy9maWxlc3lzdGVtLnB5) | `90.90% <100.00%> (+0.90%)` | :arrow_up: |
   | [airflow/jobs/scheduler\_job.py](https://codecov.io/gh/apache/airflow/pull/7834/diff?src=pr&el=tree#diff-YWlyZmxvdy9qb2JzL3NjaGVkdWxlcl9qb2IucHk=) | `90.94% <100.00%> (+0.45%)` | :arrow_up: |
   | [airflow/utils/dag\_processing.py](https://codecov.io/gh/apache/airflow/pull/7834/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9kYWdfcHJvY2Vzc2luZy5weQ==) | `87.94% <100.00%> (+0.04%)` | :arrow_up: |
   | [airflow/utils/timeout.py](https://codecov.io/gh/apache/airflow/pull/7834/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy90aW1lb3V0LnB5) | `76.00% <100.00%> (+1.00%)` | :arrow_up: |
   | [...flow/providers/apache/cassandra/hooks/cassandra.py](https://codecov.io/gh/apache/airflow/pull/7834/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL2Nhc3NhbmRyYS9ob29rcy9jYXNzYW5kcmEucHk=) | `21.25% <0.00%> (-72.50%)` | :arrow_down: |
   | [...w/providers/apache/hive/operators/mysql\_to\_hive.py](https://codecov.io/gh/apache/airflow/pull/7834/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL2hpdmUvb3BlcmF0b3JzL215c3FsX3RvX2hpdmUucHk=) | `35.84% <0.00%> (-64.16%)` | :arrow_down: |
   | ... and [17 more](https://codecov.io/gh/apache/airflow/pull/7834/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7834?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7834?src=pr&el=footer). Last update [3fb5f15...3cb1e6c](https://codecov.io/gh/apache/airflow/pull/7834?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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

[GitHub] [airflow] zhongjiajie commented on a change in pull request #7834: [WIP]Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on a change in pull request #7834: [WIP]Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#discussion_r398266890
 
 

 ##########
 File path: airflow/utils/log/logging_mixin.py
 ##########
 @@ -134,9 +136,6 @@ def __init__(self, stream):
         if 'stdout' in stream:
             self._use_stderr = False
 
-        # StreamHandler tries to set self.stream
-        Handler.__init__(self)  # pylint: disable=non-parent-init-called
 
 Review comment:
   Yeah, I found out that too, but why?

----------------------------------------------------------------
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

[GitHub] [airflow] zhongjiajie commented on issue #7834: [WIP]Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on issue #7834: [WIP]Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#issuecomment-605051932
 
 
   > Great. Wouldn't you like to review other exclusions too?
   > These look easy to fix:
   > deprecated-pragma,
   > deprecated-string-function,
   > deprecated-str-translate-call,
   > deprecated-itertools-function,
   > deprecated-types-field,
   > deprecated-operator-function,
   > deprecated-urllib-function,
   > deprecated-sys-function,
   
   I checkout and find all all by kaxil

----------------------------------------------------------------
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

[GitHub] [airflow] potiuk commented on issue #7834: Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #7834: Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#issuecomment-602582245
 
 
   Niiiiiiiice!

----------------------------------------------------------------
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

[GitHub] [airflow] zhongjiajie commented on issue #7834: Enable super init not called check in pylint

Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on issue #7834: Enable super init not called check in pylint
URL: https://github.com/apache/airflow/pull/7834#issuecomment-602571928
 
 
   ref: https://github.com/apache/airflow/pull/7828#issuecomment-602414330

----------------------------------------------------------------
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