| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,11 +18,10 @@ | |||
| 18 | 18 | import os | |
| 19 | 19 | import sys | |
| 20 | 20 | ||
| 21 | - import sphinx | ||
| 21 | + import gitlab | ||
| 22 | 22 | ||
| 23 | 23 | sys.path.append("../") | |
| 24 | 24 | sys.path.append(os.path.dirname(__file__)) | |
| 25 | - import gitlab | ||
| 26 | 25 | ||
| 27 | 26 | on_rtd = os.environ.get("READTHEDOCS", None) == "True" | |
| 28 | 27 | ||
@@ -207,11 +206,11 @@ | |||
| 207 | 206 | ||
| 208 | 207 | latex_elements = { | |
| 209 | 208 | # The paper size ('letterpaper' or 'a4paper'). | |
| 210 | - #'papersize': 'letterpaper', | ||
| 211 | - # The font size ('10pt', '11pt' or '12pt'). | ||
| 212 | - #'pointsize': '10pt', | ||
| 213 | - # Additional stuff for the LaTeX preamble. | ||
| 214 | - #'preamble': '', | ||
| 209 | + # 'papersize': 'letterpaper', | ||
| 210 | + # The font size ('10pt', '11pt' or '12pt'). | ||
| 211 | + # 'pointsize': '10pt', | ||
| 212 | + # Additional stuff for the LaTeX preamble. | ||
| 213 | + # 'preamble': '', | ||
| 215 | 214 | } | |
| 216 | 215 | ||
| 217 | 216 | # Grouping the document tree into LaTeX files. List of tuples | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,4 @@ | |||
| 1 | 1 | import inspect | |
| 2 | - import itertools | ||
| 3 | 2 | import os | |
| 4 | 3 | ||
| 5 | 4 | import jinja2 | |
@@ -14,7 +13,6 @@ def classref(value, short=True): | |||
| 14 | 13 | if not inspect.isclass(value): | |
| 15 | 14 | return ":class:%s" % value | |
| 16 | 15 | tilde = "~" if short else "" | |
| 17 | - string = "%s.%s" % (value.__module__, value.__name__) | ||
| 18 | 16 | return ":class:`%sgitlab.objects.%s`" % (tilde, value.__name__) | |
| 19 | 17 | ||
| 20 | 18 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,9 @@ def get_version(): | |||
| 27 | 27 | url="https://github.com/python-gitlab/python-gitlab", | |
| 28 | 28 | packages=find_packages(), | |
| 29 | 29 | install_requires=["requests>=2.22.0", "requests-toolbelt>=0.9.1"], | |
| 30 | - package_data = {'gitlab': ['py.typed'], }, | ||
| 30 | + package_data={ | ||
| 31 | + "gitlab": ["py.typed"], | ||
| 32 | + }, | ||
| 31 | 33 | python_requires=">=3.6.0", | |
| 32 | 34 | entry_points={"console_scripts": ["gitlab = gitlab.cli:main"]}, | |
| 33 | 35 | classifiers=[ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,7 +39,7 @@ def test_issue_notes(issue): | |||
| 39 | 39 | ||
| 40 | 40 | ||
| 41 | 41 | def test_issue_labels(project, issue): | |
| 42 | - label = project.labels.create({"name": "label2", "color": "#aabbcc"}) | ||
| 42 | + project.labels.create({"name": "label2", "color": "#aabbcc"}) | ||
| 43 | 43 | issue.labels = ["label2"] | |
| 44 | 44 | issue.save() | |
| 45 | 45 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ def test_merge_requests(project): | |||
| 14 | 14 | ) | |
| 15 | 15 | ||
| 16 | 16 | source_branch = "branch1" | |
| 17 | - branch = project.branches.create({"branch": source_branch, "ref": "master"}) | ||
| 17 | + project.branches.create({"branch": source_branch, "ref": "master"}) | ||
| 18 | 18 | ||
| 19 | 19 | project.files.create( | |
| 20 | 20 | { | |
@@ -24,7 +24,7 @@ def test_merge_requests(project): | |||
| 24 | 24 | "commit_message": "New commit in new branch", | |
| 25 | 25 | } | |
| 26 | 26 | ) | |
| 27 | - mr = project.mergerequests.create( | ||
| 27 | + project.mergerequests.create( | ||
| 28 | 28 | {"source_branch": "branch1", "target_branch": "master", "title": "MR readme2"} | |
| 29 | 29 | ) | |
| 30 | 30 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -150,10 +150,10 @@ def test_project_labels(project): | |||
| 150 | 150 | assert label.name == "labelupdated" | |
| 151 | 151 | ||
| 152 | 152 | label.subscribe() | |
| 153 | - assert label.subscribed == True | ||
| 153 | + assert label.subscribed is True | ||
| 154 | 154 | ||
| 155 | 155 | label.unsubscribe() | |
| 156 | - assert label.subscribed == False | ||
| 156 | + assert label.subscribed is False | ||
| 157 | 157 | ||
| 158 | 158 | label.delete() | |
| 159 | 159 | assert len(project.labels.list()) == 0 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,7 @@ def test_delete_project_release(project, release): | |||
| 29 | 29 | ||
| 30 | 30 | ||
| 31 | 31 | def test_create_project_release_links(project, release): | |
| 32 | - link = release.links.create(link_data) | ||
| 32 | + release.links.create(link_data) | ||
| 33 | 33 | ||
| 34 | 34 | release = project.releases.get(release.tag_name) | |
| 35 | 35 | assert release.assets["links"][0]["url"] == link_data["url"] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -74,15 +74,15 @@ def test_create_commit(project): | |||
| 74 | 74 | def test_create_commit_status(project): | |
| 75 | 75 | commit = project.commits.list()[0] | |
| 76 | 76 | size = len(commit.statuses.list()) | |
| 77 | - status = commit.statuses.create({"state": "success", "sha": commit.id}) | ||
| 77 | + commit.statuses.create({"state": "success", "sha": commit.id}) | ||
| 78 | 78 | assert len(commit.statuses.list()) == size + 1 | |
| 79 | 79 | ||
| 80 | 80 | ||
| 81 | 81 | def test_commit_signature(project): | |
| 82 | 82 | commit = project.commits.list()[0] | |
| 83 | 83 | ||
| 84 | 84 | with pytest.raises(gitlab.GitlabGetError) as e: | |
| 85 | - signature = commit.signature() | ||
| 85 | + commit.signature() | ||
| 86 | 86 | ||
| 87 | 87 | assert "404 Signature Not Found" in str(e.value) | |
| 88 | 88 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,9 +3,6 @@ | |||
| 3 | 3 | https://docs.gitlab.com/ee/api/users.html | |
| 4 | 4 | https://docs.gitlab.com/ee/api/users.html#delete-authentication-identity-from-user | |
| 5 | 5 | """ | |
| 6 | - import time | ||
| 7 | - from pathlib import Path | ||
| 8 | - | ||
| 9 | 6 | import pytest | |
| 10 | 7 | import requests | |
| 11 | 8 | ||
@@ -57,7 +54,7 @@ def test_delete_user(gl, wait_for_sidekiq): | |||
| 57 | 54 | ||
| 58 | 55 | new_user.delete() | |
| 59 | 56 | result = wait_for_sidekiq(timeout=60) | |
| 60 | - assert result == True, "sidekiq process should have terminated but did not" | ||
| 57 | + assert result is True, "sidekiq process should have terminated but did not" | ||
| 61 | 58 | ||
| 62 | 59 | assert new_user.id not in [user.id for user in gl.users.list()] | |
| 63 | 60 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,6 @@ | |||
| 2 | 2 | import time | |
| 3 | 3 | import uuid | |
| 4 | 4 | from pathlib import Path | |
| 5 | - from random import randint | ||
| 6 | 5 | from subprocess import check_output | |
| 7 | 6 | ||
| 8 | 7 | import pytest | |
| Back | FazBrowse Home | New Git URL |
0 commit comments