Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3787f62

Browse files
committed
Reformat code to remove unnecessary indentation
1 parent2c4dec4 commit3787f62

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

‎git/config.py

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -464,35 +464,37 @@ def _included_paths(self):
464464
paths+=self.items(section)
465465

466466
match=CONDITIONAL_INCLUDE_REGEXP.search(section)
467-
ifmatchisnotNoneandself._repoisnotNone:
468-
keyword=match.group(1)
469-
value=match.group(2).strip()
470-
471-
ifkeywordin ["gitdir","gitdir/i"]:
472-
value=osp.expanduser(value)
473-
474-
ifnotany(value.startswith(s)forsin ["./","/"]):
475-
value="**/"+value
476-
ifvalue.endswith("/"):
477-
value+="**"
478-
479-
# Ensure that glob is always case insensitive if required.
480-
ifkeyword.endswith("/i"):
481-
value=re.sub(
482-
r"[a-zA-Z]",
483-
lambdam:"[{}{}]".format(
484-
m.group().lower(),
485-
m.group().upper()
486-
),
487-
value
488-
)
489-
490-
iffnmatch.fnmatchcase(self._repo.git_dir,value):
491-
paths+=self.items(section)
492-
493-
elifkeyword=="onbranch":
494-
iffnmatch.fnmatchcase(self._repo.active_branch.name,value):
495-
paths+=self.items(section)
467+
ifmatchisNoneorself._repoisNone:
468+
continue
469+
470+
keyword=match.group(1)
471+
value=match.group(2).strip()
472+
473+
ifkeywordin ["gitdir","gitdir/i"]:
474+
value=osp.expanduser(value)
475+
476+
ifnotany(value.startswith(s)forsin ["./","/"]):
477+
value="**/"+value
478+
ifvalue.endswith("/"):
479+
value+="**"
480+
481+
# Ensure that glob is always case insensitive if required.
482+
ifkeyword.endswith("/i"):
483+
value=re.sub(
484+
r"[a-zA-Z]",
485+
lambdam:"[{}{}]".format(
486+
m.group().lower(),
487+
m.group().upper()
488+
),
489+
value
490+
)
491+
492+
iffnmatch.fnmatchcase(self._repo.git_dir,value):
493+
paths+=self.items(section)
494+
495+
elifkeyword=="onbranch":
496+
iffnmatch.fnmatchcase(self._repo.active_branch.name,value):
497+
paths+=self.items(section)
496498

497499
returnpaths
498500

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp