Make it clearer when get_param is used.

This commit is contained in:
Dave Halter
2019-07-19 11:57:55 +02:00
parent 0dc60fb535
commit 2b0b29f921
2 changed files with 6 additions and 1 deletions

View File

@@ -167,6 +167,12 @@ class ParamNameInterface(object):
def to_string(self): def to_string(self):
raise NotImplementedError raise NotImplementedError
def get_param(self):
# TODO document better where this is used and when. Currently it has
# very limited use, but is still in use. It's currently not even
# clear what values would be allowed.
return None
class BaseTreeParamName(ParamNameInterface, AbstractTreeName): class BaseTreeParamName(ParamNameInterface, AbstractTreeName):
annotation_node = None annotation_node = None

View File

@@ -571,7 +571,6 @@ class DataclassParamName(BaseTreeParamName):
def get_kind(self): def get_kind(self):
return Parameter.POSITIONAL_OR_KEYWORD return Parameter.POSITIONAL_OR_KEYWORD
#TODO get_param?
def infer(self): def infer(self):
if self.annotation_node is None: if self.annotation_node is None: