Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: have flake8 check the entire project#1429

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
max-wittig merged 1 commit intopython-gitlab:masterfromJohnVillalovos:jlvillal/flake8
Apr 30, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletionsdocs/conf.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,11 +18,10 @@
import os
import sys

importsphinx
importgitlab

sys.path.append("../")
sys.path.append(os.path.dirname(__file__))
import gitlab

on_rtd = os.environ.get("READTHEDOCS", None) == "True"

Expand DownExpand Up@@ -207,11 +206,11 @@

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
#'papersize': 'letterpaper',
#The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
#Additional stuff for the LaTeX preamble.
#'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
Expand Down
2 changes: 0 additions & 2 deletionsdocs/ext/docstrings.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
import inspect
import itertools
import os

import jinja2
Expand All@@ -14,7 +13,6 @@ def classref(value, short=True):
if not inspect.isclass(value):
return ":class:%s" % value
tilde = "~" if short else ""
string = "%s.%s" % (value.__module__, value.__name__)
return ":class:`%sgitlab.objects.%s`" % (tilde, value.__name__)


Expand Down
4 changes: 3 additions & 1 deletionsetup.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,7 +27,9 @@ def get_version():
url="https://github.com/python-gitlab/python-gitlab",
packages=find_packages(),
install_requires=["requests>=2.22.0", "requests-toolbelt>=0.9.1"],
package_data = {'gitlab': ['py.typed'], },
package_data={
"gitlab": ["py.typed"],
},
python_requires=">=3.6.0",
entry_points={"console_scripts": ["gitlab = gitlab.cli:main"]},
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletiontools/functional/api/test_issues.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,7 @@ def test_issue_notes(issue):


def test_issue_labels(project, issue):
label =project.labels.create({"name": "label2", "color": "#aabbcc"})
project.labels.create({"name": "label2", "color": "#aabbcc"})
issue.labels = ["label2"]
issue.save()

Expand Down
4 changes: 2 additions & 2 deletionstools/functional/api/test_merge_requests.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,7 +14,7 @@ def test_merge_requests(project):
)

source_branch = "branch1"
branch =project.branches.create({"branch": source_branch, "ref": "master"})
project.branches.create({"branch": source_branch, "ref": "master"})

project.files.create(
{
Expand All@@ -24,7 +24,7 @@ def test_merge_requests(project):
"commit_message": "New commit in new branch",
}
)
mr =project.mergerequests.create(
project.mergerequests.create(
{"source_branch": "branch1", "target_branch": "master", "title": "MR readme2"}
)

Expand Down
4 changes: 2 additions & 2 deletionstools/functional/api/test_projects.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -150,10 +150,10 @@ def test_project_labels(project):
assert label.name == "labelupdated"

label.subscribe()
assert label.subscribed== True
assert label.subscribedis True

label.unsubscribe()
assert label.subscribed== False
assert label.subscribedis False

label.delete()
assert len(project.labels.list()) == 0
Expand Down
2 changes: 1 addition & 1 deletiontools/functional/api/test_releases.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,7 @@ def test_delete_project_release(project, release):


def test_create_project_release_links(project, release):
link =release.links.create(link_data)
release.links.create(link_data)

release = project.releases.get(release.tag_name)
assert release.assets["links"][0]["url"] == link_data["url"]
Expand Down
4 changes: 2 additions & 2 deletionstools/functional/api/test_repository.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -74,15 +74,15 @@ def test_create_commit(project):
def test_create_commit_status(project):
commit = project.commits.list()[0]
size = len(commit.statuses.list())
status =commit.statuses.create({"state": "success", "sha": commit.id})
commit.statuses.create({"state": "success", "sha": commit.id})
assert len(commit.statuses.list()) == size + 1


def test_commit_signature(project):
commit = project.commits.list()[0]

with pytest.raises(gitlab.GitlabGetError) as e:
signature =commit.signature()
commit.signature()

assert "404 Signature Not Found" in str(e.value)

Expand Down
5 changes: 1 addition & 4 deletionstools/functional/api/test_users.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,9 +3,6 @@
https://docs.gitlab.com/ee/api/users.html
https://docs.gitlab.com/ee/api/users.html#delete-authentication-identity-from-user
"""
import time
from pathlib import Path

import pytest
import requests

Expand DownExpand Up@@ -57,7 +54,7 @@ def test_delete_user(gl, wait_for_sidekiq):

new_user.delete()
result = wait_for_sidekiq(timeout=60)
assert result== True, "sidekiq process should have terminated but did not"
assert resultis True, "sidekiq process should have terminated but did not"

assert new_user.id not in [user.id for user in gl.users.list()]

Expand Down
1 change: 0 additions & 1 deletiontools/functional/conftest.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,6 @@
import time
import uuid
from pathlib import Path
from random import randint
from subprocess import check_output

import pytest
Expand Down
6 changes: 3 additions & 3 deletionstools/functional/ee-test.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -125,13 +125,13 @@ def end_log():
pr.save()
pr = project1.pushrules.get()
assert pr is not None
assert pr.deny_delete_tag== False
assert pr.deny_delete_tagis False
pr.delete()
end_log()

start_log("license")
l = gl.get_license()
assert "user_limit" inl
license = gl.get_license()
assert "user_limit" inlicense
try:
gl.set_license("dummykey")
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletiontox.ini
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,7 @@ deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
flake8
commands =
flake8 {posargs}gitlab/
flake8 {posargs}.

[testenv:black]
basepython = python3
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp