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

Prettify autogeneration of classifiers.py #43

Closed
wants to merge 1 commit into from

Conversation

cthoyt
Copy link
Contributor

@cthoyt cthoyt commented Sep 7, 2019

Suggested in #34 (comment)

Alternatively, the code could be upgraded to

out.write(b'''LICENSE_CODES = {\n''')
for license, codes in license_map.items():
    out.write(b'    "%s": {\n' % license)
    for code in codes:
        out.write(b'        "%s",\n' % code)
    out.write(b'    },\n')
out.write(b'''}\n\n''')

out.write(b'''CODE_LICENSES = {\n''')
for code, licenses in code_map.items():
    out.write(b'    "%s": {\n' % code)
    for license in licenses:
        out.write(b'        "%s",\n' % license)
    out.write(b'    },\n')
out.write(b'''}\n\n''')

to much better address formatting, and uses lots of trailing commas to make diffs smaller!

@regebro
Copy link
Owner

regebro commented Oct 24, 2019

Thanks! I've done this (or at least something similar) as a part of reformatting all the code with black. This file will not be entirely black compatible, because that depends on how long each line is, but stil...

@regebro regebro closed this Oct 24, 2019
@cthoyt cthoyt deleted the patch-1 branch October 24, 2019 11:56
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

2 participants