File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717* Added Rhino ` Brep ` plugin in ` compas_rhino.geometry.brep ` .
1818* Added boolean operations to the ` compas_rhino ` ` Brep ` backend.
1919* Added boolean operation operator overloads in ` compas.geometry.Brep `
20+ * Added ` format ` task using ` black ` formatter.
2021
2122### Changed
2223* Based all gltf data classes on ` BaseGLTFDataClass `
2324
2425* Fixed ` Color.__get___ ` AttributeError.
2526* Fixed ` cylinder_to_rhino ` conversion to match ` compas.geometry.Cylinder ` location.
2627* Changed linter to ` black ` .
28+ * Automatically trigger ` invoke format ` during ` invoke release ` .
2729
2830### Removed
2931
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ class MeshArtist(Artist):
9494
9595 color = Color .from_hex ("#0092D2" ).lightened (50 )
9696
97- default_vertexcolor = Color .from_hex (' #0092D2' )
97+ default_vertexcolor = Color .from_hex (" #0092D2" )
9898 default_edgecolor = Color .from_hex ("#0092D2" )
9999 default_facecolor = Color .from_hex ("#0092D2" ).lightened (50 )
100100
Original file line number Diff line number Diff line change @@ -133,6 +133,13 @@ def lint(ctx):
133133 ctx .run ("black --check --diff --color src tests" )
134134
135135
136+ @task ()
137+ def format (ctx ):
138+ """Reformat the code base using black."""
139+ log .write ("Running black python formatter..." )
140+ ctx .run ("black src tests" )
141+
142+
136143@task ()
137144def testdocs (ctx , rebuild = False ):
138145 """Test the examples in the docstrings."""
@@ -254,6 +261,9 @@ def release(ctx, release_type):
254261 "The release type parameter is invalid.\n Must be one of: major, minor, patch"
255262 )
256263
264+ # Run formmatter
265+ ctx .run ("invoke format" )
266+
257267 # Run checks
258268 ctx .run ("invoke check test" )
259269
You can’t perform that action at this time.
0 commit comments