Skip to content

Include dependencies and let some code more readable#67

Open
silviolleite wants to merge 4 commits intogeorgeyk:masterfrom
silviolleite:master
Open

Include dependencies and let some code more readable#67
silviolleite wants to merge 4 commits intogeorgeyk:masterfrom
silviolleite:master

Conversation

@silviolleite
Copy link
Copy Markdown

Changes

  • Include forgotten tests and locals dependencies
  • Refactor some comparison condition
  • Make the apply_message_translator function more readable

Congratulations! Great lib 🥇

Comment thread requirements/local.txt Outdated
Comment thread requirements/test.txt
pytest-asyncio
pytest-cov
pytest-deadfixtures
pytest-runner
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give me more context about this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's required on setup.py at line 91

python setup_requires=['pytest-runner'],

The IDE show an warnning Package requirement 'pytest-runner' is not satisfied.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's your IDE, I could not find anything in regular environments or circleci. Please revert this change.

@georgeyk
Copy link
Copy Markdown
Owner

georgeyk commented Aug 5, 2020

hey @silviolleite thanks for your collaboration.
I'll check it later for more feedback. o/

@silviolleite silviolleite requested a review from georgeyk August 10, 2020 13:29
Comment thread loafer/managers.py

if hasattr(self, '_future'):
future = getattr(self, '_future', None)
if future:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any problem with readability here.

Comment thread loafer/routes.py
logger.info('error handler process originated by message={}'.format(message))

if self._error_handler is not None:
if self._error_handler:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one as well.

Comment thread loafer/routes.py
raise ValueError('{} failed to translate message={}'.format(self.message_translator, message))

return processed_message
return translated
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might override metadata values if we apply the translator several times. I'll check and then we can improve this on the side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants