Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Avoid hardcoded strings #228

Merged
merged 2 commits into from Sep 16, 2020
Merged

Conversation

bigspider
Copy link
Collaborator

Adds an AppointmentStatus Enum for the possible appointment statuses, and a class constant for the "END" message of the ChainMonitor.

A larger refactoring in the same spirit could make sense for the config dictionary keys, but it is not trivial because of the need of making it work with config_loader.py.

Also fixing a few documentation errors and typos

Closes: 173

@bigspider bigspider changed the title 173 hardcoded strings Avoid hardcoded strings Sep 15, 2020
@bigspider bigspider marked this pull request as ready for review September 15, 2020 10:19
@sr-gi sr-gi linked an issue Sep 15, 2020 that may be closed by this pull request
Copy link
Member

@sr-gi sr-gi left a comment

Choose a reason for hiding this comment

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

Needs rebase and removing a couple of unused imports (there are some other minor style issues to be fixed, but I'd leave those for a final PR before tagging the first RC).

test/common/unit/test_appointment.py is importing struct but not using it.

@@ -1,4 +1,13 @@
import struct
Copy link
Member

Choose a reason for hiding this comment

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

struct is not being used

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed from both here and test/common/unit/test_appointment.py.

…ed strings; fix wrong docs in api.py for get_appointment; fixed few typos in docs
@sr-gi sr-gi merged commit 7cfa294 into talaia-labs:master Sep 16, 2020
@bigspider bigspider deleted the 173-hardcoded-strings branch September 16, 2020 12:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid hardcoded strings across the codebase
2 participants