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

Embetter pofile sorting #300

Merged
merged 4 commits into from Feb 2, 2016
Merged

Embetter pofile sorting #300

merged 4 commits into from Feb 2, 2016

Conversation

akx
Copy link
Member

@akx akx commented Dec 23, 2015

I think sorting message locations irrespective of the sort flags is alright.

The only UC I can think of where that wouldn't be desired might be trying to read a .po and emitting an identical copy of it, but I don't think Babel does that as it is anyway?

@codecov-io
Copy link

Current coverage is 89.45%

Merging #300 into master will increase coverage by +0.04% as of 766cec1

@@            master    #300   diff @@
======================================
  Files           23      23       
  Stmts         3740    3747     +7
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit           3344    3352     +8
  Partial          0       0       
+ Missed         396     395     -1

Review entire Coverage Diff as of 766cec1

Powered by Codecov. Updated on successful CI builds.

@akx
Copy link
Member Author

akx commented Jan 29, 2016

@jtwang DRYed! Good point.

for comment in message.user_comments:
_write_comment(comment)
_write_message(message, prefix='#~ ')
_write('\n')


def _sort_messages(messages, sort_by_message, sort_by_file):
Copy link
Contributor

Choose a reason for hiding this comment

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

Test please and docs. No default values for sort flags?

@akx
Copy link
Member Author

akx commented Feb 1, 2016

@jtwang: I improved the signature of the helper function a little more -- no good reason to have two mutually exclusive arguments!

Also, I don't think it warrants a separate test; that function's coverage should already be 100% by way of the other tests.

@jtwang
Copy link
Contributor

jtwang commented Feb 2, 2016

ack 4f60b3e, bc59c9c, edce8ee, 65ce160

@akx totally disagree about testing, but I'll defer to your familiarity with this project. :)

Single arg change looks good (bah enums only in 3.4). Good to merge!

@akx
Copy link
Member Author

akx commented Feb 2, 2016

Cheers @jtwang! :)

akx added a commit that referenced this pull request Feb 2, 2016
@akx akx merged commit edd83c4 into python-babel:master Feb 2, 2016
@akx akx deleted the pofile-sort branch February 2, 2016 22:29
@pyup-bot pyup-bot mentioned this pull request Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants