forked from platformio/platformio-core
Use builtin "title()"
This commit is contained in:
@@ -23,7 +23,7 @@ class DebugConfigFactory(object):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_clsname(name):
|
def get_clsname(name):
|
||||||
name = re.sub(r"[^\da-z\_\-]+", "", name, flags=re.I)
|
name = re.sub(r"[^\da-z\_\-]+", "", name, flags=re.I)
|
||||||
return "%s%sDebugConfig" % (name.upper()[0], name.lower()[1:])
|
return "%sDebugConfig" % name.lower().title()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def new(cls, platform, project_config, env_name):
|
def new(cls, platform, project_config, env_name):
|
||||||
|
@@ -26,7 +26,7 @@ class PlatformFactory(object):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_clsname(name):
|
def get_clsname(name):
|
||||||
name = re.sub(r"[^\da-z\_]+", "", name, flags=re.I)
|
name = re.sub(r"[^\da-z\_]+", "", name, flags=re.I)
|
||||||
return "%s%sPlatform" % (name.upper()[0], name.lower()[1:])
|
return "%sPlatform" % name.lower().title()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def load_module(name, path):
|
def load_module(name, path):
|
||||||
|
Reference in New Issue
Block a user