Skip to content

Commit 201c8cf

Browse files
committed
use poetry for project management
1 parent fe1be2c commit 201c8cf

File tree

4 files changed

+493
-10
lines changed

4 files changed

+493
-10
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
__pycache__/
2+
*.pyc
3+
dist/

fee.py

+16-10
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,7 @@ def add_call_elf(self, argv: str) -> None:
251251
self.add(execline)
252252

253253

254-
class LanguageNotImplementedException(Exception):
255-
pass
256-
257-
258-
class GeneratorException(Exception):
259-
pass
260-
261-
262-
if __name__ == "__main__":
254+
def main() -> int:
263255
# we need to monkeypatch the help function to print to stderr
264256
# as we want nothing but executable code being printed to stdout
265257
def patched_help_call(self, parser, namespace, values, option_string=None):
@@ -388,4 +380,18 @@ def patched_help_call(self, parser, namespace, values, option_string=None):
388380
except Exception as e:
389381
print_err(f"{e.__str__()}\n")
390382
print_err("Use --help for more information.\n")
391-
sys.exit(1)
383+
return 1
384+
385+
return 0
386+
387+
388+
class LanguageNotImplementedException(Exception):
389+
pass
390+
391+
392+
class GeneratorException(Exception):
393+
pass
394+
395+
396+
if __name__ == "__main__":
397+
sys.exit(main())

0 commit comments

Comments
 (0)