From dc90b03bea3dc55df5fcc2d7e8e06f6ecf987a5a Mon Sep 17 00:00:00 2001 From: Spring Burst <16273755+Andor233@users.noreply.github.com> Date: Wed, 21 Apr 2021 15:08:39 +0800 Subject: [PATCH 1/2] Remove windows special handling Remove windows special handling when create Remote --- git/remote.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/git/remote.py b/git/remote.py index 4194af1f0..b2bf607ae 100644 --- a/git/remote.py +++ b/git/remote.py @@ -9,7 +9,7 @@ import re from git.cmd import handle_process_output, Git -from git.compat import (defenc, force_text, is_win) +from git.compat import (defenc, force_text) from git.exc import GitCommandError from git.util import ( LazyMixin, @@ -414,15 +414,6 @@ def __init__(self, repo, name): self.repo = repo # type: 'Repo' self.name = name - if is_win: - # some oddity: on windows, python 2.5, it for some reason does not realize - # that it has the config_writer property, but instead calls __getattr__ - # which will not yield the expected results. 'pinging' the members - # with a dir call creates the config_writer property that we require - # ... bugs like these make me wonder whether python really wants to be used - # for production. It doesn't happen on linux though. - dir(self) - # END windows special handling def __getattr__(self, attr): """Allows to call this instance like From 020179b8158181a6e4af55135a4750190cffbc4b Mon Sep 17 00:00:00 2001 From: Spring Burst <16273755+Andor233@users.noreply.github.com> Date: Wed, 21 Apr 2021 15:29:12 +0800 Subject: [PATCH 2/2] Update remote.py Format code --- git/remote.py | 1 - 1 file changed, 1 deletion(-) diff --git a/git/remote.py b/git/remote.py index b2bf607ae..194db9386 100644 --- a/git/remote.py +++ b/git/remote.py @@ -414,7 +414,6 @@ def __init__(self, repo, name): self.repo = repo # type: 'Repo' self.name = name - def __getattr__(self, attr): """Allows to call this instance like remote.special( \\*args, \\*\\*kwargs) to call git-remote special self.name"""