| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e8343e2 commit f78587f
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -490,7 +490,7 @@ def check_unsafe_options(cls, options: List[str], unsafe_options: List[str]) -> | |||
| 490 | 490 | f"{unsafe_option} is not allowed, use `allow_unsafe_options=True` to allow it." | |
| 491 | 491 | ) | |
| 492 | 492 | ||
| 493 | - class AutoInterrupt(object): | ||
| 493 | + class AutoInterrupt: | ||
| 494 | 494 | """Process wrapper that terminates the wrapped process on finalization. | |
| 495 | 495 | ||
| 496 | 496 | This kills/interrupts the stored process instance once this instance goes out of | |
@@ -602,7 +602,7 @@ def read_all_from_possibly_closed_stream(stream: Union[IO[bytes], None]) -> byte | |||
| 602 | 602 | ||
| 603 | 603 | # END auto interrupt | |
| 604 | 604 | ||
| 605 | - class CatFileContentStream(object): | ||
| 605 | + class CatFileContentStream: | ||
| 606 | 606 | """Object representing a sized read-only stream returning the contents of | |
| 607 | 607 | an object. | |
| 608 | 608 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -79,7 +79,7 @@ def decode_path(path: bytes, has_ab_prefix: bool = True) -> Optional[bytes]: | |||
| 79 | 79 | return path | |
| 80 | 80 | ||
| 81 | 81 | ||
| 82 | - class Diffable(object): | ||
| 82 | + class Diffable: | ||
| 83 | 83 | """Common interface for all objects that can be diffed against another object of | |
| 84 | 84 | compatible type. | |
| 85 | 85 | ||
@@ -90,7 +90,7 @@ class Diffable(object): | |||
| 90 | 90 | ||
| 91 | 91 | __slots__ = () | |
| 92 | 92 | ||
| 93 | - class Index(object): | ||
| 93 | + class Index: | ||
| 94 | 94 | """Stand-in indicating you want to diff against the index.""" | |
| 95 | 95 | ||
| 96 | 96 | def _process_diff_args( | |
@@ -252,7 +252,7 @@ def iter_change_type(self, change_type: Lit_change_type) -> Iterator[T_Diff]: | |||
| 252 | 252 | # END for each diff | |
| 253 | 253 | ||
| 254 | 254 | ||
| 255 | - class Diff(object): | ||
| 255 | + class Diff: | ||
| 256 | 256 | """A Diff contains diff information between two Trees. | |
| 257 | 257 | ||
| 258 | 258 | It contains two sides a and b of the diff, members are prefixed with | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,7 +32,7 @@ | |||
| 32 | 32 | # } END invariants | |
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | - class BlobFilter(object): | ||
| 35 | + class BlobFilter: | ||
| 36 | 36 | """ | |
| 37 | 37 | Predicate to be used by iter_blobs allowing to filter only return blobs which | |
| 38 | 38 | match the given list of directories or files. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,7 @@ | |||
| 33 | 33 | # } END aliases | |
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | - class TemporaryFileSwap(object): | ||
| 36 | + class TemporaryFileSwap: | ||
| 37 | 37 | """Utility class moving a file to a temporary location within the same directory | |
| 38 | 38 | and moving it back on to where on object deletion.""" | |
| 39 | 39 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -102,7 +102,7 @@ def merge_sort(a: List[TreeCacheTup], cmp: Callable[[TreeCacheTup, TreeCacheTup] | |||
| 102 | 102 | k = k + 1 | |
| 103 | 103 | ||
| 104 | 104 | ||
| 105 | - class TreeModifier(object): | ||
| 105 | + class TreeModifier: | ||
| 106 | 106 | """A utility class providing methods to alter the underlying cache in a list-like fashion. | |
| 107 | 107 | ||
| 108 | 108 | Once all adjustments are complete, the _cache, which really is a reference to | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -337,7 +337,7 @@ def parse_actor_and_date(line: str) -> Tuple[Actor, int, int]: | |||
| 337 | 337 | # { Classes | |
| 338 | 338 | ||
| 339 | 339 | ||
| 340 | - class ProcessStreamAdapter(object): | ||
| 340 | + class ProcessStreamAdapter: | ||
| 341 | 341 | """Class wiring all calls to the contained Process instance. | |
| 342 | 342 | ||
| 343 | 343 | Use this type to hide the underlying process to provide access only to a specified | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -55,7 +55,7 @@ def _git_dir(repo: "Repo", path: Union[PathLike, None]) -> PathLike: | |||
| 55 | 55 | return repo.common_dir | |
| 56 | 56 | ||
| 57 | 57 | ||
| 58 | - class SymbolicReference(object): | ||
| 58 | + class SymbolicReference: | ||
| 59 | 59 | """Special case of a reference that is symbolic. | |
| 60 | 60 | ||
| 61 | 61 | This does not point to a specific commit, but to another | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -108,7 +108,7 @@ class BlameEntry(NamedTuple): | |||
| 108 | 108 | orig_linenos: range | |
| 109 | 109 | ||
| 110 | 110 | ||
| 111 | - class Repo(object): | ||
| 111 | + class Repo: | ||
| 112 | 112 | """Represents a git repository and allows you to query references, | |
| 113 | 113 | gather commit information, generate diffs, create and clone repositories query | |
| 114 | 114 | the log. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -516,7 +516,7 @@ def remove_password_if_present(cmdline: Sequence[str]) -> List[str]: | |||
| 516 | 516 | # { Classes | |
| 517 | 517 | ||
| 518 | 518 | ||
| 519 | - class RemoteProgress(object): | ||
| 519 | + class RemoteProgress: | ||
| 520 | 520 | """ | |
| 521 | 521 | Handler providing an interface to parse progress information emitted by git-push | |
| 522 | 522 | and git-fetch and to dispatch callbacks allowing subclasses to react to the progress. | |
@@ -723,7 +723,7 @@ def update(self, *args: Any, **kwargs: Any) -> None: | |||
| 723 | 723 | self._callable(*args, **kwargs) | |
| 724 | 724 | ||
| 725 | 725 | ||
| 726 | - class Actor(object): | ||
| 726 | + class Actor: | ||
| 727 | 727 | """Actors hold information about a person acting on the repository. They | |
| 728 | 728 | can be committers and authors or anything with a name and an email as | |
| 729 | 729 | mentioned in the git log entries.""" | |
@@ -847,7 +847,7 @@ def author(cls, config_reader: Union[None, "GitConfigParser", "SectionConstraint | |||
| 847 | 847 | return cls._main_actor(cls.env_author_name, cls.env_author_email, config_reader) | |
| 848 | 848 | ||
| 849 | 849 | ||
| 850 | - class Stats(object): | ||
| 850 | + class Stats: | ||
| 851 | 851 | """ | |
| 852 | 852 | Represents stat information as presented by git at the end of a merge. It is | |
| 853 | 853 | created from the output of a diff operation. | |
@@ -908,7 +908,7 @@ def _list_from_string(cls, repo: "Repo", text: str) -> "Stats": | |||
| 908 | 908 | return Stats(hsh["total"], hsh["files"]) | |
| 909 | 909 | ||
| 910 | 910 | ||
| 911 | - class IndexFileSHA1Writer(object): | ||
| 911 | + class IndexFileSHA1Writer: | ||
| 912 | 912 | """Wrapper around a file-like object that remembers the SHA1 of | |
| 913 | 913 | the data written to it. It will write a sha when the stream is closed | |
| 914 | 914 | or if the asked for explicitly using write_sha. | |
@@ -942,7 +942,7 @@ def tell(self) -> int: | |||
| 942 | 942 | return self.f.tell() | |
| 943 | 943 | ||
| 944 | 944 | ||
| 945 | - class LockFile(object): | ||
| 945 | + class LockFile: | ||
| 946 | 946 | """Provides methods to obtain, check for, and release a file based lock which | |
| 947 | 947 | should be used to handle concurrent access to the same file. | |
| 948 | 948 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments