Python-World / s-tool

Selenium wrapper to make your life easy.
MIT License
10 stars 6 forks source link

Modified default mutable arguments #28

Closed svenkat19 closed 3 years ago

chavarera commented 3 years ago

@svenkat19 any update?

svenkat19 commented 3 years ago

@svenkat19 any update?

Oh sorry, I just forgot to inform, Could you please explain where the doc-string document is?

chavarera commented 3 years ago

@svenkat19 any update?

Oh sorry, I just forgot to inform, Could you please explain where the doc-string document is?

In same code the documentation added please update

svenkat19 commented 3 years ago

text_exclude already had a description I suppose!

chavarera commented 3 years ago

https://github.com/Python-World/s-tool/blob/7a5651a1b2277a2f02363cde5469325dc072d814/s_tool/parser.py#L10

Here Instead of list put it as immutable object tuple ..

chavarera commented 3 years ago

@svenkat19 after modification of code please run the test case so it will validate your code block properly working or not.

If something breaking please modify accordingly

svenkat19 commented 3 years ago

I went through the cchanges, I am not able to find where I am going wrong. Could you help?

chavarera commented 3 years ago

I went through the cchanges, I am not able to find where I am going wrong. Could you help?

@svenkat19

https://github.com/Python-World/s-tool/blob/33f9c03b5d31e33368a7e76d3e73059b34043d63/s_tool/parser.py#L22

consider if we not passing text_exclude value then above line will generate following exceptions

TypeError: argument of type 'NoneType' is not iterable

before iteration we need to compare the value

if text_exclude and text not in text_exclude:
    #perform regular operation

After completion of code run your code with

pytest

After all testcases passed then push

if you have still doubt comment it

chavarera commented 3 years ago

closing PR

Reason: No update