* refactor: Trim `__init__.py`
We strayed from the goal here: https://github.com/frappe/frappe/pull/29181
So making up for it.
* chore!: Delete unused get_version
Not used anywhere
* refactor: move few more functions to relevant place
* asd
Even though we never use tz aware object in frappe this function
previously used to retain them, so keep TZinfo for sake of compat.
Nothing should be affected ideally.
* perf: resolve rounding method once
When rounding method is explcitly specified it's 1.4x faster.
* perf: reorder checks
Bankers rounding is default and most common now
* perf: speedup get_system_settings
* chore(typing): type filters
* chore(typing): type filters for get_list et al
* fix: dashboard chart filter expression
* test: fix case with new-style right hand object to equality check
* chore: place new typed filter under typing verification
* chore: remove debug print statment
* chore: inverse logic of type guard
* fix: add float to filter value types
* chore: clarify value naming
These were implicitly handled due to the catch-all 0.0 return, but type checkers break here, and a lot of places depend on this behaviour
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* fix: pointless conditions about systemd/supervisor
What does this have to do with hostname?
* fix!: Overriden doctypes must inherit same base class
There is almost never a real need to completely override a class. After
this change we'll only allow extending and not overriding completely.
- Hash one time reset tokens instead of storing them as is
- Up the perm level
- Use better source of randomness for generating token
- minor code cleanup here and there
* feat: comply trackers with utm and add utm_content for a/b testing
* fix: make all other than source optional
this is plausible.io best practice
* fix: medium is not specified to be lowercase
* fix: ensure proper parameter quoting
It's unlikely that a translation for the results of num2words exists, because it should return a string that is already translated in the target language. If there are some numbers that have a specific translation, then it should already be handled in the num2words library. A domain-specific library is surely better at this hypothetical task than Frappe's generic translation system.
In French, 100 is called Cent. But in English, Cent is 1/100th of a dollar, which is called Centime in French.
Expected: num2words(200).title() == "Cent"
Actual: _(num2words(200).title()) == _("Cent") == "Centime"