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

No more abc #1365

Merged
merged 3 commits into from
Aug 5, 2020
Merged

No more abc #1365

merged 3 commits into from
Aug 5, 2020

Conversation

dagewa
Copy link
Member

@dagewa dagewa commented Aug 3, 2020

There were 6 instances of __metaclass__ = abc.ABCMeta remaining in DIALS. This PR removes these and the associated decorators on abstract methods. It is easier to see what is going on if base class methods simply raise NotImplementedError rather than using obscure metaclass trickery and decorators. As pointed out in #1364, this was also not doing anything useful on Python 3.

Only crystal parameterisations currently set state uncertainties.
Others (detector, beam, etc.) simply pass here
@dagewa dagewa requested a review from rjgildea August 3, 2020 15:55
@dagewa dagewa marked this pull request as ready for review August 3, 2020 15:55
@codecov
Copy link

codecov bot commented Aug 3, 2020

Codecov Report

Merging #1365 into master will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1365      +/-   ##
==========================================
- Coverage   64.62%   64.61%   -0.02%     
==========================================
  Files         616      616              
  Lines       69852    69831      -21     
  Branches     9542     9542              
==========================================
- Hits        45142    45121      -21     
  Misses      22937    22937              
  Partials     1773     1773              

Copy link
Contributor

@rjgildea rjgildea left a comment

Choose a reason for hiding this comment

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

I'm sure this is fine, as long as the tests are passing!

@dagewa dagewa merged commit de493fa into master Aug 5, 2020
@Anthchirp Anthchirp deleted the no-more-abc branch August 5, 2020 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants