Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
UTIL_VERSION := 0.5.26
UTIL_VERSION := 0.5.27
UTIL_NAME := codeplag
PWD := $(shell pwd)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ executionEnvironments = [
{ root = "docs/notebooks", extraPaths = ["src"] }
]

typeCheckingMode = "basic"
typeCheckingMode = "standard"

[build-system]
requires = ["setuptools", "Cython"]
Expand Down
9 changes: 5 additions & 4 deletions src/codeplag/codeplagcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import builtins
import getpass
from pathlib import Path
from typing import Sequence

from typing_extensions import Self

Expand Down Expand Up @@ -34,11 +35,11 @@
class CheckUniqueStore(argparse.Action):
"""Checks that the list of arguments contains no duplicates, then stores."""

def __call__(
def __call__( # pyright: ignore[reportIncompatibleMethodOverride]
self: Self,
_parser: argparse.ArgumentParser,
namespace: argparse.Namespace,
values: list[str],
values: Sequence[str],
_option_string: str | None = None,
) -> None:
if len(values) > len(set(values)):
Expand All @@ -53,7 +54,7 @@ def __call__(


class PasswordPromptAction(argparse.Action):
def __call__(
def __call__( # pyright: ignore[reportIncompatibleMethodOverride]
self: Self,
_parser: argparse.ArgumentParser,
namespace: argparse.Namespace,
Expand Down Expand Up @@ -474,7 +475,7 @@ def validate_args(self: Self, parsed_args: argparse.Namespace) -> None:
):
self.error(_("All paths must be provided."))

def parse_args(self: Self, args: list[str] | None = None) -> argparse.Namespace:
def parse_args(self: Self, args: Sequence[str] | None = None) -> argparse.Namespace: # pyright: ignore[reportIncompatibleMethodOverride]
parsed_args = super(CodeplagCLI, self).parse_args(args)
self.validate_args(parsed_args)
return parsed_args
8 changes: 4 additions & 4 deletions src/codeplag/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ def __post_init__(self: Self) -> None:
else:
self.modify_date = ""

def __eq__(self: Self, other: "ASTFeatures") -> bool:
def __eq__(self: Self, other: object) -> bool:
if not isinstance(other, self.__class__):
raise NotImplementedError
raise NotImplementedError(f"Can't compare '{type(other)}' with '{ASTFeatures}'.")
return str(self.filepath) == str(other.filepath)

def __lt__(self: Self, other: "ASTFeatures") -> bool:
def __lt__(self: Self, other: object) -> bool:
if not isinstance(other, self.__class__):
raise NotImplementedError
raise NotImplementedError(f"Can't compare '{type(other)}' with '{ASTFeatures}'.")
return str(self.filepath) < str(other.filepath)

def get_sha256(self: Self) -> str:
Expand Down
Loading