| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -421,7 +421,7 @@ def log_entry(self, index): | |||
| 421 | 421 | return RefLog.entry_at(RefLog.path(self), index) | |
| 422 | 422 | ||
| 423 | 423 | @classmethod | |
| 424 | - def to_full_path(cls, path) -> PathLike: | ||
| 424 | + def to_full_path(cls, path: Union[PathLike, 'SymbolicReference']) -> PathLike: | ||
| 425 | 425 | """ | |
| 426 | 426 | :return: string with a full repository-relative path which can be used to initialize | |
| 427 | 427 | a Reference instance, for instance by using ``Reference.from_path``""" | |
@@ -430,12 +430,12 @@ def to_full_path(cls, path) -> PathLike: | |||
| 430 | 430 | full_ref_path = path | |
| 431 | 431 | if not cls._common_path_default: | |
| 432 | 432 | return full_ref_path | |
| 433 | - if not path.startswith(cls._common_path_default + "/"): | ||
| 433 | + if not str(path).startswith(cls._common_path_default + "/"): | ||
| 434 | 434 | full_ref_path = '%s/%s' % (cls._common_path_default, path) | |
| 435 | 435 | return full_ref_path | |
| 436 | 436 | ||
| 437 | 437 | @classmethod | |
| 438 | - def delete(cls, repo, path): | ||
| 438 | + def delete(cls, repo: 'Repo', path: PathLike) -> None: | ||
| 439 | 439 | """Delete the reference at the given path | |
| 440 | 440 | ||
| 441 | 441 | :param repo: | |
@@ -457,8 +457,8 @@ def delete(cls, repo, path): | |||
| 457 | 457 | new_lines = [] | |
| 458 | 458 | made_change = False | |
| 459 | 459 | dropped_last_line = False | |
| 460 | - for line in reader: | ||
| 461 | - line = line.decode(defenc) | ||
| 460 | + for line_bytes in reader: | ||
| 461 | + line = line_bytes.decode(defenc) | ||
| 462 | 462 | _, _, line_ref = line.partition(' ') | |
| 463 | 463 | line_ref = line_ref.strip() | |
| 464 | 464 | # keep line if it is a comment or if the ref to delete is not | |
| Back | FazBrowse Home | New Git URL |
0 commit comments