Skip to content

Commit

Permalink
Agrega documentación de código (WIP).
Browse files Browse the repository at this point in the history
  • Loading branch information
federicotdn committed Jan 6, 2019
1 parent 492af60 commit 274fc90
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ disable=print-statement,
invalid-name,
too-few-public-methods,
fixme,
no-self-use
no-self-use,
unnecessary-pass

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
19 changes: 19 additions & 0 deletions georef_ar_address/address_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,13 @@ def _parse_token_types(self, token_types):
innecesarias (si no es 'None'). Ver el archivo docs/design.md para más
detalles de esta mejora de rendimiento.
Args:
token_types (list): Lista de tipos de tokens.
Returns:
TreeVisitor, NoneType: El mejor TreeVisitor encontrado, o None si
no existe.
"""
if self._cache is not None:
tokens_hash = hash(tuple(token_types))
Expand All @@ -492,6 +499,18 @@ def _parse_token_types(self, token_types):
return self._tokens_parse_tree(token_types)

def parse(self, address):
"""Punto de entrada de la clase AddressParser. Toma una dirección como
string e intenta extraer sus componentes, utilizando el proceso
detallado en el archivo docs/design.md.
Args:
address (str): Dirección sobre la cual realizar la extracción de
componentes.
Returns:
dict: Componentes de la dirección 'address'.
"""
# Remover espacios al comienzo y al final
address = address.strip()
processed = self._normalize_address(address)
Expand Down

0 comments on commit 274fc90

Please sign in to comment.