summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiel van Schijndel <giel@mortis.eu>2021-04-23 12:24:53 +0200
committerGiel van Schijndel <giel@mortis.eu>2021-04-23 15:23:11 +0200
commit76ba0924be14d55d01db0506b3e6a930cc72bf0d (patch)
tree9ac64e4f00f045c588f11c0f36bfb58dc392aa30
parent8470777b44bed4da87aad9474f88e7f0774252a6 (diff)
downloadgitpython-76ba0924be14d55d01db0506b3e6a930cc72bf0d.tar.gz
improvement(mypy): ignore false positives
-rw-r--r--git/cmd.py2
-rw-r--r--git/config.py2
-rw-r--r--git/refs/reference.py4
3 files changed, 4 insertions, 4 deletions
diff --git a/git/cmd.py b/git/cmd.py
index e38261a0..ac3ca2ec 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -138,7 +138,7 @@ CREATE_NO_WINDOW = 0x08000000
## CREATE_NEW_PROCESS_GROUP is needed to allow killing it afterwards,
# see https://docs.python.org/3/library/subprocess.html#subprocess.Popen.send_signal
-PROC_CREATIONFLAGS = (CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP
+PROC_CREATIONFLAGS = (CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP # type: ignore[attr-defined]
if is_win else 0)
diff --git a/git/config.py b/git/config.py
index aadb0aac..1cb80475 100644
--- a/git/config.py
+++ b/git/config.py
@@ -216,7 +216,7 @@ def get_config_path(config_level: Literal['system', 'global', 'user', 'repositor
raise ValueError("Invalid configuration level: %r" % config_level)
-class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, object)):
+class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, object)): # type: ignore ## mypy does not understand dynamic class creation # noqa: E501
"""Implements specifics required to read git style configuration files.
diff --git a/git/refs/reference.py b/git/refs/reference.py
index aaa9b63f..9014f555 100644
--- a/git/refs/reference.py
+++ b/git/refs/reference.py
@@ -103,7 +103,7 @@ class Reference(SymbolicReference, LazyMixin, Iterable):
#{ Remote Interface
- @property
+ @property # type: ignore ## mypy cannot deal with properties with an extra decorator (2021-04-21)
@require_remote_ref_path
def remote_name(self):
"""
@@ -114,7 +114,7 @@ class Reference(SymbolicReference, LazyMixin, Iterable):
# /refs/remotes/<remote name>/<branch_name>
return tokens[2]
- @property
+ @property # type: ignore ## mypy cannot deal with properties with an extra decorator (2021-04-21)
@require_remote_ref_path
def remote_head(self):
""":return: Name of the remote head itself, i.e. master.