Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Nov 29, 2023
1 parent b84fc0b commit d1f01f5
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 17 deletions.
1 change: 1 addition & 0 deletions istub/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Main entrypoint for module.
"""

from istub.main import main

if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions istub/checks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Checks catalogue.
"""

from typing import Dict, Type

from istub.checks.base import BaseCheck
Expand Down
1 change: 1 addition & 0 deletions istub/checks/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Base class for all checks.
"""

import difflib
import logging
from abc import ABC, abstractmethod
Expand Down
1 change: 1 addition & 0 deletions istub/checks/flake8.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Check package with flake8.
"""

from istub.checks.base import BaseCheck


Expand Down
1 change: 1 addition & 0 deletions istub/checks/mypy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Check package with mypy.
"""

from istub.checks.base import BaseCheck
from istub.exceptions import SubprocessError

Expand Down
1 change: 1 addition & 0 deletions istub/checks/pyright.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Check package with pyright.
"""

import json

from istub.checks.base import BaseCheck
Expand Down
1 change: 1 addition & 0 deletions istub/checks/stubtest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Check package with mypy.stubtest.
"""

from istub.checks.base import BaseCheck


Expand Down
1 change: 1 addition & 0 deletions istub/cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
CLI parser.
"""

import argparse
import logging
from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions istub/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
iStub config.
"""

import itertools
from pathlib import Path
from typing import Any, Dict, Iterable, Iterator, List, TypeVar
Expand Down
1 change: 1 addition & 0 deletions istub/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
iStub exceptions.
"""

from typing import Iterable


Expand Down
1 change: 1 addition & 0 deletions istub/logger.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Logging setup.
"""

import logging

from istub.constants import LOGGER_NAME
Expand Down
32 changes: 15 additions & 17 deletions istub/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,20 @@ def pip_install(config: Config) -> None:
logger = logging.getLogger(LOGGER_NAME)
if config.pip_uninstall:
logger.info("Uninstalling pip packages...")
check_call(
[
config.python_path,
"-m",
"pip",
"uninstall",
"--yes",
"--no-input",
*config.pip_uninstall,
]
)
check_call([
config.python_path,
"-m",
"pip",
"uninstall",
"--yes",
"--no-input",
*config.pip_uninstall,
])
if config.pip_install:
logger.info("Installing pip requirements...")
check_call(
[config.python_path, "-m", "pip", "install", "-U", "--no-input", *config.pip_install]
)
check_call([
config.python_path, "-m", "pip", "install", "-U", "--no-input", *config.pip_install
])


def path_install(config: Config) -> None:
Expand All @@ -50,9 +48,9 @@ def path_install(config: Config) -> None:
logger.info("Installing requirements...")
for path_package in config.path_install:
logger.debug(f"Installing {path_package.as_posix()}")
check_call(
[config.python_path, "-m", "pip", "install", "--no-input", path_package.as_posix()]
)
check_call([
config.python_path, "-m", "pip", "install", "--no-input", path_package.as_posix()
])


def build(config: Config) -> None:
Expand Down
1 change: 1 addition & 0 deletions istub/package.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Stubs package data.
"""

from dataclasses import dataclass, field
from pathlib import Path
from typing import Any, Dict, Iterable, Iterator, List, Type, TypeVar
Expand Down
1 change: 1 addition & 0 deletions istub/subprocess.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Utils for subprocess calls.
"""

import logging
import subprocess
import tempfile
Expand Down
1 change: 1 addition & 0 deletions istub/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
String utils.
"""

import re
import sys
from functools import lru_cache
Expand Down
1 change: 1 addition & 0 deletions istub/yaml.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
YAML utils.
"""

from typing import Any

import yaml
Expand Down

0 comments on commit d1f01f5

Please sign in to comment.