Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius committed Oct 22, 2024
1 parent 8c93019 commit 3abd1cf
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 31 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ line-length = 137
exclude = [
"get-pipenv.py",
"pipenv/patched/*",
"pipenv/tests/fixtures/*",
"pipenv/tests/pypi/*",
"pipenv/tests/test_artifacts/*",
"pipenv/vendor/*",
]

Expand Down
12 changes: 6 additions & 6 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import contextlib
import errno
import functools
import json
import logging
import os
import shutil
from shutil import rmtree as _rmtree
import subprocess
import sys
import warnings
from pathlib import Path
from shutil import rmtree as _rmtree
from tempfile import TemporaryDirectory
import subprocess

import pytest
from pipenv.patched.pip._vendor import requests
from pipenv.vendor import tomlkit

from pipenv.utils.processes import subprocess_run
from pipenv.patched.pip._vendor import requests
from pipenv.utils.funktools import handle_remove_readonly
from pipenv.utils.processes import subprocess_run
from pipenv.utils.shell import temp_environ
import contextlib
from pipenv.vendor import tomlkit

log = logging.getLogger(__name__)
warnings.simplefilter("default", category=ResourceWarning)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import re
import sys
from pathlib import Path
import pytest

import pytest

from pipenv.utils.processes import subprocess_run
from pipenv.utils.shell import normalize_drive
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/test_import_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
import pytest

from pipenv.patched.pip._internal.operations.prepare import File

from pipenv.utils.requirements import import_requirements
from pipenv.project import Project
from pipenv.utils.requirements import import_requirements


@pytest.mark.cli
Expand Down
1 change: 0 additions & 1 deletion tests/integration/test_install_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import pytest
from flaky import flaky


from pipenv.project import Project
from pipenv.utils.shell import temp_environ

Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_install_uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
@pytest.mark.install
@pytest.mark.needs_internet
def test_basic_vcs_install_with_env_var(pipenv_instance_pypi):
from pipenv.cli import cli
from click.testing import (
CliRunner,
) # not thread safe but macos and linux will expand the env var otherwise

from pipenv.cli import cli

with pipenv_instance_pypi() as p:
# edge case where normal package starts with VCS name shouldn't be flagged as vcs
os.environ["GIT_HOST"] = "github.com"
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/test_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
from pathlib import Path

import pytest


from flaky import flaky

from pipenv.utils.shell import temp_environ


Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_lockfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from collections import defaultdict
import json
from collections import defaultdict

import pytest

from pipenv.project import Project
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import pytest

from pipenv.project import Project
from pipenv.utils.fileutils import normalize_path
from pipenv.utils.shell import temp_environ
from pipenv.vendor.plette import Pipfile
from pipenv.utils.fileutils import normalize_path


@pytest.mark.project
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_requirements.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import json
import os

import pytest

from pipenv.utils.shell import temp_environ
from pipenv.utils.requirements import requirements_from_lockfile
from pipenv.utils.shell import temp_environ


@pytest.mark.requirements
Expand Down
5 changes: 3 additions & 2 deletions tests/integration/test_uninstall.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import pytest
import sys

from .conftest import DEFAULT_PRIVATE_PYPI_SERVER
import pytest

from pipenv.utils.shell import temp_environ

from .conftest import DEFAULT_PRIVATE_PYPI_SERVER


@pytest.mark.uninstall
@pytest.mark.install
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_windows.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
import sys
from pathlib import Path

import pytest
import sys

from pipenv.utils.processes import subprocess_run

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import pytest

from pipenv.utils.virtualenv import warn_in_virtualenv
from pipenv.utils.environment import load_dot_env
from pipenv.utils.shell import temp_environ
from pipenv.utils.virtualenv import warn_in_virtualenv


@pytest.mark.core
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_dependencies.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from pipenv.utils.dependencies import clean_resolved_dep


def test_clean_resolved_dep_with_vcs_url():
project = {} # Mock project object, adjust as needed
dep = {
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/test_environments.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import itertools
import pytest
import os

import pytest

from pipenv import environments
from pipenv.utils.shell import temp_environ

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_funktools.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from pipenv.utils.funktools import dedup, unnest, _is_iterable
from pipenv.utils.funktools import _is_iterable, dedup, unnest


def test_unnest():
Expand Down
7 changes: 1 addition & 6 deletions tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@

import pytest

from pipenv.utils import dependencies
from pipenv.utils import indexes
from pipenv.utils import internet
from pipenv.utils import shell
from pipenv.utils import toml
from pipenv.exceptions import PipenvUsageError

from pipenv.utils import dependencies, indexes, internet, shell, toml

# Pipfile format <-> requirements.txt format.
DEP_PIP_PAIRS = [
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/test_utils_windows_executable.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import os

from unittest import mock

import pytest

from pipenv.utils import shell


# This module is run only on Windows.
pytestmark = pytest.mark.skipif(
os.name != "nt",
Expand Down

0 comments on commit 3abd1cf

Please sign in to comment.