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

Clean up Jupyter notebooks with PyCharm static code analysis #2119

Merged
merged 1 commit into from Apr 17, 2019

Conversation

2 participants
@cdeil
Copy link
Member

commented Apr 17, 2019

This PR does a bit of clean up in the Jupyter notebooks, looking through the warnings from PyCharm static code analysis (as mentioned in #2096).

It's mostly unused imports and a few unused variables, almost nothing turned up.

For tutorials/spectrum_models.ipynb and UserModel(SpectralModel) the recommendation was to call the super init. I guess it doesn't matter here, but depending on how the base classes are written it might matter in the future, so I did follow the suggestion. Sherpa and Astropy both also use this pattern of calling super().__init__ if an __init__ is defined.

@adonath - Please review.

@cdeil cdeil added this to the 0.12 milestone Apr 17, 2019

@cdeil cdeil requested a review from adonath Apr 17, 2019

@cdeil cdeil added this to To Do in Documentation via automation Apr 17, 2019

@adonath
Copy link
Member

left a comment

Thanks @cdeil, looks good to me!

@adonath adonath merged commit ab578ad into gammapy:master Apr 17, 2019

8 of 9 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
Scrutinizer Analysis: No new issues – Tests: passed
Details
gammapy.gammapy Build #20190417.6 succeeded
Details
gammapy.gammapy (DevDocs) DevDocs succeeded
Details
gammapy.gammapy (Lint) Lint succeeded
Details
gammapy.gammapy (Test Python35) Test Python35 succeeded
Details
gammapy.gammapy (Test Windows35) Test Windows35 succeeded
Details
gammapy.gammapy (Test Windows37) Test Windows37 succeeded
Details

Documentation automation moved this from To Do to Done Apr 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.