Skip to content

Instantly share code, notes, and snippets.

@Anthonyhawkins
Created June 8, 2021 18:09
Show Gist options
  • Save Anthonyhawkins/4843d0848ef0458ab9eaa9d686a61637 to your computer and use it in GitHub Desktop.
Save Anthonyhawkins/4843d0848ef0458ab9eaa9d686a61637 to your computer and use it in GitHub Desktop.
class Resource(object):
@staticmethod
def get(name, passed=[], trigger=True):
return {
"get": name,
} | Include.when(passed, {
"passed": passed
}) | Include.when(trigger, {
"trigger": True
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment