Skip to content

Commit 76ba092

Browse files
committed
improvement(mypy): ignore false positives
1 parent 8470777 commit 76ba092

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

git/cmd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def dict_to_slots_and__excluded_are_none(self, d, excluded=()):
138138

139139
## CREATE_NEW_PROCESS_GROUP is needed to allow killing it afterwards,
140140
# see https://docs.python.org/3/library/subprocess.html#subprocess.Popen.send_signal
141-
PROC_CREATIONFLAGS = (CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP
141+
PROC_CREATIONFLAGS = (CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP # type: ignore[attr-defined]
142142
if is_win else 0)
143143

144144

git/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def get_config_path(config_level: Literal['system', 'global', 'user', 'repositor
216216
raise ValueError("Invalid configuration level: %r" % config_level)
217217

218218

219-
class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, object)):
219+
class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, object)): # type: ignore ## mypy does not understand dynamic class creation # noqa: E501
220220

221221
"""Implements specifics required to read git style configuration files.
222222

git/refs/reference.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def iter_items(cls, repo, common_path=None):
103103

104104
#{ Remote Interface
105105

106-
@property
106+
@property # type: ignore ## mypy cannot deal with properties with an extra decorator (2021-04-21)
107107
@require_remote_ref_path
108108
def remote_name(self):
109109
"""
@@ -114,7 +114,7 @@ def remote_name(self):
114114
# /refs/remotes/<remote name>/<branch_name>
115115
return tokens[2]
116116

117-
@property
117+
@property # type: ignore ## mypy cannot deal with properties with an extra decorator (2021-04-21)
118118
@require_remote_ref_path
119119
def remote_head(self):
120120
""":return: Name of the remote head itself, i.e. master.

0 commit comments

Comments
 (0)