Skip to content

Commit

Permalink
'Refactored by Sourcery'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcery AI committed Oct 11, 2023
1 parent 63ebdf3 commit 520380c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions findmyorder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,8 @@ async def identify_order(
"""
try:
matched_grammar_class = identify_grammar(my_string)

if matched_grammar_class:
order = matched_grammar_class.define_grammar(my_string)
return order

if matched_grammar_class := identify_grammar(my_string):
return matched_grammar_class.define_grammar(my_string)
except Exception as error:
logger.error(error)
return error
Expand Down

0 comments on commit 520380c

Please sign in to comment.