Skip to content

Commit

Permalink
chore: make linters happy
Browse files Browse the repository at this point in the history
  • Loading branch information
nejch authored and JohnVillalovos committed Oct 11, 2023
1 parent 71fca8c commit 3b83d5d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/gl_objects/job_token_scope.rst
Expand Up @@ -36,8 +36,8 @@ Update the job token scope settings::
.. warning::

As you can see above, the attributes you receive from and send to the GitLab API
are not consistent. GitLab returns `inbound_enabled` and `outbound_enabled`,
but expects `enabled`, which only refers to the inbound scope. This is important
are not consistent. GitLab returns ``inbound_enabled`` and ``outbound_enabled``,
but expects ``enabled``, which only refers to the inbound scope. This is important
when accessing and updating these attributes.

Or update the job token scope settings directly::
Expand Down
2 changes: 1 addition & 1 deletion gitlab/v4/objects/appearance.py
Expand Up @@ -39,7 +39,7 @@ def update(
self,
id: Optional[Union[str, int]] = None,
new_data: Optional[Dict[str, Any]] = None,
**kwargs: Any
**kwargs: Any,
) -> Dict[str, Any]:
"""Update an object on the server.
Expand Down
4 changes: 2 additions & 2 deletions gitlab/v4/objects/labels.py
Expand Up @@ -70,7 +70,7 @@ def update( # type: ignore
self,
name: Optional[str],
new_data: Optional[Dict[str, Any]] = None,
**kwargs: Any
**kwargs: Any,
) -> Dict[str, Any]:
"""Update a Label on the server.
Expand Down Expand Up @@ -136,7 +136,7 @@ def update( # type: ignore
self,
name: Optional[str],
new_data: Optional[Dict[str, Any]] = None,
**kwargs: Any
**kwargs: Any,
) -> Dict[str, Any]:
"""Update a Label on the server.
Expand Down
2 changes: 1 addition & 1 deletion gitlab/v4/objects/settings.py
Expand Up @@ -94,7 +94,7 @@ def update(
self,
id: Optional[Union[str, int]] = None,
new_data: Optional[Dict[str, Any]] = None,
**kwargs: Any
**kwargs: Any,
) -> Dict[str, Any]:
"""Update an object on the server.
Expand Down
11 changes: 5 additions & 6 deletions tests/smoke/test_dists.py
@@ -1,10 +1,9 @@
import tarfile
import zipfile
import subprocess
import sys
import tarfile
import zipfile
from pathlib import Path


import pytest

from gitlab._version import __title__, __version__
Expand All @@ -16,13 +15,13 @@


@pytest.fixture(scope="session")
def build(tmp_path_factory: Path):
def build(tmp_path_factory: pytest.TempPathFactory):
temp_dir = tmp_path_factory.mktemp("build")
subprocess.run([sys.executable, "-m", "build", "--outdir", temp_dir], check=True)
return temp_dir


def test_sdist_includes_docs_and_tests(build: subprocess.CompletedProcess) -> None:
def test_sdist_includes_docs_and_tests(build: Path) -> None:
sdist = tarfile.open(build / SDIST_FILE, "r:gz")
sdist_dir = f"{__title__}-{__version__}"

Expand All @@ -35,6 +34,6 @@ def test_sdist_includes_docs_and_tests(build: subprocess.CompletedProcess) -> No
assert readme.isfile()


def test_wheel_excludes_docs_and_tests(build: subprocess.CompletedProcess) -> None:
def test_wheel_excludes_docs_and_tests(build: Path) -> None:
wheel = zipfile.ZipFile(build / WHEEL_FILE)
assert not any(file.startswith((DOCS_DIR, TEST_DIR)) for file in wheel.namelist())

0 comments on commit 3b83d5d

Please sign in to comment.