Skip to content

Commit

Permalink
Some docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
robcowie committed Sep 28, 2011
1 parent eaebd09 commit e7c95fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/api.py
Expand Up @@ -34,12 +34,15 @@ def prepare(self, content):
return content

def upload(self, content):
"""Return the url to the new paste"""
raise NotImplementedError()

def fetch(self, id):
"""Return (content, syntax, url)"""
raise NotImplementedError()

def normalised_syntax(self):
"""Return our best guess given the language file path"""
syntax = self.view.settings().get('syntax')
syntax.lower()\
.replace('.tmlanguage', '')\
Expand All @@ -48,4 +51,5 @@ def normalised_syntax(self):

def syntax(self):
syntax = self.normalise_syntax(syntax)
"""Return a syntax known to the pastebin"""
return self.SYNTAXES.get(syntax, '')

0 comments on commit e7c95fb

Please sign in to comment.