nion-software / nionui

Nion UI is a Python UI framework with a Qt backend.
Other
5 stars 15 forks source link

Fix #681 Add 'TestFontMetrics' class to approximate real font width calculations #45

Closed dhauge closed 3 years ago

dhauge commented 3 years ago
CLAassistant commented 3 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Douglas Hauge seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

dhauge commented 3 years ago

Are type declarations required for this project? I've gotten several build failures because types were missing or the type of a variable changes:

nion/ui/TestUI.py:38: error: Need type annotation for "font_width_by_char" (hint: "font_width_by_char: Dict[<type>, <type>] = ...")

Is the intent to have everything in the project strictly typed?

cmeyer commented 3 years ago

Is the intent to have everything in the project strictly typed?

The intent (for now) is to pass the mypy type checking, and there are still spots where type checking is missing. There is a more strict version of typing where everything is declared to have been typed. See this page if you're interested. I don't this this package is to that level yet.