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

SyntaxError after install #254

Closed
Aareon opened this issue Nov 6, 2023 · 7 comments · Fixed by #256
Closed

SyntaxError after install #254

Aareon opened this issue Nov 6, 2023 · 7 comments · Fixed by #256

Comments

@Aareon
Copy link

Aareon commented Nov 6, 2023

File "...\PyTM-f4mTLz1x\Lib\site-packages\python_pytm-0.0.12-py3.11.egg\PyTM\cli.py", line 98
    table.add_row(key, f'{datetime.datetime.fromisoformat(value['created_at']).strftime("%Y, %B, %d, %H:%M:%S %p")}', value['status'])
                                                                 ^^^^^^^^^^
SyntaxError: f-string: unmatched '['
@Aareon
Copy link
Author

Aareon commented Nov 6, 2023

Due to usage of single quotes within a single-quoted f-string.

@Aareon
Copy link
Author

Aareon commented Nov 6, 2023

File "C:\Users\Aareon\.virtualenvs\PyTM-f4mTLz1x\Lib\site-packages\python_pytm-0.0.12-py3.11.egg\PyTM\core\invoice_handler.py", line 74
    <td class="p-2 border border-gray-300">{float(t['duration']/360):,.02f}</td>

Invalid decimal literal.

@wasi0013
Copy link
Owner

wasi0013 commented Nov 6, 2023

Which python version are you running? Python 3.11?

Only Python 3.12 is supported for now.

@wasi0013
Copy link
Owner

wasi0013 commented Nov 6, 2023

I just noticed you've forked the repo, if you are working on a fix, feel free to create a pull request when you are done.

@Aareon
Copy link
Author

Aareon commented Nov 6, 2023

Are there any dependencies that require 3.12+? Would it be acceptable to bring compatibility with 3.11? I noticed that there are stub functions that are shadowing other functions in cli.py, is that intended behavior?

@wasi0013
Copy link
Owner

wasi0013 commented Nov 7, 2023

Are there any dependencies that require 3.12+?

No. Currently, there are two dependencies: click & rich. There is a possibility of exploring textual in the future. But, it should also be compatible with lower Python versions.

Would it be acceptable to bring compatibility with 3.11?

Absolutely. I wanted to develop the core features first, and then improve the test coverage before diving into compatibility.

I noticed that there are stub functions that are shadowing other functions in cli.py, is that intended behavior?

Nope! This is not intended. Thanks, for the catch, will fix it.

@wasi0013 wasi0013 mentioned this issue Nov 7, 2023
@wasi0013
Copy link
Owner

wasi0013 commented Nov 7, 2023

I've fixed the f-string issues, and renamed stub functions so that they don't shadow other functions. Thanks, @Aareon for pointing it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants