forked from sigmavirus24/github3.py
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathempty.py
More file actions
29 lines (18 loc) · 703 Bytes
/
Copy pathempty.py
File metadata and controls
29 lines (18 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- coding: utf-8 -*-
"""
github3.empty
=============
This module contains everything relating to the Empty class.
"""
class Empty(object):
"""Class to indicate something wasn't returned by the API.
The :class:`Empty <Empty>` class indicates that the attribute requested
was not found in the json returned by the API. The Empty class is declared
in every GitHubCore subclass using GitHubCore.Empty.
A model's field can be checked for Empty like so::
# type(user) == github3.users.User
user.owner_private_repos is not user.Empty
And that is equivalent to::
from github3.empty import Empty
user.owner_private_repos is not Empty
"""