Refactor Agent to Eliminate Global Variables and Enhance Readability#52
Draft
Repsay wants to merge 4 commits intohashtopolis:masterfrom
Draft
Refactor Agent to Eliminate Global Variables and Enhance Readability#52Repsay wants to merge 4 commits intohashtopolis:masterfrom
Repsay wants to merge 4 commits intohashtopolis:masterfrom
Conversation
Rewritten the codebase to not work with global variables. Use Agent class. Simplify codebase and readability.
…ing when base file is found (missing .7z for example).
|
We tried to get your code running, but there seems to be a problem with the conditional imports for typing. Without typing checks, Agent is always undefined when trying to start. |
…ations. Due to circular imports, Agent cannot be imported to the submodules.
Author
|
@gluafamichl I just pushed an update. The Agent cannot be imported directly as that would result into circular imports. Due to this I had it imported via TYPE_CHECKING, but that didn't seem to work. Now I removed the Agent from the submodules and replaced with Any. This results in less obvious use-ability in the IDE but will make it work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a comprehensive refactor of the hashtopolis/agent-python codebase with the following objectives:
Given the interdependencies among these changes, separating them into distinct pull requests would require significant additional effort. Therefore, they are consolidated here to maintain coherence and ensure stability.
This refactor lays the groundwork for future enhancements and facilitates easier maintenance. Developers are encouraged to review the changes thoroughly and provide feedback or raise concerns as necessary.