Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add sub function #171

Open
wants to merge 60 commits into
base: main
Choose a base branch
from
Open

feat: add sub function #171

wants to merge 60 commits into from

Conversation

Luis-Henrique
Copy link
Contributor

@Luis-Henrique Luis-Henrique commented Apr 17, 2024

Contain

  • New feature
  • Tests

Details

  • Add sub function

Luis-Henrique and others added 30 commits March 28, 2024 12:59
…aster-sam into feat/getatt-intrinsic-function
@Luis-Henrique Luis-Henrique added the enhancement New feature or request label Apr 17, 2024
@Luis-Henrique Luis-Henrique requested a review from a team April 17, 2024 02:07
@Luis-Henrique Luis-Henrique self-assigned this Apr 17, 2024
@Luis-Henrique Luis-Henrique changed the base branch from main to feat/add-split-function April 17, 2024 02:08
for match in matches:
if match in os.environ:
env_var = os.environ[match]
return string.replace(f"${{{match}}}", env_var)
Copy link
Contributor

Choose a reason for hiding this comment

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

Dessa maneira o código não vai sempre retornar após encontrar o primeiro match no ambiente?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrigido!

@Luis-Henrique Luis-Henrique requested a review from a team April 17, 2024 14:26

pattern = r"\${(.*?)}"

def replace(string: str, matches: List[Any]):
Copy link
Contributor

Choose a reason for hiding this comment

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

Acho que vale a pena tirar essa função daqui e adicionar um teste unitário, se alguém alterar ela e adicionar um bug pode passar despercebido já que ela é testado só pela função acima dela.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrigido!

@Luis-Henrique Luis-Henrique requested a review from a team April 17, 2024 16:13
Base automatically changed from feat/add-split-function to main April 24, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants