donnemartin / gitsome
Showing 4 of 11 files from the diff.

@@ -140,7 +140,7 @@
Loading
140 140
        :return: A list of options.
141 141
        """
142 142
        options = []
143 -
        for subcommand, args_opts in COMPLETIONS_GH.items():
143 +
        for subcommand, _ in COMPLETIONS_GH.items():
144 144
            if subcommand in words and \
145 145
                (words[-2] == subcommand or
146 146
                    self.completing_subcommand_option_util(subcommand, words)):
@@ -183,7 +183,7 @@
Loading
183 183
        """
184 184
        if 'gh' not in words:
185 185
            return []
186 -
        for subcommand, args_opts in COMPLETIONS_GH.items():
186 +
        for subcommand, _ in COMPLETIONS_GH.items():
187 187
            if subcommand in words:
188 188
                args = list(COMPLETIONS_GH[subcommand]['args'].keys())
189 189
                if not args:

@@ -68,13 +68,15 @@
Loading
68 68
        return '<GitHub at 0x{0:x}>'.format(id(self))
69 69
70 70
    @requires_auth
71 -
    def add_email_addresses(self, addresses=[]):
71 +
    def add_email_addresses(self, addresses=None):
72 72
        """Add the email addresses in ``addresses`` to the authenticated
73 73
        user's account.
74 74
75 75
        :param list addresses: (optional), email addresses to be added
76 76
        :returns: list of :class:`~github3.users.Email`
77 77
        """
78 +
        if addresses is None:
79 +
            addresses = []
78 80
        json = []
79 81
        if addresses:
80 82
            url = self._build_url('user', 'emails')
@@ -252,7 +254,7 @@
Loading
252 254
253 255
    @requires_auth
254 256
    def create_issue(self, owner, repository, title, body=None, assignee=None,
255 -
                     milestone=None, labels=[]):
257 +
                     milestone=None, labels=None):
256 258
        """Create an issue on the project 'repository' owned by 'owner'
257 259
        with title 'title'.
258 260
@@ -280,6 +282,8 @@
Loading
280 282
        :param list labels: (optional), List of label names.
281 283
        :returns: :class:`Issue <github3.issues.Issue>` if successful
282 284
        """
285 +
        if labels is None:
286 +
            labels = []
283 287
        repo = None
284 288
        if owner and repository and title:
285 289
            repo = self.repository(owner, repository)
@@ -349,13 +353,15 @@
Loading
349 353
        return self._instance_or_null(Repository, json)
350 354
351 355
    @requires_auth
352 -
    def delete_email_addresses(self, addresses=[]):
356 +
    def delete_email_addresses(self, addresses=None):
353 357
        """Delete the email addresses in ``addresses`` from the
354 358
        authenticated user's account.
355 359
356 360
        :param list addresses: (optional), email addresses to be removed
357 361
        :returns: bool
358 362
        """
363 +
        if addresses is None:
364 +
            addresses = []
359 365
        url = self._build_url('user', 'emails')
360 366
        return self._boolean(self._delete(url, data=json.dumps(addresses)),
361 367
                             204, 404)

@@ -575,7 +575,7 @@
Loading
575 575
            repo_pulls = repository.pull_requests()
576 576
            for repo_pull in repo_pulls:
577 577
                url = self.formatter.format_issues_url_from_issue(repo_pull)
578 -
                user, repo, issues, number = url.split('/')
578 +
                user, repo, _, number = url.split('/')
579 579
                repo_pull = self.config.api.pull_request(user, repo, number)
580 580
                issues_list.append(repo_pull)
581 581
        self.issues(issues_list, limit, pager)

@@ -126,7 +126,7 @@
Loading
126 126
        return self._boolean(self._delete(self._api), 204, 404)
127 127
128 128
    @requires_auth
129 -
    def edit(self, description='', files={}):
129 +
    def edit(self, description='', files=None):
130 130
        """Edit this gist.
131 131
132 132
        :param str description: (optional), description of the gist
@@ -138,6 +138,8 @@
Loading
138 138
        :returns: bool -- whether the edit was successful
139 139
140 140
        """
141 +
        if files is None:
142 +
            files = {}
141 143
        data = {}
142 144
        json = None
143 145
        if description:
Files Coverage
gitsome 46.75%
tests 99.38%
Project Totals (86 files) 53.19%
368.2
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py36
368.3
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
TOXENV=py37
368.1
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
TOXENV=py35
1
comment:
2
    layout: header, changes, diff
3

4
coverage:
5
    ignore:
6
        - gitsome/lib/*
7
        - gitsome/compat.py
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading