summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-09-09 10:43:39 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-09-09 10:43:39 +0200
commit173003d9e07bde956eceda83f02224ceb082b4c7 (patch)
treea9f5be93f535fec2daa0fae6b033b79bade0376f
parentf2e5ad1e946a5401753a4058269f933c6d94fc62 (diff)
downloadruamel.yaml-173003d9e07bde956eceda83f02224ceb082b4c7.tar.gz
mypy and minor fix
-rw-r--r--compat.py4
-rw-r--r--scanner.py10
2 files changed, 7 insertions, 7 deletions
diff --git a/compat.py b/compat.py
index ccad4bb..6f708cf 100644
--- a/compat.py
+++ b/compat.py
@@ -185,8 +185,8 @@ def dbg(val=None):
def nprint(*args, **kw):
# type: (Any, Any) -> None
- if bool(dbg):
- dbgprint = print # to fool checking for print statements
+ if bool(_debug):
+ dbgprint = print # to fool checking for print statements by dv utility
dbgprint(*args, **kw)
diff --git a/scanner.py b/scanner.py
index c3f691f..38d6ff6 100644
--- a/scanner.py
+++ b/scanner.py
@@ -528,7 +528,7 @@ class Scanner(object):
self.fetch_flow_collection_end(FlowMappingEndToken)
def fetch_flow_collection_end(self, TokenClass):
- # type: (Any, Text) -> None
+ # type: (Any) -> None
# Reset possible simple key on the current level.
self.remove_possible_simple_key()
# Decrease the flow level.
@@ -1133,7 +1133,7 @@ class Scanner(object):
return TagToken(value, start_mark, end_mark)
def scan_block_scalar(self, style, rt=False):
- # type: (Any) -> Any
+ # type: (Any, Optional[bool]) -> Any
# See the specification for details.
srp = self.reader.peek
if style == '>':
@@ -1931,9 +1931,9 @@ class RoundTripScanner(Scanner):
return ch
return ""
- def scan_block_scalar(self, style):
- # type: (Any) -> Any
- return Scanner.scan_block_scalar(self, style, rt=True)
+ def scan_block_scalar(self, style, rt=True):
+ # type: (Any, Optional[bool]) -> Any
+ return Scanner.scan_block_scalar(self, style, rt=rt)
# try: