Open karol-brejna-i opened 3 years ago
Consider the following pseudocode (in main):
settings = parser.parse_args() print(f'strict value: {settings.strict}') print(f'strict type: {type(settings.strict)}') print(f'strict boolean: {bool(settings.strict)}')
The following invocation:
(.venv) pgn-tactics-generator$ ./main.py --strict=False
would produce unwanted results:
strict value: False strict type: <class 'str'> strict boolean: True Looking up stockfish-x86_64-bmi2 ...
strict variable value is 'False' (string). bool( evaluates to True...
strict
Probably something similar to https://github.com/vitogit/pgn-tactics-generator/blob/f81c42182cd042a6f51136e5c98f719db283955b/main.py#L46-L48 would fix the issue.
The solution looks good to me
Consider the following pseudocode (in main):
The following invocation:
would produce unwanted results:
strict
variable value is 'False' (string). bool(Probably something similar to https://github.com/vitogit/pgn-tactics-generator/blob/f81c42182cd042a6f51136e5c98f719db283955b/main.py#L46-L48 would fix the issue.