Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable pylint for superset/utils folder #8766

Merged
merged 3 commits into from
Dec 6, 2019

Conversation

willbarrett
Copy link
Member

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Re-enables pylint for a few files in the superset/utils folder.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

ADDITIONAL INFORMATION

  • 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

REVIEWERS

@john-bodley @dpgaspar @mistercrunch

@codecov-io
Copy link

codecov-io commented Dec 5, 2019

Codecov Report

Merging #8766 into master will decrease coverage by <.01%.
The diff coverage is 90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8766      +/-   ##
==========================================
- Coverage   65.83%   65.83%   -0.01%     
==========================================
  Files         482      482              
  Lines       24155    24153       -2     
  Branches     2770     2770              
==========================================
- Hits        15903    15901       -2     
  Misses       8074     8074              
  Partials      178      178
Impacted Files Coverage Δ
superset/utils/cache.py 41.66% <100%> (-4.49%) ⬇️
superset/utils/import_datasource.py 100% <100%> (ø) ⬆️
superset/utils/log.py 95.77% <66.66%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bdf764...e5b48eb. Read the comment docs.

@@ -30,7 +29,7 @@ def import_datasource(
superset instances. Audit metadata isn't copies over.
"""
make_transient(i_datasource)
logging.info("Started import of the datasource: {}".format(i_datasource.to_json()))
logging.info("Started import of the datasource: %s", i_datasource.to_json())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use f strings instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not according to pylint.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fstrings and .format are not recommended for logging statements because they make you pay the cost of formatting the string regardless of logging level. Not that it's expensive, but it's best practice to use the format above for that reason

@mistercrunch mistercrunch merged commit ed3944e into apache:master Dec 6, 2019
@mistercrunch mistercrunch deleted the wbarrett/pylint-utils branch December 6, 2019 22:35
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.36.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 0.36.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants