TALWAR commited on
Commit
7571a30
·
1 Parent(s): cf99caa

Mark get_supported_languages as static method

Browse files
deep_translator/deepl.py CHANGED
@@ -62,11 +62,12 @@ class DeepL(object):
62
 
63
  def translate_batch(self, batch, **kwargs):
64
  """
65
- @param batch: list of texts to translate
66
  @return: list of translations
67
  """
68
  return [self.translate(text, **kwargs) for text in batch]
69
 
 
70
  def get_supported_languages(**kwargs):
71
  return [*DeepL._languages.keys()]
72
 
 
62
 
63
  def translate_batch(self, batch, **kwargs):
64
  """
65
+ @param batch: list of texts to translate
66
  @return: list of translations
67
  """
68
  return [self.translate(text, **kwargs) for text in batch]
69
 
70
+ @staticmethod
71
  def get_supported_languages(**kwargs):
72
  return [*DeepL._languages.keys()]
73
 
deep_translator/qcri.py CHANGED
@@ -38,6 +38,7 @@ class QCRI(object):
38
  except Exception as e:
39
  raise e
40
 
 
41
  def get_supported_languages(**kwargs):
42
  # Have no use for this as the format is not what we need
43
  # Save this for whenever
 
38
  except Exception as e:
39
  raise e
40
 
41
+ @staticmethod
42
  def get_supported_languages(**kwargs):
43
  # Have no use for this as the format is not what we need
44
  # Save this for whenever