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 on a number of view files #8773

Merged
merged 8 commits into from
Dec 11, 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 checking on a number of view files.

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 6, 2019

Codecov Report

Merging #8773 into master will decrease coverage by 6.23%.
The diff coverage is 62.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8773      +/-   ##
==========================================
- Coverage   72.07%   65.83%   -6.24%     
==========================================
  Files         123      482     +359     
  Lines       12844    24154   +11310     
  Branches        0     2770    +2770     
==========================================
+ Hits         9257    15902    +6645     
- Misses       3587     8074    +4487     
- Partials        0      178     +178
Impacted Files Coverage Δ
superset/views/dashboard.py 100% <ø> (ø) ⬆️
superset/views/log/__init__.py 100% <100%> (ø) ⬆️
superset/views/datasource.py 96.07% <100%> (-0.08%) ⬇️
superset/views/utils.py 90.09% <100%> (ø) ⬆️
superset/views/sql_lab.py 56.57% <50%> (ø) ⬆️
superset/views/tags.py 38.27% <50%> (ø) ⬆️
superset/assets/src/components/Checkbox.jsx 100% <0%> (ø)
.../assets/src/dashboard/reducers/dashboardFilters.js 88.46% <0%> (ø)
...ets/src/dashboard/components/dnd/DragDroppable.jsx 94.59% <0%> (ø)
superset/assets/src/components/EditableTitle.jsx 80.28% <0%> (ø)
... and 355 more

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 665e947...4794867. Read the comment docs.

@has_access_api
@expose("/", methods=["POST"])
def post(self):
def post(self): # pylint: disable=no-self-use
Copy link
Member

@mistercrunch mistercrunch Dec 8, 2019

Choose a reason for hiding this comment

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

That rule is pretty annoying, I get the whole "you should use @staticmethod", but it's shortsighted for derivative classes where the base offers a nice handle on the object.

I'd vote for turning it off.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's valuable outside of this context. As I was doing this work, I identified quite a few methods that could be refactored out of a large class into a stand-alone function. I'd like to keep the rule for those instances.

@mistercrunch mistercrunch merged commit 60914fa into apache:master Dec 11, 2019
@mistercrunch mistercrunch deleted the wbarrett/pylint-views branch December 11, 2019 17:49
@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/L 🚢 0.36.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants