mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-25 12:27:06 +08:00
Start working with mypy
This commit is contained in:
@@ -7,11 +7,7 @@ import shutil
|
||||
import platform
|
||||
import logging
|
||||
import warnings
|
||||
|
||||
try:
|
||||
import cPickle as pickle
|
||||
except:
|
||||
import pickle
|
||||
import pickle
|
||||
|
||||
from parso.file_io import FileIO
|
||||
|
||||
|
||||
@@ -149,8 +149,8 @@ class Issue(object):
|
||||
|
||||
|
||||
class Rule(object):
|
||||
code = None
|
||||
message = None
|
||||
code: int
|
||||
message: str
|
||||
|
||||
def __init__(self, normalizer):
|
||||
self._normalizer = normalizer
|
||||
|
||||
@@ -23,7 +23,7 @@ class NodeOrLeaf(object):
|
||||
The base class for nodes and leaves.
|
||||
"""
|
||||
__slots__ = ()
|
||||
type = None
|
||||
type: str
|
||||
'''
|
||||
The type is a string that typically matches the types of the grammar file.
|
||||
'''
|
||||
@@ -257,7 +257,6 @@ class BaseNode(NodeOrLeaf):
|
||||
A node has children, a type and possibly a parent node.
|
||||
"""
|
||||
__slots__ = ('children', 'parent')
|
||||
type = None
|
||||
|
||||
def __init__(self, children):
|
||||
self.children = children
|
||||
|
||||
Reference in New Issue
Block a user