Changelog¶
0.4.9¶
Bugs Fixed¶
formate.dynamic_quotes()
– Preserve surrogates in strings. This prevents a crash when attempting to write the resulting file.
0.4.8¶
Bugs Fixed¶
formate.reformat_file()
– Only write to the file if there have been any changes. This avoids unnecessary changes to the mtime.formate.reformat_generics
– Don’t crash if a generic’s name contains a.
.
0.4.7¶
Bugs Fixed¶
formate.reformat_generics
– Correctly handle boolean values in Literals.
0.4.6¶
Bugs Fixed¶
formate.dynamic_quotes
– Preserve quote style in docstrings.
0.4.5¶
Bugs Fixed¶
formate.config
– The decorators now use a type variable to indicate to type checkers the returned object has the same type as the decorated object.formate.isort_hook()
andformate.yapf_hook()
– Don’t crash when keys are missing fromformate_global_config
and aren’t in**kwargs
.
0.4.4¶
0.4.2¶
Bugs Fixed¶
formate.mini_hooks.squish_stubs()
– Ensure space between classes and functions is preserved in cases where there would be no space between the class and a method.
0.4.1¶
Bugs Fixed¶
formate.mini_hooks.squish_stubs()
– Don’t crash due to accessing an out-of-range value from a list.
0.4.0¶
Enhancements¶
formate.mini_hooks.squish_stubs()
– Remove whitespace between the class definition and first single-line function.
0.3.2¶
Bugs Fixed¶
formate.mini_hooks.squish_stubs()
– Don’t crash due to accessing an out-of-range value from a list.
0.3.1¶
Bugs Fixed¶
formate.isort_hook()
– Preserve aliases / re-exports (e.g. import foo as foo) in stub files, as these are necessary for type checkers to understand re-exports.
0.3.0¶
Enhancements¶
Add support for reading the configuration from a
[tool.formate]
table inpyproject.toml
.
0.2.5¶
Bugs Fixed¶
formate.mini_hooks.squish_stubs()
– Improve handling of stubs with multiple decorators and keyword-only arguments.
0.2.4¶
Bugs Fixed¶
formate.isort_hook()
– Correctly handle isort options which may be either a single value or a sequence of values.
0.2.3¶
Bugs Fixed¶
formate.mini_hooks.squish_stubs()
– Correctly handle comments and docstrings at the very top of stub files.
0.2.0¶
0.1.0¶
Initial release.