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
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.
* 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
* chore(deps): bump bleach from 2.1.4 to 3.1.2
Bumps [bleach](https://github.com/mozilla/bleach) from 2.1.4 to 3.1.2.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES)
- [Commits](https://github.com/mozilla/bleach/compare/v2.1.4...v3.1.2)
Signed-off-by: dependabot[bot] <support@github.com>
* chore: use html.parser instead of html5lib
bleach no longer ships html5lib as a requirement and instead has
included it in the system. we can switch to using html.parser instead;
which is not an external dependency unlike html5lib.
source: https://github.com/mozilla/bleach/blob/master/CHANGES#L206
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
* chore: use html5lib from bleach
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
* chore: import html5lib from bleach._vendor
fixes issue where bs4 is unable to find html5lib in the tree:
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: bleach._vendor.html5lib. Do you need to install a parser library?
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
* chore: just give up and install html5lib as a dependency
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chinmay D. Pai <chinmaydpai@gmail.com>
Same as other attributes, we could indicate default orientation by indicating in the .print-format css class without hardcoding, which is useful for cloud users.
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>