ocf / ocflib

Python libraries for account and server management
https://pypi.python.org/pypi/ocflib
Other
15 stars 32 forks source link

move create pubkey to __init__ from constants #63

Closed abizer closed 7 years ago

abizer commented 7 years ago

this is used in ocfweb/account/register.py and approve, pushing those PRs as well

matthew-mcallister commented 7 years ago

High quality commit message.

abizer commented 7 years ago

lol

better?

matthew-mcallister commented 7 years ago

Meh, marginally.

abizer commented 7 years ago

care to suggest a better one?

jvperrin commented 7 years ago

I take that back on the explicit import part, since it still is, but I do think it would be clearer if it wasn't in __init__ since we don't tend to put constants there and the public key is used for account creation anyway.

abizer commented 7 years ago

It seemed cleaner to put it in __init__ but I don't have any particularly strong opinions on the topic

chriskuehl commented 7 years ago

i agree, imo the only thing that should ever go in __init__.py is imports (and then only when you're trying to create an explicit public API, the way ldap3 or requests does it)

people don't expect to find code in __init__.py which is a good reason not to put it there