* refactor: replace `imaghdr` with `filetype`
```
11:52:06 worker.1 | /home/ankush/benches/develop/apps/frappe/frappe/core/doctype/file/utils.py:2: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13
```
* feat: improved extension guessing using filecontent
remove docstatus from get_workflow_state_count as it is not being used
and causes error with postgresql as it requires the selected column
to either appear in the group by clause or an aggregat function
[skip ci]
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
Create a single workflow action document for pending transitions.
The Roles that are allowed to make the transition are stored in a Table MultiSelect field.
Workflow action doctype is filtered on the basis of applied roles on the visiting user.
The user column is retained for backward compatibility.
BREAKING CHANGE: The user field will no longer be used, A new field that stores applicable roles will be used instead.
- Printview used to go empty for new document due to "Not Found" error in printview because that new document has not been saved in the database while processing workflow action email.
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
* feat: add number format parameter in doc.get_formatted
* fix: add test cases
* fix: test_document test
* fix: test_document test fix
* fix: readding test for test_formatter
* perf: add indexes in workflow action
* chore: commit auto created file
* Revert "feat: add number format parameter in doc.get_formatted"
This reverts commit 6bdcae1201.
* Revert "fix: add test cases"
This reverts commit 4bafae6e38.
* Revert "fix: test_document test"
This reverts commit 3336915dae.
* Revert "fix: readding test for test_formatter"
This reverts commit f5e40141af.
* chore: remove unwanted changes
* chore: remove unwanted changes
Co-authored-by: Kenneth Sequeira <seq.kenneth@gmail.com>
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass