-
Notifications
You must be signed in to change notification settings - Fork 1
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: Avoid constructing Contexts with args[0], db, args[1], … #14
Comments
rmoehn
changed the title
Clean-up: Avoid constructing
Clean-up: Avoid constructing Contexts with args[0], db, args[1], …
Jul 3, 2018
Context
s with args[0], db, args[1], …
The same goes for |
rmoehn
added a commit
to rmoehn/patchwork
that referenced
this issue
Sep 21, 2018
Something like Context(args[0], db, args[1], parent=args[2]) occurred in several places in the code. Since I might do more saving and restoring of contexts, introduce a simple attrs container class to make this prettier. I considered three alternatives. - Dictionaries wouldn't match the style of the rest of the code. - Python 3.7 dataclasses have fewer features than attrs classes and the API quality is the same. - A hand-written class would be three times as long. Addresses issue oughtinc#14.
The construction of |
rmoehn
added a commit
to rmoehn/patchwork
that referenced
this issue
Sep 25, 2018
Something like Context(args[0], db, args[1], parent=args[2]) occurred in several places in the code. Since I might do more saving and restoring of contexts, introduce a simple attrs container class to make this prettier. I considered three alternatives. - Dictionaries wouldn't match the style of the rest of the code. - Python 3.7 dataclasses have fewer features than attrs classes and the API quality is the same. - A hand-written class would be three times as long. Addresses issue oughtinc#14.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are several places in the code where a
Context
is constructed from datastore contents like this:Replace these with something more readable.
This includes the
args[0]
in the procedure_can_advance_promise
incontext.py
.The text was updated successfully, but these errors were encountered: