Skip to content

Commit

Permalink
fix more linting
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-ging committed Nov 9, 2024
1 parent 3d3e5f0 commit 50618af
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 16 deletions.
3 changes: 2 additions & 1 deletion src/packg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
from .misc import format_exception

__all__ = ["Const", "format_exception"]
__version__ = "0.20.12"
__version__ = "0.20.13"

2 changes: 1 addition & 1 deletion src/packg/cli/cleanup_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
from attrs import define
from loguru import logger

from typedparser import VerboseQuietArgs, add_argument, TypedParser
from packg import format_exception
from packg.log import SHORTEST_FORMAT, configure_logger, get_logger_level_from_args
from typedparser import VerboseQuietArgs, add_argument, TypedParser


@define
Expand Down
4 changes: 2 additions & 2 deletions src/packg/cli/count_endings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
from collections import defaultdict
from pathlib import Path

from attrs import define
from loguru import logger
from attrs import define

from typedparser import VerboseQuietArgs, add_argument, TypedParser
from packg.iotools import make_index
from packg.log import SHORTEST_FORMAT, configure_logger, get_logger_level_from_args
from typedparser import VerboseQuietArgs, add_argument, TypedParser


@define
Expand Down
3 changes: 2 additions & 1 deletion src/packg/cli/count_lines.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Count lines per file endings in a directory.
"""

from __future__ import annotations

from collections import defaultdict
Expand All @@ -10,6 +11,7 @@
from attrs import define
from loguru import logger

from typedparser import VerboseQuietArgs, add_argument, TypedParser
from packg import format_exception
from packg.iotools import make_index
from packg.iotools.encoding import (
Expand All @@ -18,7 +20,6 @@
)
from packg.log import SHORTEST_FORMAT, configure_logger, get_logger_level_from_args
from packg.tqdmext import tqdm_max_ncols
from typedparser import VerboseQuietArgs, add_argument, TypedParser


@define
Expand Down
2 changes: 1 addition & 1 deletion src/packg/cli/create_package_autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
from attrs import define
from loguru import logger

from typedparser import VerboseQuietArgs, add_argument, TypedParser
from packg.log import SHORTEST_FORMAT, configure_logger, get_logger_level_from_args
from packg.packaging import FILEDIR_AUTOCOMPLETE, create_bash_autocomplete_script
from typedparser import VerboseQuietArgs, add_argument, TypedParser


@define
Expand Down
2 changes: 1 addition & 1 deletion src/packg/cli/download_list_of_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
from attrs import define
from loguru import logger

from typedparser import VerboseQuietArgs, add_argument, TypedParser
from packg.iotools import yield_lines_from_file
from packg.log import SHORTEST_FORMAT, configure_logger, get_logger_level_from_args
from packg.multiproc import FnMultiProcessor
from packg.web import download_file
from typedparser import VerboseQuietArgs, add_argument, TypedParser


@define
Expand Down
2 changes: 1 addition & 1 deletion src/packg/cli/import_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
from attrs import define
from loguru import logger

from typedparser import VerboseQuietArgs, add_argument, TypedParser
from packg.iotools import make_git_pathspec
from packg.log import SHORTEST_FORMAT, configure_logger, get_logger_level_from_args
from packg.system import systemcall
from packg.testing import recurse_modules
from packg.tqdmext import tqdm_max_ncols
from typedparser import VerboseQuietArgs, add_argument, TypedParser


@define
Expand Down
2 changes: 1 addition & 1 deletion src/packg/cli/multiproc_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from attrs import define
from loguru import logger

from typedparser import TypedParser, add_argument, VerboseQuietArgs
from packg.log import SHORTEST_FORMAT, configure_logger, get_logger_level_from_args
from packg.multiproc import FnMultiProcessor
from typedparser import TypedParser, add_argument, VerboseQuietArgs


@define
Expand Down
2 changes: 1 addition & 1 deletion src/packg/cli/pip_update_all.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from attrs import define
from loguru import logger

from typedparser import VerboseQuietArgs, TypedParser
from packg.iotools import loads_json
from packg.log import SHORTEST_FORMAT, configure_logger, get_logger_level_from_args
from packg.system import systemcall_with_assert
from typedparser import VerboseQuietArgs, TypedParser


@define
Expand Down
4 changes: 2 additions & 2 deletions src/packg/iotools/compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

import zstandard

from packg import Const
from packg.iotools import read_bytes_from_file_or_io, open_file_or_io
from packg.constclass import Const
from packg.iotools.file_reader import read_bytes_from_file_or_io, open_file_or_io


def load_xz(file, mode: str = "rt", encoding: str = "utf-8"):
Expand Down
2 changes: 1 addition & 1 deletion src/packg/iotools/file_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from attr import define
from tqdm import tqdm

from typedparser import NamedTupleMixin
from packg import format_exception
from packg.iotools.pathspec_matcher import (
PathSpecArgs,
Expand All @@ -25,7 +26,6 @@
)
from packg.log import logger
from packg.typext import PathType
from typedparser import NamedTupleMixin


def regex_glob(
Expand Down
2 changes: 2 additions & 0 deletions src/packg/iotools/jsonext_encoder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""JSON encoder implementation for jsonext.py"""

# pylint: skip-file
# since this is mostly a reimplementation of the original json.encoder module
# there is no point in fixing all the lint errors
import json
from json.encoder import (
c_make_encoder, # noqa
Expand Down
2 changes: 1 addition & 1 deletion src/packg/iotools/pathspec_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from attr import define
from pathspec import PathSpec, patterns as p_patterns, RegexPattern, Pattern

from packg.typext import PathType
from typedparser import add_argument
from packg.typext import PathType


class PathSpecRepr(PathSpec):
Expand Down
4 changes: 2 additions & 2 deletions src/packg/iotools/yamlext.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

import yaml

from packg.iotools.file_reader import read_text_from_file_or_io
from packg.typext import PathOrIO, PathTypeCls
from typedparser.objects import (
is_any_mapping,
is_any_iterable,
compare_nested_objects,
modify_nested_object,
)
from packg.iotools.file_reader import read_text_from_file_or_io
from packg.typext import PathOrIO, PathTypeCls


def load_yaml(file_or_io: PathOrIO) -> Any:
Expand Down
1 change: 1 addition & 0 deletions src/packg/multiproc/multiproc_producer_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from statistics import mean
from timeit import default_timer
from typing import Optional, Any

from attr import define, field
from loguru import logger

Expand Down

0 comments on commit 50618af

Please sign in to comment.