You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/05/27 04:02:15 UTC

[GitHub] [incubator-superset] john-bodley opened a new pull request #9905: style(mypy): Enforcing typing for superset.utils

john-bodley opened a new pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905


   ### SUMMARY
   
   Adding `mypy` type enforcement to the `superset.models` module.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TEST PLAN
   
   CI. 
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter edited a comment on pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#issuecomment-633830874


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=h1) Report
   > Merging [#9905](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/54dced1cf6886bce3508eb80f7a98fe4ed5de6ca&el=desc) will **decrease** coverage by `0.24%`.
   > The diff coverage is `85.93%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9905/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9905      +/-   ##
   ==========================================
   - Coverage   66.52%   66.28%   -0.25%     
   ==========================================
     Files         585      585              
     Lines       30881    30773     -108     
     Branches     3236     3236              
   ==========================================
   - Hits        20545    20399     -146     
   - Misses      10157    10195      +38     
     Partials      179      179              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #javascript | `59.41% <ø> (ø)` | |
   | #python | `71.14% <85.93%> (-0.39%)` | :arrow_down: |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `75.48% <0.00%> (-1.10%)` | :arrow_down: |
   | [...uperset/utils/dashboard\_filter\_scopes\_converter.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ZpbHRlcl9zY29wZXNfY29udmVydGVyLnB5) | `34.04% <22.22%> (ø)` | |
   | [superset/utils/dict\_import\_export.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGljdF9pbXBvcnRfZXhwb3J0LnB5) | `55.81% <71.42%> (-0.60%)` | :arrow_down: |
   | [superset/utils/cache.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2FjaGUucHk=) | `48.00% <80.00%> (-20.00%)` | :arrow_down: |
   | [superset/utils/url\_map\_converters.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvdXJsX21hcF9jb252ZXJ0ZXJzLnB5) | `66.66% <83.33%> (+3.03%)` | :arrow_up: |
   | [superset/utils/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `89.17% <88.46%> (+0.10%)` | :arrow_up: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `89.66% <100.00%> (ø)` | |
   | [superset/typing.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdHlwaW5nLnB5) | `100.00% <100.00%> (ø)` | |
   | [superset/utils/dashboard\_import\_export.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ltcG9ydF9leHBvcnQucHk=) | `63.63% <100.00%> (+2.66%)` | :arrow_up: |
   | [superset/utils/dates.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGF0ZXMucHk=) | `72.72% <100.00%> (ø)` | |
   | ... and [32 more](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?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/incubator-superset/pull/9905?src=pr&el=footer). Last update [54dced1...383f0fc](https://codecov.io/gh/apache/incubator-superset/pull/9905?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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter edited a comment on pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#issuecomment-633830874


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=h1) Report
   > Merging [#9905](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/54dced1cf6886bce3508eb80f7a98fe4ed5de6ca&el=desc) will **increase** coverage by `4.79%`.
   > The diff coverage is `85.93%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9905/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9905      +/-   ##
   ==========================================
   + Coverage   66.52%   71.32%   +4.79%     
   ==========================================
     Files         585      585              
     Lines       30881    30887       +6     
     Branches     3236     3236              
   ==========================================
   + Hits        20545    22031    +1486     
   + Misses      10157     8746    -1411     
   + Partials      179      110      -69     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `53.92% <ø> (?)` | |
   | #javascript | `59.41% <ø> (ø)` | |
   | #python | `71.53% <85.93%> (+<0.01%)` | :arrow_up: |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `76.58% <0.00%> (ø)` | |
   | [...uperset/utils/dashboard\_filter\_scopes\_converter.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ZpbHRlcl9zY29wZXNfY29udmVydGVyLnB5) | `34.04% <22.22%> (ø)` | |
   | [superset/utils/dict\_import\_export.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGljdF9pbXBvcnRfZXhwb3J0LnB5) | `55.81% <71.42%> (-0.60%)` | :arrow_down: |
   | [superset/utils/cache.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2FjaGUucHk=) | `68.00% <80.00%> (ø)` | |
   | [superset/utils/url\_map\_converters.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvdXJsX21hcF9jb252ZXJ0ZXJzLnB5) | `66.66% <83.33%> (+3.03%)` | :arrow_up: |
   | [superset/utils/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `89.17% <88.46%> (+0.10%)` | :arrow_up: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `89.66% <100.00%> (ø)` | |
   | [superset/typing.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdHlwaW5nLnB5) | `100.00% <100.00%> (ø)` | |
   | [superset/utils/dashboard\_import\_export.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ltcG9ydF9leHBvcnQucHk=) | `63.63% <100.00%> (+2.66%)` | :arrow_up: |
   | [superset/utils/dates.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGF0ZXMucHk=) | `72.72% <100.00%> (ø)` | |
   | ... and [153 more](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?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/incubator-superset/pull/9905?src=pr&el=footer). Last update [54dced1...383f0fc](https://codecov.io/gh/apache/incubator-superset/pull/9905?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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter edited a comment on pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#issuecomment-633830874


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=h1) Report
   > Merging [#9905](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/54dced1cf6886bce3508eb80f7a98fe4ed5de6ca&el=desc) will **decrease** coverage by `0.03%`.
   > The diff coverage is `85.93%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9905/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9905      +/-   ##
   ==========================================
   - Coverage   66.52%   66.49%   -0.04%     
   ==========================================
     Files         585      585              
     Lines       30881    30887       +6     
     Branches     3236     3236              
   ==========================================
   - Hits        20545    20539       -6     
   - Misses      10157    10169      +12     
     Partials      179      179              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #javascript | `59.41% <ø> (ø)` | |
   | #python | `71.46% <85.93%> (-0.06%)` | :arrow_down: |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `76.36% <0.00%> (-0.22%)` | :arrow_down: |
   | [...uperset/utils/dashboard\_filter\_scopes\_converter.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ZpbHRlcl9zY29wZXNfY29udmVydGVyLnB5) | `34.04% <22.22%> (ø)` | |
   | [superset/utils/dict\_import\_export.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGljdF9pbXBvcnRfZXhwb3J0LnB5) | `55.81% <71.42%> (-0.60%)` | :arrow_down: |
   | [superset/utils/cache.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2FjaGUucHk=) | `68.00% <80.00%> (ø)` | |
   | [superset/utils/url\_map\_converters.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvdXJsX21hcF9jb252ZXJ0ZXJzLnB5) | `66.66% <83.33%> (+3.03%)` | :arrow_up: |
   | [superset/utils/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `89.17% <88.46%> (+0.10%)` | :arrow_up: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `89.66% <100.00%> (ø)` | |
   | [superset/typing.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdHlwaW5nLnB5) | `100.00% <100.00%> (ø)` | |
   | [superset/utils/dashboard\_import\_export.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ltcG9ydF9leHBvcnQucHk=) | `63.63% <100.00%> (+2.66%)` | :arrow_up: |
   | [superset/utils/dates.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGF0ZXMucHk=) | `72.72% <100.00%> (ø)` | |
   | ... and [8 more](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?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/incubator-superset/pull/9905?src=pr&el=footer). Last update [54dced1...383f0fc](https://codecov.io/gh/apache/incubator-superset/pull/9905?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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter edited a comment on pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#issuecomment-633830874


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=h1) Report
   > Merging [#9905](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/54dced1cf6886bce3508eb80f7a98fe4ed5de6ca&el=desc) will **decrease** coverage by `7.11%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9905/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9905      +/-   ##
   ==========================================
   - Coverage   66.52%   59.41%   -7.12%     
   ==========================================
     Files         585      401     -184     
     Lines       30881    12738   -18143     
     Branches     3236     3236              
   ==========================================
   - Hits        20545     7568   -12977     
   + Misses      10157     4991    -5166     
     Partials      179      179              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #javascript | `59.41% <ø> (ø)` | |
   | #python | `?` | |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/examples/paris.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvcGFyaXMucHk=) | | |
   | [superset/views/datasource.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS5weQ==) | | |
   | [superset/dashboards/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy9jcmVhdGUucHk=) | | |
   | [superset/security/analytics\_db\_safety.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc2VjdXJpdHkvYW5hbHl0aWNzX2RiX3NhZmV0eS5weQ==) | | |
   | [superset/models/dashboard.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2Rhc2hib2FyZC5weQ==) | | |
   | [superset/charts/commands/exceptions.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4Y2VwdGlvbnMucHk=) | | |
   | [superset/views/dashboard/filters.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGFzaGJvYXJkL2ZpbHRlcnMucHk=) | | |
   | [superset/forms.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZm9ybXMucHk=) | | |
   | [superset/datasets/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvY3JlYXRlLnB5) | | |
   | [superset/views/utils.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvdXRpbHMucHk=) | | |
   | ... and [159 more](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?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/incubator-superset/pull/9905?src=pr&el=footer). Last update [54dced1...383f0fc](https://codecov.io/gh/apache/incubator-superset/pull/9905?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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] villebro commented on a change in pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#discussion_r430179154



##########
File path: superset/utils/cache.py
##########
@@ -14,14 +14,14 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-from typing import Callable, Optional
+from typing import Any, Callable, Optional
 
 from flask import request
 
 from superset.extensions import cache_manager
 
 
-def view_cache_key(*_, **__) -> str:
+def view_cache_key(*args: Any, **kwargs: Any) -> str:  # pylint: disable=unused-argument

Review comment:
       I personally prefer `*_: Any, **__: Any` if it allows us to avoid disabling linting for a row.

##########
File path: superset/utils/core.py
##########
@@ -397,7 +403,7 @@ def base_json_conv(obj):
             return "[bytes]"
 
 
-def json_iso_dttm_ser(obj, pessimistic: Optional[bool] = False):
+def json_iso_dttm_ser(obj: Any, pessimistic: Optional[bool] = False) -> str:

Review comment:
       Does `pessimistic` need to be `Optional` if it defaults to `False`?

##########
File path: superset/utils/core.py
##########
@@ -1119,7 +1142,7 @@ def add_ago_to_since(since: str) -> str:
     return since
 
 
-def convert_legacy_filters_into_adhoc(fd):
+def convert_legacy_filters_into_adhoc(fd: Dict[str, Any]) -> None:

Review comment:
       Did we have a `FormData` alias? If not perhaps we should introduce one.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter edited a comment on pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#issuecomment-633830874


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=h1) Report
   > Merging [#9905](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/54dced1cf6886bce3508eb80f7a98fe4ed5de6ca&el=desc) will **increase** coverage by `4.59%`.
   > The diff coverage is `85.93%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9905/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9905      +/-   ##
   ==========================================
   + Coverage   66.52%   71.12%   +4.59%     
   ==========================================
     Files         585      585              
     Lines       30881    30887       +6     
     Branches     3236     3236              
   ==========================================
   + Hits        20545    21969    +1424     
   + Misses      10157     8803    -1354     
   + Partials      179      115      -64     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `53.09% <ø> (?)` | |
   | #javascript | `59.41% <ø> (ø)` | |
   | #python | `71.53% <85.93%> (+<0.01%)` | :arrow_up: |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `76.58% <0.00%> (ø)` | |
   | [...uperset/utils/dashboard\_filter\_scopes\_converter.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ZpbHRlcl9zY29wZXNfY29udmVydGVyLnB5) | `34.04% <22.22%> (ø)` | |
   | [superset/utils/dict\_import\_export.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGljdF9pbXBvcnRfZXhwb3J0LnB5) | `55.81% <71.42%> (-0.60%)` | :arrow_down: |
   | [superset/utils/cache.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2FjaGUucHk=) | `68.00% <80.00%> (ø)` | |
   | [superset/utils/url\_map\_converters.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvdXJsX21hcF9jb252ZXJ0ZXJzLnB5) | `66.66% <83.33%> (+3.03%)` | :arrow_up: |
   | [superset/utils/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `89.17% <88.46%> (+0.10%)` | :arrow_up: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `89.66% <100.00%> (ø)` | |
   | [superset/typing.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdHlwaW5nLnB5) | `100.00% <100.00%> (ø)` | |
   | [superset/utils/dashboard\_import\_export.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ltcG9ydF9leHBvcnQucHk=) | `63.63% <100.00%> (+2.66%)` | :arrow_up: |
   | [superset/utils/dates.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGF0ZXMucHk=) | `72.72% <100.00%> (ø)` | |
   | ... and [150 more](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?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/incubator-superset/pull/9905?src=pr&el=footer). Last update [54dced1...383f0fc](https://codecov.io/gh/apache/incubator-superset/pull/9905?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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] john-bodley commented on pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
john-bodley commented on pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#issuecomment-635072051


   @villebro would it be possible to re-review this PR? I was hoping to leverage this change for a number of functions in the `superset.views` module. 


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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter edited a comment on pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#issuecomment-633830874


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=h1) Report
   > Merging [#9905](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/54dced1cf6886bce3508eb80f7a98fe4ed5de6ca&el=desc) will **decrease** coverage by `0.13%`.
   > The diff coverage is `85.93%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9905/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9905      +/-   ##
   ==========================================
   - Coverage   66.52%   66.39%   -0.14%     
   ==========================================
     Files         585      585              
     Lines       30881    30773     -108     
     Branches     3236     3236              
   ==========================================
   - Hits        20545    20433     -112     
   - Misses      10157    10161       +4     
     Partials      179      179              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #javascript | `59.41% <ø> (ø)` | |
   | #python | `71.33% <85.93%> (-0.20%)` | :arrow_down: |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `75.48% <0.00%> (-1.10%)` | :arrow_down: |
   | [...uperset/utils/dashboard\_filter\_scopes\_converter.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ZpbHRlcl9zY29wZXNfY29udmVydGVyLnB5) | `34.04% <22.22%> (ø)` | |
   | [superset/utils/dict\_import\_export.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGljdF9pbXBvcnRfZXhwb3J0LnB5) | `55.81% <71.42%> (-0.60%)` | :arrow_down: |
   | [superset/utils/cache.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2FjaGUucHk=) | `68.00% <80.00%> (ø)` | |
   | [superset/utils/url\_map\_converters.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvdXJsX21hcF9jb252ZXJ0ZXJzLnB5) | `66.66% <83.33%> (+3.03%)` | :arrow_up: |
   | [superset/utils/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `89.17% <88.46%> (+0.10%)` | :arrow_up: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `89.66% <100.00%> (ø)` | |
   | [superset/typing.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdHlwaW5nLnB5) | `100.00% <100.00%> (ø)` | |
   | [superset/utils/dashboard\_import\_export.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ltcG9ydF9leHBvcnQucHk=) | `63.63% <100.00%> (+2.66%)` | :arrow_up: |
   | [superset/utils/dates.py](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGF0ZXMucHk=) | `72.72% <100.00%> (ø)` | |
   | ... and [22 more](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?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/incubator-superset/pull/9905?src=pr&el=footer). Last update [54dced1...383f0fc](https://codecov.io/gh/apache/incubator-superset/pull/9905?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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] john-bodley commented on pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
john-bodley commented on pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#issuecomment-634153318


   Thanks @villebro for the review. I've addressed your 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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] villebro commented on a change in pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#discussion_r431588088



##########
File path: superset/utils/cache.py
##########
@@ -14,14 +14,14 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-from typing import Callable, Optional
+from typing import Any, Callable, Optional
 
 from flask import request
 
 from superset.extensions import cache_manager
 
 
-def view_cache_key(*_, **__) -> str:
+def view_cache_key(*args: Any, **kwargs: Any) -> str:  # pylint: disable=unused-argument

Review comment:
       Fair point about `_` being ambiguous in this context, i.e. either signalling something that's unused or a `flask_babel` function call. I'm fine with this.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter edited a comment on pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#issuecomment-633830874






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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] john-bodley merged pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
john-bodley merged pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905


   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter commented on pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#issuecomment-633830874


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=h1) Report
   > Merging [#9905](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/7f6dbf838e4e527e640a002ce20bf5da1abf4a98&el=desc) will **decrease** coverage by `11.84%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9905/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #9905       +/-   ##
   ===========================================
   - Coverage   71.22%   59.38%   -11.85%     
   ===========================================
     Files         585      401      -184     
     Lines       30864    12736    -18128     
     Branches     3237     3237               
   ===========================================
   - Hits        21984     7563    -14421     
   + Misses       8771     4994     -3777     
   - Partials      109      179       +70     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `59.38% <ø> (ø)` | |
   | #python | `?` | |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9905?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupFormatters.js](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwRm9ybWF0dGVycy5qcw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [308 more](https://codecov.io/gh/apache/incubator-superset/pull/9905/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9905?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/incubator-superset/pull/9905?src=pr&el=footer). Last update [7f6dbf8...e279f25](https://codecov.io/gh/apache/incubator-superset/pull/9905?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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] john-bodley commented on a change in pull request #9905: style(mypy): Enforcing typing for superset.utils

Posted by GitBox <gi...@apache.org>.
john-bodley commented on a change in pull request #9905:
URL: https://github.com/apache/incubator-superset/pull/9905#discussion_r430194544



##########
File path: superset/utils/core.py
##########
@@ -332,28 +339,15 @@ class JSONEncodedDict(TypeDecorator):
 
     impl = TEXT
 
-    def process_bind_param(self, value, dialect):
-        if value is not None:
-            value = json.dumps(value)
+    def process_bind_param(
+        self, value: Optional[Dict[Any, Any]], dialect: str
+    ) -> Optional[str]:
+        return json.dumps(value) if value is not None else None
 
-        return value
-
-    def process_result_value(self, value, dialect):
-        if value is not None:
-            value = json.loads(value)
-        return value
-
-
-def datetime_f(dttm):

Review comment:
       This function was unused.

##########
File path: superset/utils/cache.py
##########
@@ -14,14 +14,14 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-from typing import Callable, Optional
+from typing import Any, Callable, Optional
 
 from flask import request
 
 from superset.extensions import cache_manager
 
 
-def view_cache_key(*_, **__) -> str:
+def view_cache_key(*args: Any, **kwargs: Any) -> str:  # pylint: disable=unused-argument

Review comment:
       @villebro I think the issue with using `_` etc. is it's really not clear to the reader what these arguments are, i.e., when I was looking at typing [this](https://github.com/apache/incubator-superset/blob/master/superset/views/database/views.py#L48) method is wasn't clear what `_` represented, and although the argument is currently unused, there may be value is using it in the future (it was provided for some purpose). I needed to add some debugging statements to determine the argument type.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org